/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release
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
#!/usr/bin/make -f

ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
    MAKEFLAGS += OPTIMIZE=-O0
endif

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    MAKEFLAGS += -j$(NUMJOBS)
endif

PKG_CONFIG?=pkg-config

%:
	dh $@

override_dh_installdirs-indep:
	dh_installdirs
	dh_installdirs $(patsubst /%,%,$(shell $(PKG_CONFIG) \
		systemd --variable=systemdsystemunitdir))

override_dh_auto_build-arch:
	LC_ALL=en_US.utf8 dh_auto_build -- all doc

override_dh_auto_build-indep:
	LC_ALL=en_US.utf8 dh_auto_build -- doc

override_dh_installinit-indep:
	dh_installinit --onlyscripts \
		--update-rcd-params="defaults 25 15"

override_dh_auto_install-indep:
	$(MAKE) DESTDIR=$(CURDIR)/debian/mandos install-server

override_dh_auto_install-arch:
	$(MAKE) DESTDIR=$(CURDIR)/debian/mandos-client \
		install-client-nokey

override_dh_fixperms-arch:
	dh_fixperms --exclude etc/keys/mandos \
		--exclude etc/mandos/plugins.d \
		--exclude etc/mandos/plugin-helpers \
		--exclude usr/lib/$(DEB_HOST_MULTIARCH)/mandos/plugins.d \
		--exclude usr/lib/$(DEB_HOST_MULTIARCH)/mandos/plugin-helpers \
		--exclude usr/share/doc/mandos-client/examples/network-hooks.d/
	chmod --recursive g-w -- \
	"$(CURDIR)/debian/mandos-client/usr/share/doc/mandos-client/examples/network-hooks.d"

override_dh_fixperms-indep:
	dh_fixperms --exclude etc/mandos/clients.conf

override_dh_auto_test-arch: ;

#bpo## dpkg-shlibdeps sees the "libgnutls28-dev (>= 3.6.6) |
#bpo## libgnutls28-dev (<< 3.6.0)," in the build-dependencies not as two
#bpo## alternatives, but as an absolute dependency on libgnutls30 >= 3.6.6.
#bpo## So we have to do this ugly hack to hide this build dependency if we
#bpo## compiled with libgnutls30 << 3.6.0.
#bpo#override_dh_shlibdeps-arch:
#bpo#	-gnutls_version=$$(dpkg-query --showformat='$${Version}' \
#bpo#		--show libgnutls30); \
#bpo#	dpkg --compare-versions $$gnutls_version lt 3.6.0 \
#bpo#		&& { cp --archive debian/control debian/control.orig; sed --in-place --expression='s/libgnutls28-dev (>= 3\.6\.6) |//' debian/control; }
#bpo#	dh_shlibdeps
#bpo#	-gnutls_version=$$(dpkg-query --showformat='$${Version}' \
#bpo#		--show libgnutls30); \
#bpo#	dpkg --compare-versions $$gnutls_version lt 3.6.0 \
#bpo#		&& mv debian/control.orig debian/control