summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules79
1 files changed, 18 insertions, 61 deletions
diff --git a/debian/rules b/debian/rules
index 7b37c2f..8afa698 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,76 +3,33 @@
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
-configure-stamp:
- dh_testdir
- dh_autoreconf
- ./configure --prefix=/usr \
- --mandir=\$${prefix}/share/man \
- --enable-static \
- $(shell dpkg-buildflags --export=cmdline)
- touch $@
-
-build-arch: build
-build-indep: build
-build: build-stamp
-build-stamp: configure-stamp
- dh_testdir
- $(MAKE)
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f *-stamp
-
- # Add here commands to clean up after the build process.
- [ ! -f Makefile ] || [ ! -f config.status ] || $(MAKE) distclean
- find . -name '*.o' -o -name '_libs' -o -name '*.lo' -o -name '*.a' -o -name '.deps' | xargs rm -rf
- # remove unused configure stuff
- rm -f config.log config.cache config.status
- dh_autoreconf_clean
- dh_clean
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-install: install-stamp
-install-stamp: build
- dh_testdir
- dh_testroot
- dh_clean
+confflags = --prefix=/usr --mandir=\$${prefix}/share/man --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --enable-static $(shell dpkg-buildflags --export=cmdline)
- $(MAKE) prefix=$(CURDIR)/debian/tmp/usr \
- mandir=$(CURDIR)/debian/tmp/usr/share/man install
- touch install-stamp
+%:
+ dh $@ --with autoreconf
-# Build architecture-independent files here.
-binary-indep:
-# We have nothing to do by default.
+override_dh_auto_configure:
+ ./configure $(confflags)
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir -a
- dh_testroot -a
- dh_install -a
- dh_installdocs -a
- dh_installchangelogs -a ChangeLog
- dh_installexamples -a
- chmod -x debian/libxbase64-dev/usr/share/doc/libxbase64-dev/examples/*.cpp
- dh_strip -a
- dh_compress -a -X.cpp
- dh_fixperms -a
- dh_makeshlibs -a
- dh_shlibdeps -a
- dh_installdeb -a
- dh_gencontrol -a
- dh_md5sums -a
- dh_builddeb -a
+override_dh_install:
+ chmod -x examples/*.cpp
+ dh_install
+override_dh_makeshlibs:
+ dpkg-gensymbols -plibxbase64-1
+ dh_makeshlibs
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install