| 1 |
|
| 2 |
|
| 3 |
include /usr/share/dpkg/architecture.mk |
| 4 |
export DEB_BUILD_MAINT_OPTIONS := hardening=+all |
| 5 |
export DEB_CFLAGS_MAINT_APPEND := -Wall -Wno-format-contains-nul |
| 6 |
export LC_COLLATE=C |
| 7 |
undefine LC_ALL |
| 8 |
|
| 9 |
include /usr/share/dpkg/pkg-info.mk |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
export MAN_PAGE_DATE = $(shell env LC_ALL=C date -u \ |
| 14 |
-d @`find -maxdepth 1 -type f -name NEWS -printf '%T@' | sed -e 's/\..*//'` \ |
| 15 |
+%Y-%m-%d) |
| 16 |
|
| 17 |
|
| 18 |
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) |
| 19 |
export libopts_cv_with_libregex=yes |
| 20 |
endif |
| 21 |
|
| 22 |
override_dh_auto_configure: |
| 23 |
dh_auto_configure --verbose -- \ |
| 24 |
--disable-silent-rules \ |
| 25 |
--enable-timeout=78 \ |
| 26 |
--with-libxml2-libs="$(shell $(DEB_HOST_GNU_TYPE)-pkg-config --libs libxml-2.0)" \ |
| 27 |
--with-libxml2-cflags="$(shell $(DEB_HOST_GNU_TYPE)-pkg-config --cflags libxml-2.0)" \ |
| 28 |
GREP=/bin/grep POSIX_SHELL=/bin/sh SHELL=/bin/sh \ |
| 29 |
GUILE=/usr/bin/guile-3.0 |
| 30 |
|
| 31 |
override_dh_auto_build: |
| 32 |
dh_auto_build --verbose |
| 33 |
$(MAKE) -C doc info |
| 34 |
ifneq (,$(filter autogen-doc, $(shell dh_listpackages))) |
| 35 |
$(MAKE) -C doc pdf |
| 36 |
$(MAKE) -C doc html |
| 37 |
endif |
| 38 |
|
| 39 |
|
| 40 |
override_dh_auto_clean: |
| 41 |
rm -Rf doc/html |
| 42 |
rm -vf agen5/test/defs autoopts/test/*.o autoopts/test/*.c \ |
| 43 |
autoopts/test/*.h autoopts/test/getopt.def getdefs/opts.c \ |
| 44 |
snprintfv/snv.c snprintfv/snprintfv.h xml2ag/fork.c \ |
| 45 |
xml2ag/xmlopts.c xml2ag/xmlopts.h autoopts/autoopts.pc \ |
| 46 |
autoopts/pathfind.3 autoopts/*.tar.gz \ |
| 47 |
autoopts/pkgconfig/autoopts.pc autoopts/tpl/man2man \ |
| 48 |
autoopts/tpl/man2mdoc autoopts/tpl/man2texi \ |
| 49 |
autoopts/tpl/mdoc2mdoc autoopts/tpl/mdoc2texi \ |
| 50 |
autoopts/tpl/mdoc2man autoopts/tpl/texi2man \ |
| 51 |
autoopts/tpl/texi2mdoc autoopts/tpl/texi2texi \ |
| 52 |
columns/invoke-columns.* config/config.log \ |
| 53 |
config/shdefs getdefs/invoke-getdefs.* \ |
| 54 |
getdefs/opts.h getdefs/stamp-* |
| 55 |
dh_auto_clean --verbose |
| 56 |
|
| 57 |
execute_before_dh_auto_install: |
| 58 |
for i in $(CURDIR)/debian/tmp/usr/bin/* ; do \ |
| 59 |
if chrpath --list "$$i" ; then \ |
| 60 |
echo "removing rpath from $$i" ; \ |
| 61 |
chrpath --delete "$$i" ; else true ; \ |
| 62 |
fi ; done |
| 63 |
|
| 64 |
%: |
| 65 |
dh $@ |