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
51 cp /usr/share/misc/config.guess config.guess
52 cp /usr/share/misc/config.sub config.sub
53 CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --prefix=/usr \
54 --sysconfdir=/etc --libexecdir=/usr/lib/shibboleth \
55 --localstatedir=/var --enable-apache-22 \
56 --with-apxs2=/usr/bin/apxs2 --disable-dependency-tracking
59 build: build-arch build-indep
60 build-arch: build-stamp
62 build-stamp: configure-stamp
70 rm -f configure-stamp build-stamp install-stamp
71 [ ! -f Makefile ] || $(MAKE) distclean
72 find . -name Makefile.in -print0 | xargs -0r rm
73 dh_clean aclocal.m4 config.h config.h.in config.status configure \
74 config.guess config.sub libtool.m4 ltmain.sh
76 install: install-stamp
81 $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
82 rm -r $(CURDIR)/debian/tmp/usr/share/doc/shibboleth
83 rm $(CURDIR)/debian/tmp/etc/shibboleth/*.{dist,config}
84 rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-redhat
85 chmod +x $(CURDIR)/debian/tmp/etc/shibboleth/keygen.sh
86 mv $(CURDIR)/debian/tmp/etc/shibboleth/shibd-debian $(CURDIR)/debian/libapache2-mod-shib2.shibd.init
88 mv $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.so $(CURDIR)/debian/libapache2-mod-shib2/usr/lib/apache2/modules
89 rm $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.la
90 pod2man $(CURDIR)/debian/shibd.pod --section 8 --center 'Shibboleth' --release 2.0 \
91 $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man8/shibd.8
92 dh_install -s -i --fail-missing
95 binary: binary-arch binary-indep
96 binary-arch: DH_OPTIONS=-a
97 binary-arch: install-stamp
101 dh_installdocs -A doc/NOTICE.txt doc/CREDITS.txt doc/README.txt doc/RELEASE.txt
102 dh_installinit --name=shibd
113 binary-indep: DH_OPTIONS=-i
114 binary-indep: install-stamp
118 dh_installdocs -A doc/NOTICE.txt doc/CREDITS.txt doc/README.txt doc/RELEASE.txt
126 .PHONY: binary binary-arch binary-indep build build-arch build-indep clean