1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
#!/usr/bin/make -f
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
BUILD_DATE=$(shell dpkg-parsechangelog | sed -ne 's/^Date: //p' | LC_ALL=C date -u "+%d %B %Y" -f -)
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)
|