debian: use dh_auto_configure instead of open-coding configuration keithp-debian-changes
authorKeith Packard <keithp@keithp.com>
Tue, 23 Oct 2018 00:11:23 +0000 (17:11 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 23 Oct 2018 23:10:33 +0000 (16:10 -0700)
This ensures that various debian defaults are used, including
architecture-specific library directories and hardening options.

Note that this changes where the .la files are installed, hence the
additional patch where those files are modified.

Signed-off-by: Keith Packard <keithp@keithp.com>
debian/rules

index 553d595de0461b5fb99c1d1516468d195d498e7e..e461ca71d2ab2c6c641af3cf95051fe03a2bf31a 100755 (executable)
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DH_VERBOSE=1
 PKG_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)/\1/p')
 
@@ -8,14 +9,11 @@ PKG_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)/\1/p')
 prebuild:
        echo "not frobbing changelog for official builds"
 
+configure_flags = --disable-install-shared-mime-info --enable-faketime
+
 configure: configure-stamp
 configure-stamp:
-       dh_testdir
-       ./autogen.sh \
-               --prefix=/usr \
-               --disable-install-shared-mime-info \
-               --enable-faketime
-       touch configure-stamp
+       dh_auto_configure -- $(configure_flags) && touch $@
 
 build: build-arch build-indep
 build-arch: build-stamp
@@ -42,7 +40,7 @@ install: build
        dh_installdirs
 
        $(MAKE) DESTDIR=$(CURDIR)/debian/altos install
-       sed -i "/dependency_libs/ s/'.*'/''/" `find debian/altos/usr/lib/altos/ -name '*.la'`
+       sed -i "/dependency_libs/ s/'.*'/''/" `find debian/altos/ -name '*.la'`
 
 binary-indep: install