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 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
#!/usr/bin/make -f
DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_CFLAGS_MAINT_PREPEND = -Wall
include /usr/share/dpkg/default.mk
sourcedep_libdpkg_dev := \
$(shell dpkg-query \
--showformat '$${source:Package} (= $${source:Version})' \
--show libdpkg-dev)
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
confflags += --build=$(DEB_HOST_GNU_TYPE)
else
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
endif
# Create configure script if necessary, automake handles rebuilding it.
configure: configure.ac
dh_testdir
./autogen
# Configure the build tree
build-tree/config.status: configure
dh_testdir
install -d build-tree
cd build-tree && ../configure $(confflags) \
CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" \
LDFLAGS="$(LDFLAGS)" \
--prefix=/usr \
--mandir=\$${datadir}/man \
--sysconfdir=/etc \
--disable-silent-rules
build: build-arch build-indep
build-indep:
# XXX: We need to use a build stamp because the test suite uses GnuPG, which
# is Set-Uid-Root on non-Linux systems, which breaks it when using also
# fakeroot.
build-arch: build-tree/build-arch-stamp
build-tree/build-arch-stamp: build-tree/config.status
dh_testdir
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(MAKE) -C build-tree VERBOSE=1 check
else
$(MAKE) -C build-tree
endif
touch $@
.PHONY: build build-indep build-arch
clean:
dh_testdir
[ ! -f Makefile ] || $(MAKE) distclean
rm -rf build-tree
dh_clean
install-arch: build-arch
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) -C build-tree DESTDIR="$(CURDIR)/debian/debsig-verify" install
.PHONY: install-arch clean
binary-indep:
binary-arch: install-arch
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installman
dh_installdeb
dh_lintian
dh_link
dh_strip
dh_compress
dh_fixperms
dh_md5sums
dh_shlibdeps
dh_gencontrol -- -Vsourcedep:libdpkg-dev='$(sourcedep_libdpkg_dev)'
dh_builddeb
binary: binary-indep binary-arch
.PHONY: binary binary-indep binary-arch
|