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
|
#!/usr/bin/make -f
# Enable hardening build flags
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
CFLAGS += $(CPPFLAGS)
VERSION := $(shell grep '^AC_INIT' configure.ac | sed 's/AC_INIT(saga, \([0-9|\.]*\)\,.*)/\1/g')
UPSTREAM_URL ?= $(shell uscan --dehs | sed -n 's/.*<upstream-url>\(.*\)<\/upstream-url>.*/\1/p')
UPSTREAM_VERSION ?= $(shell uscan --dehs | sed -n 's/.*<upstream-version>\(.*\)<\/upstream-version>.*/\1/p')
TEMPLATES = $(wildcard debian/*.in)
templates:
for TEMPLATE in $(TEMPLATES) ; do \
sed -e 's/@VERSION@/$(VERSION)/g' $$TEMPLATE > `echo $$TEMPLATE | sed 's/.in$$//'` ; \
done
%:
dh $@ --with python2 --with autoreconf --parallel
override_dh_clean:
dh_clean src/saga_core/saga_api/saga_api.py saga_cmd.1 saga_gui.1
override_dh_auto_configure: templates
dh_auto_configure -- \
--prefix=/usr \
--disable-libfire \
--disable-triangle \
--enable-openmp \
--enable-python \
--with-system-dxflib \
$(shell dpkg-buildflags --export=configure)
override_dh_auto_build:
pod2man --section=1 --release=$(VERSION) --center " " debian/saga_gui.pod > saga_gui.1
pod2man --section=1 --release=$(VERSION) --center " " debian/saga_cmd.pod > saga_cmd.1
dh_auto_build
override_dh_auto_install:
dh_auto_install
# Remove executable bit from resource files
chmod -x debian/*/usr/share/saga/*.*
# Explicitly remove files not to be installed
find $(CURDIR)/debian/tmp/usr/lib -name "*.a" -delete
find $(CURDIR)/debian/tmp/usr/lib -name "*.la" -delete
find $(CURDIR)/debian/tmp/usr/lib -name "*.pyc" -delete
find $(CURDIR)/debian/tmp/usr/lib -name "*.pyo" -delete
$(RM) -r $(CURDIR)/debian/tmp/usr/include
override_dh_install:
dh_install --list-missing
override_dh_python2:
dh_python2 --no-guessing-versions
override_dh_makeshlibs:
dh_makeshlibs -Xpython-saga
get-orig-source:
uscan --verbose --force-download --repack --compression xz
|