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-sp_$(VERSION).$(DEBVERS).orig
41 tar cf shibboleth-sp2_$(VERSION).$(DEBVERS).orig.tar \
42 shibboleth-sp_$(VERSION).$(DEBVERS).orig
43 rm -r shibboleth-sp_$(VERSION).$(DEBVERS).orig
44 gzip -9 shibboleth-sp_$(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
79 install: install-stamp
84 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
85 rm -r $(CURDIR)/debian/tmp/usr/share/doc/shibboleth
86 rm $(CURDIR)/debian/tmp/etc/shibboleth/*.{dist,config}
87 rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-redhat
88 chmod +x $(CURDIR)/debian/tmp/etc/shibboleth/keygen.sh
89 mv $(CURDIR)/debian/tmp/etc/shibboleth/shibd-debian \
90 $(CURDIR)/debian/libapache2-mod-shib2.shibd.init
92 mv $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.so \
93 $(CURDIR)/debian/libapache2-mod-shib2/usr/lib/apache2/modules
94 rm $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.la
95 pod2man $(CURDIR)/debian/shibd.pod --section 8 --center 'Shibboleth' \
97 $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man8/shibd.8
98 dh_install -s -i --fail-missing
101 binary: binary-arch binary-indep
102 binary-arch: DH_OPTIONS=-a
103 binary-arch: install-stamp
107 dh_installdocs -A doc/NOTICE.txt
108 dh_installinit --name=shibd
119 binary-indep: DH_OPTIONS=-i
120 binary-indep: install-stamp
124 dh_installdocs -A doc/NOTICE.txt
132 .PHONY: binary binary-arch binary-indep build build-arch build-indep clean