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