File: rules

package info (click to toggle)
dovecot-antispam 2.0%2B20171229-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 220 kB
  • sloc: ansic: 3,156; makefile: 91; sh: 14
file content (61 lines) | stat: -rwxr-xr-x 1,159 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/make -f
#
# Copyright 2003 - 2018, Ron Lee.

SHELL = /bin/bash

DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

clean:
	dh_testdir
	$(MAKE) clean || true
	$(RM) .config dovecot-antispam.7
	dh_clean


build: build-arch
build-arch: lib90_antispam_plugin.so
build-indep:

lib90_antispam_plugin.so:
	dh_testdir
	cp -f defconfig .config
	$(MAKE) CC="$(DEB_HOST_GNU_TYPE)-gcc" CFLAGS="-O2 -g"


install: install-arch

install-arch: build-arch
	dh_testdir
	dh_testroot
	dh_prep
	dh_install lib90_antispam_plugin.so usr/lib/dovecot/modules
	ln -sf antispam.7 dovecot-antispam.7
	dh_installman dovecot-antispam.7

install-indep: build-indep


binary: binary-arch

binary-arch: DOVECOT_ABI_VERSION = $(shell cat /usr/share/dovecot/dovecot-abi)
binary-arch: install-arch
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol -- -V'dovecot:ABI-Version=$(DOVECOT_ABI_VERSION)'
	dh_md5sums
	dh_builddeb

binary-indep: install-indep


.PHONY: clean build build-arch build-indep	\
	binary binary-arch binary-indep		\
	install install-arch install-indep