#!/usr/bin/make -f # Enable hardening build flags export DEB_BUILD_MAINT_OPTIONS=hardening=+all # Remove buildpath from binaries export DEB_CFLAGS_MAINT_APPEND=-DNDEBUG export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG include /usr/share/dpkg/pkg-info.mk UPSTREAM_VERSION=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//') BUILD_DATE=$(shell LC_ALL=C date -u "+%d %B %Y" -d "@$(SOURCE_DATE_EPOCH)") MANPAGES:=$(wildcard debian/man/*.*.xml) %: dh $@ --buildsystem cmake \ --with python2,pkgkde_symbolshelper \ --parallel override_dh_auto_clean-indep: dh_auto_clean --sourcedirectory python --buildsystem pybuild override_dh_clean: dh_clean README.txt debian/man/*.1 override_dh_auto_configure: dh_auto_configure --builddirectory=debian/build -- \ -DCMAKE_VERBOSE_MAKEFILE=1 \ -DWITH_GDAL=TRUE \ -DWITH_GEOTIFF=TRUE \ -DGEOTIFF_INCLUDE_DIR=/usr/include/geotiff override_dh_auto_configure-indep: dh_auto_configure --sourcedirectory python --buildsystem pybuild override_dh_auto_build-arch: # Create man pages from DocBook XML for x in $(MANPAGES) ; do \ docbook2x-man --string-param header-3="$(BUILD_DATE)" $$x ; \ mv `basename $$x | sed 's/.xml$$//'` `dirname $$x` ; \ done dh_auto_build --builddirectory=debian/build override_dh_auto_build-indep: dh_auto_build --sourcedirectory python --buildsystem pybuild override_dh_auto_test: LD_PRELOAD="$(CURDIR)/debian/build/bin/None/liblas.so.3" dh_auto_test --builddirectory=debian/build || echo "Ignoring test failures" override_dh_auto_install-arch: dh_auto_install --builddirectory=debian/build override_dh_auto_install-indep: chmod -x python/examples/* python/scripts/* dh_auto_install --sourcedirectory python --buildsystem pybuild override_dh_install-arch: $(RM) debian/*/usr/share/liblas/doc/AUTHORS $(RM) debian/*/usr/share/liblas/doc/COPYING $(RM) debian/*/usr/share/liblas/doc/INSTALL $(RM) debian/*/usr/share/liblas/doc/README.txt $(RM) debian/*/usr/share/liblas/doc/LICENSE.txt dh_install --arch --list-missing # remove capi from liblas-dev rm -vrf debian/liblas-dev/usr/include/liblas/capi/ # removing embedded rpath in binaries -find debian/liblas-bin/usr/bin -type f -exec chrpath --delete {} \; override_dh_install-indep: dh_install --indep --list-missing override_dh_makeshlibs: dh_makeshlibs -- -c0 -v$(UPSTREAM_VERSION)