File: rules

package info (click to toggle)
dkimproxy 1.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch, wheezy
  • size: 588 kB
  • ctags: 60
  • sloc: perl: 1,322; sh: 946; makefile: 119
file content (95 lines) | stat: -rwxr-xr-x 3,391 bytes parent folder | download
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DK_PKGNAME=dkimproxy

config.status: configure
	dh_testdir
	cp -f /usr/share/misc/config.sub .
	cp -f /usr/share/misc/config.guess .
	# Note: this is quite hackish, but this is the most simple way that
	# I have found to have this package install in /usr/share/perl5
	# directly without too much trouble.
	./configure --prefix=/usr --sysconfdir=/etc

clean:
	dh_testdir
	dh_testroot
	dh_clean 

	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f config.sub config.guess
	rm -f build-stamp debian/files config.status config.cache config.log

install: config.status
	dh_testdir
	dh_testroot
	dh_prep 
	dh_installdirs

	# Add here commands to install the package into debian/$DK_PKGNAME.
	$(MAKE) DESTDIR=$(CURDIR)/debian/$(DK_PKGNAME) install

	# Remove double-defined man pages, since the upstream author generate some
	# since version 1.2
	rm debian/dkimproxy/usr/share/man/man8/dkimproxy_in.8 debian/dkimproxy/usr/share/man/man8/dkimproxy_out.8

	# I send these config files in /etc/dkimproxy even if BY DEFAULT the
	# init script doesn't use them (just in case somebody wants to
	# modify the init script)
	mv $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy_in.conf.example $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_in.conf
	mv $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy_out.conf.example $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf

	# Set the port numbers as it used to be in Lenny, and as it is for
	# Amavisd compatibility by default.
	sed -i "s/10026/10024/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_in.conf
	sed -i "s/10025/10026/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_in.conf
	sed -i "s/10028/10029/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf
	sed -i "s/10027/10028/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf

	# Default in Lenny was postfix as selector name, so we keep it
	sed -i "s/selector1/postfix/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf

	# The key is given as parameter, so we don't want it in the config file AS WELL.
	sed -i "s/keyfile/#keyfile/" $(CURDIR)/debian/$(DK_PKGNAME)/etc/dkimproxy/dkimproxy_out.conf

	# The perl libs have nothing to do in usr/lib ...
	mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/lib/* $(CURDIR)/debian/$(DK_PKGNAME)/usr/share/perl5
	rmdir $(CURDIR)/debian/$(DK_PKGNAME)/usr/lib
	mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkim_responder.pl $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkim_responder

	# These are deamons, they have nothing to do in /usr/bin !!!
	mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkimproxy.in $(CURDIR)/debian/$(DK_PKGNAME)/usr/sbin
	mv $(CURDIR)/debian/$(DK_PKGNAME)/usr/bin/dkimproxy.out $(CURDIR)/debian/$(DK_PKGNAME)/usr/sbin

	# Install the dkim default file
	install -D -m 0644 debian/defaults $(CURDIR)/debian/$(DK_PKGNAME)/etc/default/dkimproxy


binary-indep: install

	dh_testdir
	dh_testroot
	dh_installchangelogs NEWS
	dh_installdocs
	dh_installexamples
	dh_installinit
	dh_installman --language=C
	dh_link var/lib/dkimproxy/private.key etc/ssl/private/dkimproxy.key
	dh_strip
	dh_compress
	dh_fixperms
	dh_perl
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: install

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