]> git.ipfire.org Git - people/ms/dma.git/blob - debian/rules
Makefile: create spool directories in a separate target
[people/ms/dma.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Debian build rules for dma, the DragonFly mail agent
4
5 DDIR= $(CURDIR)/debian
6 D= $(DDIR)/dma
7
8 BUILDDEFS= DESTDIR=$D PREFIX=/usr CONFDIR=/etc
9
10 CFLAGS:= $(shell dpkg-buildflags --get CFLAGS)
11 CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS)
12 LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS)
13
14 CONFFILES= dma.conf auth.conf
15
16 ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS)))
17 CFLAGS+= -Werror
18 endif
19 ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
20 export STRIPFLAG=
21 endif
22 ifneq (,$(filter hardening,$(DEB_BUILD_OPTIONS)))
23 export DEB_BUILD_HARDENING=1
24 else
25 export DEB_BUILD_HARDENING=0
26 endif
27
28 export CFLAGS CPPFLAGS LDFLAGS
29
30 override_dh_auto_build:
31 $(MAKE) -f Makefile ${BUILDDEFS}
32 $(MAKE) -C $(DDIR)/migrate
33
34 override_dh_auto_clean:
35 $(MAKE) -f Makefile clean
36 $(MAKE) -C $(DDIR)/migrate clean
37
38 override_dh_auto_install:
39 $(MAKE) -f Makefile ${BUILDDEFS} install sendmail-link install-spool-dirs
40 install -o root -g mail -m 644 dma.conf $D/etc/dma
41 install -o root -g mail -m 640 auth.conf $D/etc/dma
42
43 override_dh_fixperms:
44 dh_fixperms -Xusr/sbin/dma -Xusr/lib/dma-mbox-create -Xvar/spool/dma -Xetc/dma
45
46 override_dh_installchangelogs:
47 dh_installchangelogs -p dma
48 dh_installchangelogs -p dma-migrate debian/migrate/NEWS
49
50 %:
51 dh $@