File: rules

package info (click to toggle)
shibboleth-sp2 2.6.0%2Bdfsg1-4%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 7,896 kB
  • sloc: cpp: 39,404; sh: 11,726; makefile: 866; xml: 371; ansic: 35
file content (86 lines) | stat: -rwxr-xr-x 3,010 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
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
#!/usr/bin/make -f

# Enable compiler hardening flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    DEBUG = --enable-debug
else
    DEBUG =
endif

ifneq ($(wildcard /usr/include/systemd/sd-daemon.h),)
    enable-systemd = --enable-systemd
else
    remove-service = shibd-systemd
endif

# Download the upstream source and do the repackaging that we have to do for
# DFSG reasons.  Depends on devscripts.  Mostly a reminder until devscripts
# version 2.15.10 enables setting these options in the watch file.
get-orig-source:
	uscan --repack --compression=xz --destdir='$(CURDIR)'

%:
	dh $@ --parallel --with apache2,autoreconf,systemd

override_dh_auto_configure:
	dh_auto_configure -- \
	    --enable-apache-24 --with-apxs24=/usr/bin/apxs2 \
	    $(enable-systemd) \
	    --with-memcached --with-fastcgi --with-gssapi $(DEBUG)

override_dh_auto_install:
	NOKEYGEN=1 dh_auto_install

docdir = debian/tmp/usr/share/doc/shibboleth-*
override_dh_install:
	# The necessary documentation files are installed in each binary
	# package by dh_installdocs below.
	cd $(docdir) && \
	    rm CREDITS.txt LICENSE.txt NOTICE.txt README.txt RELEASE.txt \
	       FASTCGI.LICENSE OPENSSL.LICENSE LOG4CPP.LICENSE
	# The tag file is unreproducible (it captures the full build path),
	# but is used as a "stamp" file during the build.
	cd $(docdir) && rm -f api/shibboleth.tag api/html/*.md5 api/html/*.map
	cd debian/tmp/etc/shibboleth && \
	    rm *.dist *.config shibd-amazon shibd-osx.plist shibd-redhat shibd-suse \
	       $(remove-service)
	mkdir -p debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/shibsp
	mv debian/tmp/usr/include/shibsp/paths.h \
	    debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/shibsp/
	dh_install --list-missing
# This really should be --fail-missing, but #831786 made it impossible.
# If no better solution emerges, I'd prefer backing out of using dh-exec.

UTIL_MANS:=$(patsubst %,debian/%, \
    mdquery.1 resolvertest.1 shib-metagen.1 shib-keygen.8 shibd.8)

debian/%: debian/man-pages/%.pod
	pod2man --section '$(subst .,,$(suffix $@))' --center Shibboleth \
		--release '$(word 3,$(shell ./config.status --version))' $< $@

override_dh_installman: $(UTIL_MANS)
	dh_installman -p shibboleth-sp2-utils $(UTIL_MANS)

override_dh_installdocs:
	dh_installdocs -A doc/NOTICE.txt doc/CREDITS.txt doc/RELEASE.txt doc/README.txt

override_dh_installinit:
# dh_installinit does not find the init script installed by dh_install,
# so we have to handle default+tmpfile and the maintainer scripts separately
	dh_installinit -p shibboleth-sp2-utils --name=shibd --noscripts
	dh_installinit -p shibboleth-sp2-utils --name=shibd --onlyscripts

override_dh_fixperms-arch:
	dh_fixperms
	chown www-data debian/libapache2-mod-shib2/var/log/shibboleth-www

override_dh_makeshlibs:
	dh_makeshlibs -Xusr/lib/$(DEB_HOST_MULTIARCH)/shibboleth

override_dh_clean:
	dh_clean
	rm -f $(UTIL_MANS)