File: rules

package info (click to toggle)
mailfromd 9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,268 kB
  • sloc: ansic: 56,643; sh: 22,791; yacc: 4,130; lex: 1,428; makefile: 914; lisp: 488; awk: 393; perl: 319; sed: 25
file content (100 lines) | stat: -rwxr-xr-x 3,234 bytes parent folder | download
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
98
99
100
#!/usr/bin/make -f
#
# (c) 2021-2023 Roland Rosenfeld <roland@debian.org>
# 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/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 \
		doc/mailfromd.info doc/mailfromd.info-1 doc/mailfromd.info-2 \
		doc/mailfromd.info-3 doc/stamp-vti doc/version.texi \
		build-aux/ltmain.sh m4/libtool.m4 m4/ltoptions.m4 \
		m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 \
		mfmod/Makefile.in src/lex.c
	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
	help2man -n "creates a Mfmod Structure" \
		mfmod/mfmodnew > mfmod/mfmodnew.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 \
		doc/otherdoc.texi mfmod/mfmodnew.1

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