]>
Commit | Line | Data |
---|---|---|
fa8d8158 PP |
1 | #!/usr/bin/make -f |
2 | # -*- makefile -*- | |
3 | # Debian build rules for dma, the DragonFly mail agent | |
4 | ||
5 | include /usr/share/quilt/quilt.make | |
6 | ||
7 | PACKAGE= dma | |
8 | VERSION = `sed -e 's/^[^ ]\+ (\([^)]\+\)).*/\1/; 1q' debian/changelog` | |
9 | VERSION_UP = `sed -e 's/^[^ ]\+ (0\.0\.\([^)-]\+\).*/\1/; 1q' debian/changelog | tr . -` | |
10 | VERSION_ADD ?= -debian-01 | |
11 | ||
fa8d8158 PP |
12 | ifneq (,$(filter werror,$(DEB_BUILD_OPTIONS))) |
13 | CFLAGS+= -Werror | |
14 | endif | |
15 | ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) | |
16 | export STRIPFLAG= | |
17 | endif | |
fe8651ad PP |
18 | ifeq (,$(filter nohardening,$(DEB_BUILD_OPTIONS))) |
19 | export DEB_BUILD_HARDENING=1 | |
20 | else | |
21 | export DEB_BUILD_HARDENING=0 | |
22 | endif | |
fa8d8158 PP |
23 | |
24 | export CFLAGS | |
25 | ||
26 | diffsrc: | |
27 | -diff -urN -x .svn debian/ ../svn/${PACKAGE}/tags/${PACKAGE}-${VERSION}${VERSION_ADD}/ | |
28 | -diff -urN -x .svn -x debian -x .pc -I'\$$Ringlet.*\$$' ./ ../svn/${PACKAGE}/tags/${PACKAGE}-dfly-${VERSION_UP}/ | |
29 | ||
30 | build: build-stamp | |
31 | build-stamp: ${QUILT_STAMPFN} | |
e8b709c5 | 32 | dh build --before auto_build |
fa8d8158 | 33 | pmake |
e8b709c5 | 34 | dh build --after auto_build |
fa8d8158 PP |
35 | touch $@ |
36 | ||
37 | clean: | |
e8b709c5 | 38 | dh clean --before auto_clean |
fa8d8158 | 39 | pmake clean |
e8b709c5 | 40 | dh clean --after auto_clean --before dh_clean |
fa8d8158 | 41 | $(MAKE) -f debian/rules unpatch |
e8b709c5 | 42 | dh clean --remaining |
fa8d8158 PP |
43 | |
44 | install: build | |
e8b709c5 | 45 | dh install --before auto_install |
fa8d8158 | 46 | pmake DESTDIR=$(CURDIR)/debian/$(PACKAGE) BINDIR=/usr/sbin install |
fa8d8158 | 47 | install -d -o root -g mail -m 770 $(CURDIR)/debian/$(PACKAGE)/var/spool/dma |
9f3344b7 | 48 | dh install --after auto_install --before fixperms |
fa8d8158 | 49 | dh_fixperms -Xusr/sbin/dma -Xvar/spool/dma |
e8b709c5 | 50 | dh install --after fixperms |
e8b84071 PP |
51 | |
52 | # Build architecture-independent files here. | |
53 | binary-indep: build install | |
54 | # We have nothing to do by default. | |
55 | ||
56 | # Build architecture-dependent files here. | |
57 | binary-arch: build install | |
e8b709c5 | 58 | dh binary-arch |
fa8d8158 PP |
59 | |
60 | binary: binary-indep binary-arch | |
61 | .PHONY: build clean binary-indep binary-arch binary install |