4 # Uncomment this to turn on verbose mode.
7 # This has to be exported to make some magic below work.
12 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
13 DEBUG = --enable-debug
18 # Tell Autoconf the correct system types.
19 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
20 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
21 ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
22 SYSTEM = --build $(DEB_HOST_GNU_TYPE)
24 SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
27 # These variable is used only by get-orig-source, which will normally only be
31 URL = http://shibboleth.internet2.edu/downloads/shibboleth/cppsp
33 # Download the upstream source and do the repackaging that we have to do for
34 # DFSG reasons. Depends on wget.
36 wget $(URL)/$(VERSION)/shibboleth-sp-$(VERSION).tar.gz
37 tar xfz shibboleth-sp-$(VERSION).tar.gz
38 rm shibboleth-sp-$(VERSION).tar.gz
39 rm shibboleth-$(VERSION)/schemas/WS-Trust.xsd
40 mv shibboleth-$(VERSION) shibboleth-sp2_$(VERSION).$(DEBVERS).orig
41 tar cf shibboleth-sp2_$(VERSION).$(DEBVERS).orig.tar \
42 shibboleth-sp2_$(VERSION).$(DEBVERS).orig
43 rm -r shibboleth-sp2_$(VERSION).$(DEBVERS).orig
44 gzip -9 shibboleth-sp2_$(VERSION).$(DEBVERS).orig.tar
46 configure: configure-stamp
49 cp /usr/share/misc/config.guess config.guess
50 cp /usr/share/misc/config.sub config.sub
55 CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --prefix=/usr \
56 --sysconfdir=/etc --libexecdir=/usr/lib/shibboleth \
57 --localstatedir=/var --enable-apache-22 \
58 --with-apxs2=/usr/bin/apxs2 --disable-dependency-tracking \
62 build: build-arch build-indep
63 build-arch: build-stamp
65 build-stamp: configure-stamp
73 rm -f configure-stamp build-stamp install-stamp
74 [ ! -f Makefile ] || $(MAKE) distclean
75 find . -name Makefile.in -print0 | xargs -0r rm
76 dh_clean aclocal.m4 config.h config.h.in config.status configure \
77 config.guess config.sub libtool.m4 ltmain.sh \
78 debian/libapache2-mod-shib2.shibd.init
80 install: install-stamp
85 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
86 rm -r $(CURDIR)/debian/tmp/usr/share/doc/shibboleth
87 rm $(CURDIR)/debian/tmp/etc/shibboleth/*.dist
88 rm $(CURDIR)/debian/tmp/etc/shibboleth/*.config
89 rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-osx.plist
90 rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-redhat
91 rm $(CURDIR)/debian/tmp/etc/shibboleth/sp-*.pem
92 chmod +x $(CURDIR)/debian/tmp/etc/shibboleth/keygen.sh
93 mv $(CURDIR)/debian/tmp/etc/shibboleth/keygen.sh \
94 $(CURDIR)/debian/tmp/usr/sbin/shib-keygen
95 mv $(CURDIR)/debian/tmp/etc/shibboleth/shibd-debian \
96 $(CURDIR)/debian/libapache2-mod-shib2.shibd.init
98 mv $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.so \
99 $(CURDIR)/debian/libapache2-mod-shib2/usr/lib/apache2/modules
100 rm $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.la
101 pod2man $(CURDIR)/debian/man-pages/mdquery.pod --section 1 \
102 --center 'Shibboleth' --release 2.0 \
103 $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man1/mdquery.1
104 pod2man $(CURDIR)/debian/man-pages/resolvertest.pod --section 1 \
105 --center 'Shibboleth' --release 2.0 \
106 $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man1/resolvertest.1
107 pod2man $(CURDIR)/debian/man-pages/shib-keygen.pod --section 8 \
108 --center 'Shibboleth' --release 2.0 \
109 $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man8/shib-keygen.8
110 pod2man $(CURDIR)/debian/man-pages/shibd.pod --section 8 \
111 --center 'Shibboleth' --release 2.0 \
112 $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man8/shibd.8
113 dh_install -s -i --fail-missing
116 binary: binary-arch binary-indep
117 binary-arch: DH_OPTIONS=-a
118 binary-arch: install-stamp
122 dh_installdocs -A doc/NOTICE.txt
123 dh_installinit --name=shibd
128 DH_OPTIONS="" dh_makeshlibs -plibshibsp2
135 binary-indep: DH_OPTIONS=-i
136 binary-indep: install-stamp
140 dh_installdocs -A doc/NOTICE.txt
148 .PHONY: binary binary-arch binary-indep build build-arch build-indep clean