debian/masqmail-debian

view rules @ 56:8638dc3d7bcd

added a note about `set -e' in init scripts We should work on that some day.
author meillo@marmaro.de
date Mon, 19 Jul 2010 12:25:29 +0200
parents 98e8aa5bd236
children
line source
1 #!/usr/bin/make -f
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5 DOC = usr/doc
6 MAN = usr/man
7 DAT = usr/lib
9 export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
10 export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
11 # FOR AUTOCONF 2.52 AND NEWER ONLY
12 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
13 confflags += --build $(DEB_HOST_GNU_TYPE)
14 else
15 confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
16 endif
18 build: build-stamp
19 build-stamp:
20 dh_testdir
21 dh_autotools-dev_updateconfig
23 # Add here commands to compile the package.
24 ./configure $(confflags) \
25 --prefix=/usr --mandir='$${prefix}/share/man' \
26 --datadir='$${prefix}/share' \
27 --with-logdir=/var/log/masqmail \
28 --with-spooldir=/var/spool/masqmail \
29 --with-user=mail --with-group=mail \
30 --with-confdir=/etc/masqmail \
31 --with-liblockfile \
32 --enable-auth \
33 --enable-ident \
34 --enable-maildir
35 $(MAKE)
37 touch build-stamp
39 clean:
40 dh_testdir
41 dh_testroot
42 rm -f build-stamp
44 # Add here commands to clean up after the build process.
45 [ ! -f Makefile ] || $(MAKE) clean
46 [ ! -f Makefile ] || $(MAKE) distclean
47 rm -f config.log
49 dh_autotools-dev_restoreconfig
50 dh_clean
52 install: build
53 dh_testdir
54 dh_testroot
55 dh_prep
56 dh_installdirs
58 # Add here commands to install the package into debian/masqmail.
59 $(MAKE) DESTDIR=`pwd`/debian/masqmail install
60 rmdir debian/masqmail/var/spool/masqmail/input \
61 debian/masqmail/var/spool/masqmail/lock \
62 debian/masqmail/var/spool/masqmail/popuidl \
63 debian/masqmail/var/spool/masqmail debian/masqmail/var/spool \
64 debian/masqmail/var/log/masqmail debian/masqmail/var/log
66 rm -f debian/masqmail/usr/bin/expandtest debian/masqmail/usr/bin/readtest
67 install -m 755 debian/newaliases debian/masqmail/usr/bin/.
68 install -m 755 debian/masqmail.ip-up debian/masqmail/etc/ppp/ip-up.d/1masqmail
69 install -m 755 debian/masqmail.ip-up debian/masqmail/etc/network/if-up.d/1masqmail
70 install -m 755 debian/masqmail.ip-up debian/masqmail/etc/ppp/ip-down.d/99masqmail
71 install -m 755 debian/masqmail.ip-up debian/masqmail/etc/network/if-down.d/99masqmail
73 install -m 644 debian/masqmail.logrotate debian/masqmail/etc/logrotate.d/masqmail
76 # Build architecture-independent files here.
77 binary-indep: build install
78 # We have nothing to do by default.
80 # Build architecture-dependent files here.
81 binary-arch: build install
82 cp debian/masqmail.lintian debian/masqmail/usr/share/lintian/overrides/masqmail
83 # dh_testversion
84 dh_testdir
85 dh_testroot
86 dh_installdebconf
87 dh_installdocs
88 rm -f debian/masqmail/usr/share/doc/masqmail/INSTALL
89 ##cp -r docs debian/masqmail/$(DOC)/masqmail/html
90 dh_installexamples examples/*
91 # dh_installmenu
92 # dh_installemacsen
93 dh_installinit
94 # dh_installcron
95 dh_installman debian/mailq.8 debian/mailrm.8 debian/newaliases.8 debian/sendmail.8
96 # dh_undocumented
97 dh_installchangelogs ChangeLog
98 dh_link
99 dh_strip
100 dh_compress
101 dh_fixperms -X/usr/sbin/masqmail
102 dh_installdeb
103 dh_shlibdeps
104 dh_gencontrol
105 # dh_makeshlibs
106 dh_md5sums
107 dh_builddeb
109 source diff:
110 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
112 binary: binary-indep binary-arch
113 .PHONY: build clean binary-indep binary-arch binary install