4 # Uncomment this to turn on verbose mode.
7 # This has to be exported to make some magic below work.
10 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
11 DEBUG = --enable-debug
16 # These variable is used only by get-orig-source, which will normally only be
20 URL = http://shibboleth.internet2.edu/downloads/shibboleth/cppsp
22 # Download the upstream source and do the repackaging that we have to do for
23 # DFSG reasons. Depends on wget.
25 wget $(URL)/$(VERSION)/shibboleth-sp-$(VERSION).tar.gz
26 tar xfz shibboleth-sp-$(VERSION).tar.gz
27 rm shibboleth-sp-$(VERSION).tar.gz
28 rm shibboleth-$(VERSION)/schemas/WS-Trust.xsd
29 mv shibboleth-$(VERSION) shibboleth-sp_$(VERSION).$(DEBVERS).orig
30 tar cf shibboleth-sp2_$(VERSION).$(DEBVERS).orig.tar \
31 shibboleth-sp_$(VERSION).$(DEBVERS).orig
32 rm -r shibboleth-sp_$(VERSION).$(DEBVERS).orig
33 gzip -9 shibboleth-sp_$(VERSION).$(DEBVERS).orig.tar
35 # Tell Autoconf the correct system types.
36 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
37 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
38 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
39 SYSTEM = --build $(DEB_HOST_GNU_TYPE)
41 SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
44 configure: configure-stamp
47 cp /usr/share/misc/config.guess config.guess
48 cp /usr/share/misc/config.sub config.sub
49 CFLAGS="$(CFLAGS)" ./configure --enable-apache-22 \
50 --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
51 --disable-dependency-tracking $(SYSTEM) $(DEBUG)
54 build: build-arch build-indep
55 build-arch: build-stamp
57 build-stamp: configure-stamp
65 rm -f configure-stamp build-stamp install-stamp
66 [ ! -f Makefile ] || $(MAKE) distclean
67 dh_clean config.guess config.sub
69 install: install-stamp
74 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
75 rm -r $(CURDIR)/debian/tmp/usr/share/doc/shibboleth
76 rm $(CURDIR)/debian/tmp/etc/shibboleth/*.{dist,config}
77 rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-redhat
78 chmod +x $(CURDIR)/debian/tmp/etc/shibboleth/keygen.sh
79 mv $(CURDIR)/debian/tmp/etc/shibboleth/shibd-debian $(CURDIR)/debian/libapache2-mod-shib2.shibd.init
81 mv $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.so $(CURDIR)/debian/libapache2-mod-shib2/usr/lib/apache2/modules
82 rm $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.la
83 pod2man $(CURDIR)/debian/shibd.pod --section 8 --center 'Shibboleth' --release 2.0 \
84 $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man8/shibd.8
85 dh_install -s -i --fail-missing
88 binary: binary-arch binary-indep
89 binary-arch: DH_OPTIONS=-a
90 binary-arch: install-stamp
94 dh_installdocs -A doc/NOTICE.txt doc/CREDITS.txt doc/README.txt doc/RELEASE.txt
95 dh_installinit --name=shibd
106 binary-indep: DH_OPTIONS=-i
107 binary-indep: install-stamp
111 dh_installdocs -A doc/NOTICE.txt doc/CREDITS.txt doc/README.txt doc/RELEASE.txt
119 .PHONY: binary binary-arch binary-indep build build-arch build-indep clean