]>
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 | |
d84c3daa | 8 | BUILDDEFS= DESTDIR=$D PREFIX=/usr |
b76223c3 | 9 | |
196e2352 PP |
10 | CFLAGS:= $(shell dpkg-buildflags --get CFLAGS) |
11 | CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS) | |
12 | LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS) | |
ed951b75 | 13 | |
c956cef9 | 14 | CONFFILES= dma.conf auth.conf |
c93eab2b | 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: |
b76223c3 | 31 | $(MAKE) -f Makefile ${BUILDDEFS} |
c93eab2b | 32 | $(MAKE) -C $(DDIR)/migrate |
fa8d8158 | 33 | |
c0f546fc | 34 | override_dh_auto_clean: |
c956cef9 | 35 | $(MAKE) -f Makefile clean |
c93eab2b | 36 | $(MAKE) -C $(DDIR)/migrate clean |
fa8d8158 | 37 | |
c0f546fc | 38 | override_dh_auto_install: |
d84c3daa | 39 | $(MAKE) -f Makefile ${BUILDDEFS} install sendmail-link mailq-link install-spool-dirs install-etc |
e8b84071 | 40 | |
c0f546fc | 41 | override_dh_fixperms: |
b76223c3 | 42 | dh_fixperms -Xusr/sbin/dma -Xusr/lib/dma-mbox-create -Xvar/spool/dma -Xetc/dma |
fa8d8158 | 43 | |
05034932 PP |
44 | override_dh_installchangelogs: |
45 | dh_installchangelogs -p dma | |
46 | dh_installchangelogs -p dma-migrate debian/migrate/NEWS | |
47 | ||
c0f546fc | 48 | %: |
c02e3a2f | 49 | dh $@ |