diff options
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000000000..461a0a8503f62 --- /dev/null +++ b/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Debian build rules for dma, the DragonFly mail agent + +DDIR= $(CURDIR)/debian +D= $(DDIR)/dma + +BUILDDEFS= DESTDIR=$D PREFIX=/usr + +CFLAGS:= $(shell dpkg-buildflags --get CFLAGS) +CPPFLAGS:= $(shell dpkg-buildflags --get CPPFLAGS) +LDFLAGS:= $(shell dpkg-buildflags --get LDFLAGS) + +CONFFILES= dma.conf auth.conf + +ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS))) + CFLAGS+= -Werror +endif +ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) + export STRIPFLAG= +endif +ifneq (,$(filter hardening,$(DEB_BUILD_OPTIONS))) +export DEB_BUILD_HARDENING=1 +else +export DEB_BUILD_HARDENING=0 +endif + +export CFLAGS CPPFLAGS LDFLAGS + +override_dh_auto_build: + $(MAKE) -f Makefile ${BUILDDEFS} + $(MAKE) -C $(DDIR)/migrate + +override_dh_auto_clean: + $(MAKE) -f Makefile clean + $(MAKE) -C $(DDIR)/migrate clean + +override_dh_auto_install: + $(MAKE) -f Makefile ${BUILDDEFS} install sendmail-link mailq-link install-spool-dirs install-etc + +override_dh_fixperms: + dh_fixperms -Xusr/sbin/dma -Xusr/lib/dma-mbox-create -Xvar/spool/dma -Xetc/dma + +override_dh_installchangelogs: + dh_installchangelogs -p dma + dh_installchangelogs -p dma-migrate debian/migrate/NEWS + +%: + dh $@ |