#!/usr/bin/make -f DOCS = debian/libshibsp-doc/usr/share/doc/libshibsp-doc ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) DEBUG = --enable-debug else DEBUG = endif # These variables are used by get-orig-source and to generate man pages. DEBVERS := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 \ | cut -d- -f1) VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') URL = http://shibboleth.internet2.edu/downloads/shibboleth/cppsp # Download the upstream source and do the repackaging that we have to do for # DFSG reasons. Depends on wget. get-orig-source: wget $(URL)/$(VERSION)/shibboleth-sp-$(VERSION).tar.gz tar xfz shibboleth-sp-$(VERSION).tar.gz rm shibboleth-sp-$(VERSION).tar.gz rm shibboleth-$(VERSION)/schemas/WS-Trust.xsd mv shibboleth-$(VERSION) shibboleth-sp2_$(DEBVERS).orig tar cf shibboleth-sp2_$(DEBVERS).orig.tar \ shibboleth-sp2_$(DEBVERS).orig rm -rf shibboleth-sp2_$(DEBVERS).orig gzip -9 shibboleth-sp2_$(DEBVERS).orig.tar override_dh_auto_configure: autoreconf -f -i dh_auto_configure -- --libexecdir=/usr/lib/shibboleth \ --localstatedir=/var --enable-apache-22 \ --with-apxs2=/usr/bin/apxs2 --disable-dependency-tracking \ --with-memcached $(SYSTEM) override_dh_auto_clean: dh_auto_clean find . -name Makefile.in -print0 | xargs -0r rm override_dh_auto_install: NOKEYGEN=1 dh_auto_install rm debian/tmp/usr/lib/shibboleth/*.la rm -r debian/tmp/usr/share/doc/shibboleth* rm -r debian/tmp/var/run rm debian/tmp/etc/shibboleth/*.dist rm debian/tmp/etc/shibboleth/*.config rm debian/tmp/etc/shibboleth/shibd-osx.plist rm debian/tmp/etc/shibboleth/shibd-redhat rm debian/tmp/etc/shibboleth/shibd-suse chmod +x debian/tmp/etc/shibboleth/keygen.sh mv debian/tmp/etc/shibboleth/keygen.sh debian/tmp/usr/sbin/shib-keygen mv debian/tmp/etc/shibboleth/metagen.sh debian/tmp/usr/bin/shib-metagen mv debian/tmp/etc/shibboleth/shibd-debian \ debian/libapache2-mod-shib2.shibd.init override_dh_install: mv debian/tmp/usr/lib/shibboleth/mod_shib_22.so \ debian/libapache2-mod-shib2/usr/lib/apache2/modules pod2man debian/man-pages/mdquery.pod --section 1 \ --center 'Shibboleth' --release $(VERSION) \ debian/libapache2-mod-shib2/usr/share/man/man1/mdquery.1 pod2man debian/man-pages/resolvertest.pod --section 1 \ --center 'Shibboleth' --release $(VERSION) \ debian/libapache2-mod-shib2/usr/share/man/man1/resolvertest.1 pod2man debian/man-pages/shib-metagen.pod --section 1 \ --center 'Shibboleth' --release $(VERSION) \ debian/libapache2-mod-shib2/usr/share/man/man1/shib-metagen.1 pod2man debian/man-pages/shib-keygen.pod --section 8 \ --center 'Shibboleth' --release $(VERSION) \ debian/libapache2-mod-shib2/usr/share/man/man8/shib-keygen.8 pod2man debian/man-pages/shibd.pod --section 8 \ --center 'Shibboleth' --release $(VERSION) \ debian/libapache2-mod-shib2/usr/share/man/man8/shibd.8 dh_install -s -i --fail-missing override_dh_installdocs: dh_installdocs -A doc/NOTICE.txt set -e; if [ -d "$(DOCS)" ] ; then \ rm $(DOCS)/html/jquery.js ; \ ln -s /usr/share/javascript/jquery/jquery.min.js \ $(DOCS)/html/jquery.js ; \ fi override_dh_installinit: dh_installinit --name=shibd override_dh_makeshlibs: dh_makeshlibs -Xusr/lib/shibboleth %: dh $@