Revert local modification of shibsp/paths.h
[shibboleth/sp.git] / debian / rules
index d870152..ff1d051 100755 (executable)
@@ -26,9 +26,10 @@ endif
 
 # These variable is used only by get-orig-source, which will normally only be
 # run by maintainers.
-VERSION = 2.1
-DEBVERS = dfsg1
-URL     = http://shibboleth.internet2.edu/downloads/shibboleth/cppsp
+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.
@@ -37,11 +38,11 @@ get-orig-source:
        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_$(VERSION).$(DEBVERS).orig
-       tar cf shibboleth-sp2_$(VERSION).$(DEBVERS).orig.tar \
-           shibboleth-sp2_$(VERSION).$(DEBVERS).orig
-       rm -r shibboleth-sp2_$(VERSION).$(DEBVERS).orig
-       gzip -9 shibboleth-sp2_$(VERSION).$(DEBVERS).orig.tar
+       mv shibboleth-$(VERSION) shibboleth-sp2_$(DEBVERS).orig
+       tar cf shibboleth-sp2_$(DEBVERS).orig.tar \
+           shibboleth-sp2_$(DEBVERS).orig
+       rm -r shibboleth-sp2_$(DEBVERS).orig
+       gzip -9 shibboleth-sp2_$(DEBVERS).orig.tar
 
 configure: configure-stamp
 configure-stamp:
@@ -74,7 +75,7 @@ clean:
        [ ! -f Makefile ] || $(MAKE) distclean
        find . -name Makefile.in -print0 | xargs -0r rm
        dh_clean aclocal.m4 config.h config.h.in config.status configure \
-           config.guess config.sub libtool.m4 ltmain.sh \
+           config.guess config.sub libtool.m4 ltmain.sh shibsp/paths.h \
            debian/libapache2-mod-shib2.shibd.init
 
 install: install-stamp
@@ -82,16 +83,19 @@ install-stamp:
        dh_testdir
        dh_testroot
        dh_clean -k
-       $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-       rm -r $(CURDIR)/debian/tmp/usr/share/doc/shibboleth
+       $(MAKE) NOKEYGEN=1 DESTDIR=$(CURDIR)/debian/tmp install
+       rm -r $(CURDIR)/debian/tmp/usr/share/doc/shibboleth*
+       rm -r $(CURDIR)/debian/tmp/var/run
        rm $(CURDIR)/debian/tmp/etc/shibboleth/*.dist
        rm $(CURDIR)/debian/tmp/etc/shibboleth/*.config
        rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-osx.plist
        rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-redhat
-       rm $(CURDIR)/debian/tmp/etc/shibboleth/sp-*.pem
+       rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd-suse
        chmod +x $(CURDIR)/debian/tmp/etc/shibboleth/keygen.sh
        mv $(CURDIR)/debian/tmp/etc/shibboleth/keygen.sh \
            $(CURDIR)/debian/tmp/usr/sbin/shib-keygen
+       mv $(CURDIR)/debian/tmp/etc/shibboleth/metagen.sh \
+           $(CURDIR)/debian/tmp/usr/bin/shib-metagen
        mv $(CURDIR)/debian/tmp/etc/shibboleth/shibd-debian \
            $(CURDIR)/debian/libapache2-mod-shib2.shibd.init
        dh_installdirs -s -i
@@ -99,16 +103,19 @@ install-stamp:
            $(CURDIR)/debian/libapache2-mod-shib2/usr/lib/apache2/modules
        rm $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.la
        pod2man $(CURDIR)/debian/man-pages/mdquery.pod --section 1 \
-           --center 'Shibboleth' --release 2.0 \
+           --center 'Shibboleth' --release $(VERSION) \
            $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man1/mdquery.1
        pod2man $(CURDIR)/debian/man-pages/resolvertest.pod --section 1 \
-           --center 'Shibboleth' --release 2.0 \
+           --center 'Shibboleth' --release $(VERSION) \
            $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man1/resolvertest.1
+       pod2man $(CURDIR)/debian/man-pages/shib-metagen.pod --section 1 \
+           --center 'Shibboleth' --release $(VERSION) \
+           $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man1/shib-metagen.1
        pod2man $(CURDIR)/debian/man-pages/shib-keygen.pod --section 8 \
-           --center 'Shibboleth' --release 2.0 \
+           --center 'Shibboleth' --release $(VERSION) \
            $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man8/shib-keygen.8
        pod2man $(CURDIR)/debian/man-pages/shibd.pod --section 8 \
-           --center 'Shibboleth' --release 2.0 \
+           --center 'Shibboleth' --release $(VERSION) \
            $(CURDIR)/debian/libapache2-mod-shib2/usr/share/man/man8/shibd.8
        dh_install -s -i --fail-missing
        touch $@
@@ -125,7 +132,7 @@ binary-arch: install-stamp
        dh_strip
        dh_compress
        dh_fixperms
-       DH_OPTIONS="" dh_makeshlibs -plibshibsp1
+       DH_OPTIONS="" dh_makeshlibs -plibshibsp4
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol