| 1 |
#!/usr/bin/make -f |
| 2 |
# $Id$ |
| 3 |
|
| 4 |
PERL=perl |
| 5 |
|
| 6 |
clean: |
| 7 |
dh_testdir |
| 8 |
dh_testroot |
| 9 |
dh_auto_clean |
| 10 |
dh_clean |
| 11 |
|
| 12 |
configure: |
| 13 |
dh_testdir |
| 14 |
$(PERL) Makefile.PL INSTALLDIRS=vendor |
| 15 |
|
| 16 |
build: build-arch build-indep |
| 17 |
build-arch: build-stamp |
| 18 |
build-indep: build-stamp |
| 19 |
build-stamp: configure |
| 20 |
dh_testdir |
| 21 |
dh_prep |
| 22 |
$(MAKE) |
| 23 |
|
| 24 |
install: build |
| 25 |
dh_testdir |
| 26 |
dh_testroot |
| 27 |
dh_installdirs |
| 28 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/qpsmtpd |
| 29 |
# Comment out this line to omit the usual deletion of the qpsmtpd |
| 30 |
# tcpserver-based toplevel script. The standard install uses |
| 31 |
# qpsmtpd-forkserver to avoid a non-free dependency on tcpserver. |
| 32 |
rm -f $(CURDIR)/debian/qpsmtpd/usr/bin/qpsmtpd |
| 33 |
# Comment out this line to omit the usual deletion of qpsmtpd-async, |
| 34 |
# which is included in the main qpsmtpd distribution as of 0.94 but |
| 35 |
# is abandoned upstream and has since been removed from upstream git. |
| 36 |
rm -f $(CURDIR)/debian/qpsmtpd/usr/bin/qpsmtpd-async |
| 37 |
# /var/spool/qpsmtpd will be chown'ed by postinst |
| 38 |
install -m 700 -d $(CURDIR)/debian/qpsmtpd/var/spool/qpsmtpd |
| 39 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/var/log/qpsmtpd |
| 40 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/var/lib/qpsmtpd |
| 41 |
# greylist db dir will be chown'ed by postinst |
| 42 |
install -m 700 -d $(CURDIR)/debian/qpsmtpd/var/lib/qpsmtpd/greylisting |
| 43 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/etc/qpsmtpd |
| 44 |
# install the configuration |
| 45 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/etc/qpsmtpd |
| 46 |
cp -a $(CURDIR)/debian/etc/* $(CURDIR)/debian/qpsmtpd/etc/qpsmtpd/ |
| 47 |
# install the plugins |
| 48 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/usr/share/qpsmtpd/plugins |
| 49 |
cp -a $(CURDIR)/plugins/* $(CURDIR)/debian/qpsmtpd/usr/share/qpsmtpd/plugins/ |
| 50 |
# install the helper that qpsmtpd.service starts |
| 51 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/usr/libexec/qpsmtpd |
| 52 |
install -m 755 debian/qpsmtpd-start \ |
| 53 |
$(CURDIR)/debian/qpsmtpd/usr/libexec/qpsmtpd/qpsmtpd-start |
| 54 |
# install lintian overrides |
| 55 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/usr/share/lintian/overrides |
| 56 |
install -m 644 debian/qpsmtpd.lintian $(CURDIR)/debian/qpsmtpd/usr/share/lintian/overrides/qpsmtpd |
| 57 |
# install documentation POD |
| 58 |
install -m 755 -d $(CURDIR)/debian/qpsmtpd/usr/share/doc/qpsmtpd |
| 59 |
cp -a $(CURDIR)/docs/* $(CURDIR)/debian/qpsmtpd/usr/share/doc/qpsmtpd |
| 60 |
cp -a $(CURDIR)/UPGRADING.pod $(CURDIR)/debian/qpsmtpd/usr/share/doc/qpsmtpd |
| 61 |
# remove pf2qp.pl, used to generate Constants.pm in upstream SVN |
| 62 |
rm -f $(CURDIR)/debian/qpsmtpd/usr/share/perl5/Qpsmtpd/Postfix/pf2qp.pl |
| 63 |
|
| 64 |
binary-arch: build install |
| 65 |
# nothing arch-dependent |
| 66 |
|
| 67 |
binary-indep: build install |
| 68 |
dh_testdir |
| 69 |
dh_testroot |
| 70 |
dh_cruft |
| 71 |
dh_installdocs $(CURDIR)/debian/README.check_plugins |
| 72 |
dh_installman \ |
| 73 |
$(CURDIR)/debian/qpsmtpd-forkserver.8 \ |
| 74 |
$(CURDIR)/debian/qpsmtpd-prefork.8 |
| 75 |
dh_installdebconf |
| 76 |
dh_installlogrotate |
| 77 |
dh_installchangelogs Changes |
| 78 |
# Nothing is started here, as qpsmtpd wants port 25 and the init |
| 79 |
# script's ENABLED gate no longer applies once invoke-rc.d resolves to |
| 80 |
# the unit. postinst enables it to match the debconf answer |
| 81 |
dh_installinit --no-start |
| 82 |
dh_installsystemd --no-enable --no-start |
| 83 |
dh_link |
| 84 |
dh_compress |
| 85 |
dh_fixperms |
| 86 |
dh_installdeb |
| 87 |
dh_perl |
| 88 |
# until qpsmtpd-async is supported |
| 89 |
rm -f $(CURDIR)/debian/qpsmtpd/usr/share/man/man1/qpsmtpd-async.1p.gz |
| 90 |
dh_shlibdeps |
| 91 |
dh_gencontrol |
| 92 |
dh_md5sums |
| 93 |
dh_builddeb |
| 94 |
|
| 95 |
binary: binary-indep binary-arch |
| 96 |
.PHONY: clean build binary-indep binary-arch binary |
| 97 |
|
| 98 |
# vi:set noexpandtab: |