File: old.make.rules

package info (click to toggle)
maildrop 1.3.7-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,776 kB
  • ctags: 2,107
  • sloc: ansic: 17,156; cpp: 9,694; makefile: 641; sh: 605; perl: 454
file content (72 lines) | stat: -rw-r--r-- 2,180 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
#!/usr/bin/make -f

export DH_COMPAT=2
tmp := $(CURDIR)/debian/maildrop

CFLAGS := -O2 -D_GNU_SOURCE
ifneq "$(findstring debug,$(DEB_BUILD_OPTIONS))" ""
CFLAGS += -g
endif

build: stamp-build
stamp-build:
	dh_testdir
#	trust on the auto-detect of qmail failing (for sendmail compability)
	CPPFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
	  --mandir='$${prefix}/share/man' --libexecdir='$${prefix}/lib/maildrop' \
	  --enable-use-dotlock=1 --enable-use-flock=0 \
	  --enable-sendmail=/usr/sbin/sendmail --enable-maildirquota
	$(MAKE)
	touch $@

clean:
	dh_testdir
	dh_testroot
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -rf .deps
	dh_clean stamp-build

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs usr/bin usr/sbin usr/share/doc/maildrop etc
	$(MAKE) DESTDIR=$(tmp) install
# we use update-alternatives to manage these, because they're shared
# by other packages, notably qmail, courier-imap, mutt, mush
	cd $(tmp)/usr/bin && mv maildirmake maildirmake.maildrop
	cd $(tmp)/usr/bin && mv dotlock dotlock.maildrop
	cd $(tmp)/usr/bin && mv deliverquota ../sbin/deliverquota.maildrop
	cd $(tmp)/usr/share/man/man1 && mv maildirmake.1 maildirmake.maildrop.1
	cd $(tmp)/usr/share/man/man8 && mv deliverquota.8 deliverquota.maildrop.8
	cd $(tmp)/usr/share/man/man1 && mv dotlock.1 dotlock.maildrop.1
	install -m 644 -p debian/maildroprc $(tmp)/etc
	find $(tmp)/usr -type d -empty | xargs -r rmdir -p --ignore-fail-on-non-empty

binary-indep:
# We have nothing to do here.

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs README README.html AUTHORS INSTALL INSTALL.html maildroptips.txt
	dh_installchangelogs ChangeLog
	dh_installmanpages maildirmake.1 dotlock.1 deliverquota.8 maildirquota.8 maildirquota.7
# NB PAM config installed manually
#	dh_installpam
ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
	dh_strip
endif
	dh_compress
	dh_fixperms
	cd $(tmp)/usr/bin && chgrp mail maildrop dotlock.maildrop
	cd $(tmp)/usr/bin && chmod g+s maildrop dotlock.maildrop
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean install binary-indep binary-arch binary