#!/usr/bin/make -f # # (c) 2021-2022 Roland Rosenfeld # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 #export DH_OPTIONS=-v INSTDIR=`pwd`/debian/mailfromd export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ override_dh_autoreconf: # preserve files overwritten by dh_autoreconf: tar cf debian/autoreconf.tar INSTALL Makefile.in aclocal.m4 \ build-aux/compile build-aux/config.guess build-aux/config.sub \ build-aux/depcomp build-aux/install-sh build-aux/mdate-sh \ build-aux/missing build-aux/texinfo.tex \ configure doc/Makefile.in elisp/Makefile.in etc/Makefile.in \ gacopyz/Makefile.in imprimatur/Makefile.in lib/Makefile.in \ mflib/Makefile.in mtasim/Makefile.in pmult/Makefile.in \ src/Makefile.in src/builtin/Makefile.in tests/Makefile.in \ build-aux/config.guess build-aux/config.sub \ doc/mailfromd.info doc/mailfromd.info-1 doc/mailfromd.info-2 \ doc/mailfromd.info-3 doc/stamp-vti doc/version.texi dh_autoreconf override_dh_auto_configure: dh_auto_configure -- \ --localstatedir=/var/lib \ --sysconfdir=/etc/mailfromd \ DEFAULT_USER=mailfromd ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) # workaround: no texinfo/makeinfo required in nodoc mode: touch doc/stamp-vti touch doc/*info doc/*info-* endif override_dh_auto_build-arch: dh_auto_build -a ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) help2man -s 8 -n "a general-purpose mail filtering daemon" \ src/mailfromd > src/mailfromd.8 help2man -s 8 -n "a call out server" \ src/calloutd > src/calloutd.8 help2man -n "Mailfromd database management tool" \ src/mfdbtool > src/mfdbtool.1 help2man -n "MTA simulator for mailfromd" \ mtasim/mtasim > mtasim/mtasim.1 endif override_dh_auto_install-arch: dh_auto_install --destdir debian/mailfromd # Remove info files from mailfromd package (should go to mailfromd-doc): rm -rf debian/mailfromd/usr/share/info # install emacs lisp files (independently from emacs beeing installed): install -m0644 elisp/mfl-mode.el \ $(INSTDIR)/usr/share/emacs/site-lisp/mfl-mode.el install -m0644 elisp/obfemail-mode.el \ $(INSTDIR)/usr/share/emacs/site-lisp/obfemail-mode.el override_dh_auto_build-indep: ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) (cd doc; $(MAKE) manual) mv doc/manual/html_chapter doc/manual/html endif override_dh_auto_test-indep: echo "no testing when doing indep" override_dh_auto_install-indep: echo "avoid building binaries" override_dh_compress: dh_compress -X.pdf override_dh_auto_clean: dh_auto_clean rm -f src/mailfromd.8 src/calloutd.8 src/mfdbtool.1 mtasim/mtasim.1 rm -rf doc/manual rm -f doc/mailfromd.aux doc/mailfromd.cp doc/mailfromd.cps \ doc/mailfromd.fl doc/mailfromd.fn doc/mailfromd.kw \ doc/mailfromd.ky doc/mailfromd.log doc/mailfromd.mt \ doc/mailfromd.op doc/mailfromd.pg doc/mailfromd.pr \ doc/mailfromd.toc doc/mailfromd.tp doc/mailfromd.vr override_dh_clean: dh_clean # restore files overwritten by dh_autoreconf: [ ! -f debian/autoreconf.tar ] || tar xf debian/autoreconf.tar rm -f debian/autoreconf.tar