]>
Commit | Line | Data |
---|---|---|
fa8d8158 PP |
1 | #!/usr/bin/make -f |
2 | # -*- makefile -*- | |
3 | # Debian build rules for dma, the DragonFly mail agent | |
4 | ||
c93eab2b PP |
5 | DDIR= $(CURDIR)/debian |
6 | D= $(DDIR)/dma | |
fa8d8158 | 7 | |
ed951b75 PP |
8 | CFLAGS= $(shell dpkg-buildflags --get CFLAGS) |
9 | CPPFLAGS= $(shell dpkg-buildflags --get CPPFLAGS) | |
10 | LDFLAGS= $(shell dpkg-buildflags --get LDFLAGS) | |
11 | ||
d2c54242 PP |
12 | CFLAGS+= -DNEED_GETPROGNAME -DNEED_REALLOCF -DNEED_STRLCPY |
13 | ||
c93eab2b PP |
14 | CONFFILES= auth.conf dma.conf virtusertable |
15 | ||
fa8d8158 PP |
16 | ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS))) |
17 | CFLAGS+= -Werror | |
18 | endif | |
19 | ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) | |
20 | export STRIPFLAG= | |
21 | endif | |
4054aa20 | 22 | ifneq (,$(filter hardening,$(DEB_BUILD_OPTIONS))) |
fe8651ad PP |
23 | export DEB_BUILD_HARDENING=1 |
24 | else | |
25 | export DEB_BUILD_HARDENING=0 | |
26 | endif | |
fa8d8158 | 27 | |
ed951b75 | 28 | export CFLAGS CPPFLAGS LDFLAGS |
fa8d8158 | 29 | |
c0f546fc | 30 | override_dh_auto_build: |
d2c54242 | 31 | $(MAKE) -f Makefile.plain |
c93eab2b | 32 | $(MAKE) -C $(DDIR)/migrate |
fa8d8158 | 33 | |
c0f546fc | 34 | override_dh_auto_clean: |
d2c54242 | 35 | $(MAKE) -f Makefile.plain clean |
c93eab2b | 36 | $(MAKE) -C $(DDIR)/migrate clean |
fa8d8158 | 37 | |
c0f546fc | 38 | override_dh_auto_install: |
c93eab2b PP |
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 | |
e8b84071 | 42 | |
c0f546fc | 43 | override_dh_fixperms: |
22cd1cd7 | 44 | dh_fixperms -Xusr/sbin/dma -Xvar/spool/dma -Xetc/dma |
fa8d8158 | 45 | |
05034932 PP |
46 | override_dh_installchangelogs: |
47 | dh_installchangelogs -p dma | |
48 | dh_installchangelogs -p dma-migrate debian/migrate/NEWS | |
49 | ||
c0f546fc | 50 | %: |
c02e3a2f | 51 | dh $@ |