#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/pkg-info.mk #Set SOVERSION SOVERSION=0 ITK_MINOR=$(shell dpkg --list | sed -n 's/.*libinsighttoolkit\([0-9]\+\.[0-9]\+\).*/\1/p') %: dh $@ --buildsystem=cmake override_dh_auto_configure: # Use our home-made CMakeLists.txt file, save the unused one. mv CMakeLists.txt CMakeLists.txt.old sed "s/ITK_VERSION/$(ITK_MINOR)/" debian/CMakeLists.txt.in > CMakeLists.txt dh_auto_configure -- \ -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \ -DVERSION="$(DEB_VERSION_UPSTREAM)" \ -DSOVERSION="$(SOVERSION)" execute_before_dh_clean: # Remove our home-made CMakeLists.txt file, put back the unused one. if [ -e CMakeLists.txt.old ]; then \ mv CMakeLists.txt.old CMakeLists.txt; \ fi