]> git.ipfire.org Git - people/ms/dma.git/blob - rules
Merge trunk rev. 5084 (branches/debian/ rev. 5086) -
[people/ms/dma.git] / 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 CFLAGS= $(shell dpkg-buildflags --get CFLAGS)
9 CPPFLAGS= $(shell dpkg-buildflags --get CPPFLAGS)
10 LDFLAGS= $(shell dpkg-buildflags --get LDFLAGS)
11
12 CFLAGS+= -DNEED_GETPROGNAME -DNEED_REALLOCF -DNEED_STRLCPY
13
14 CONFFILES= auth.conf dma.conf virtusertable
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.plain
32 $(MAKE) -C $(DDIR)/migrate
33
34 override_dh_auto_clean:
35 $(MAKE) -f Makefile.plain clean
36 $(MAKE) -C $(DDIR)/migrate clean
37
38 override_dh_auto_install:
39 $(MAKE) -f Makefile.plain DESTDIR=$D PREFIX=/usr CONFDIR=/etc install
40 install -d -o root -g mail -m 770 $D/var/spool/dma
41 install -o root -g mail -m 640 $(CONFFILES) $D/etc/dma
42
43 override_dh_fixperms:
44 dh_fixperms -Xusr/sbin/dma -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 $@