tags 476680 +patch
thanks
The problem here is that the packages makefiles break when the quilt
patches are removed (probablly due to DFSG stripping of the source
tree). but "debian/rules clean" removes the patches before calling make
distclean.
A fixed debian/rules file is attatched.
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Use quilt to manage patches. We want to eventually include the quilt.make
# rules, but for right now we need to support builds in stable.
export QUILT_PATCHES = debian/patches
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
CFLAGS = -Wall -g
CXXFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
CXXFLAGS += -O0
else
CFLAGS += -O2
CXXFLAGS += -O2
endif
# Tell Autoconf the correct system types.
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
SYSTEM = --build $(DEB_HOST_GNU_TYPE)
else
SYSTEM = --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif
# These variable is used only by get-orig-source, which will normally only be
# run by maintainers.
VERSION = 1.3f
TARVERS = 1.3
DEBVERS = dfsg1
URL = http://shibboleth.internet2.edu/downloads/
# Download the upstrema source and do the repackaging that we have to do for
# DFSG reasons. Depends on wget and svn-buildpackage.
get-orig-source:
wget $(URL)/shibboleth-sp-$(VERSION).tar.gz
uclean shibboleth-sp-$(VERSION).tar.gz
rm upstream-shibboleth-sp-$(VERSION).tar.gz
tar xfz shibboleth-sp-$(VERSION).tar.gz
rm shibboleth-sp-$(VERSION).tar.gz
rm -r shibboleth-$(TARVERS)/isapi_shib_gui
rm shibboleth-$(TARVERS)/schemas/WS-Trust.xsd
mv shibboleth-$(TARVERS) shibboleth-sp_$(VERSION).$(DEBVERS).orig
tar cf shibboleth-sp_$(VERSION).$(DEBVERS).orig.tar \
shibboleth-sp_$(VERSION).$(DEBVERS).orig
rm -r shibboleth-sp_$(VERSION).$(DEBVERS).orig
gzip -9 shibboleth-sp_$(VERSION).$(DEBVERS).orig.tar
patch: patch-stamp
patch-stamp:
quilt push -a || test $$? == 2
touch patch-stamp
#dummy target as unpatching must happen at the right point in the cleanup
#process or make distclean fails
unpatch:
configure: configure-stamp
configure-stamp: patch-stamp
dh_testdir
autoreconf
rm -rf autom4te.cache
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --prefix=/usr \
--sysconfdir=/etc --libexecdir=/usr/lib/shibboleth \
--localstatedir=/var --with-saml=/usr --with-log4cpp=/usr \
--enable-apache-22 --with-apxs2=/usr/bin/apxs2 \
--enable-static=yes --enable-mysql $(SYSTEM)
touch configure-stamp
build: build-arch build-indep
build-arch: build-stamp
build-indep:
build-stamp: configure-stamp
dh_testdir
$(MAKE)
touch build-stamp
clean: unpatch
dh_testdir
dh_testroot
rm -f configure-stamp build-stamp install-stamp
touch aclocal.m4 configure config.h.in config.h config.status
find . \( -name Makefile -o -name Makefile.in \) -print0 \
| xargs -0r touch
[ ! -f Makefile ] || $(MAKE) distclean
quilt pop -a -R || test $$? = 2
rm -rf .pc patch-stamp
find . -name Makefile.in -print0 | xargs -0r rm
dh_clean aclocal.m4 config.h config.h.in config.status configure \
shib-target/shib-paths.h
install: install-stamp
install-stamp: build
dh_testdir
dh_testroot
dh_clean -k
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
install -d $(CURDIR)/debian/tmp/usr/lib/apache2/modules
mv $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.so \
$(CURDIR)/debian/tmp/usr/lib/apache2/modules
rm $(CURDIR)/debian/tmp/usr/lib/shibboleth/mod_shib_22.*
rm $(CURDIR)/debian/tmp/etc/shibboleth/*.dist
rm $(CURDIR)/debian/tmp/etc/shibboleth/*.config
rm $(CURDIR)/debian/tmp/etc/shibboleth/shibd
rm $(CURDIR)/debian/tmp/etc/shibboleth/IQ-metadata.xml
rm $(CURDIR)/debian/tmp/etc/shibboleth/example-metadata.xml
mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1
pod2man $(CURDIR)/debian/pod/siterefresh.pod --section 1 \
--center 'Shibboleth' --release 1.3e \
$(CURDIR)/debian/tmp/usr/share/man/man1/siterefresh.1
mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man8
pod2man $(CURDIR)/debian/pod/shibd.pod --section 8 \
--center 'Shibboleth' --release 1.3e \
$(CURDIR)/debian/tmp/usr/share/man/man8/shibd.8
ls -alR $(CURDIR)/debian/tmp
dh_install
install -d $(CURDIR)/debian/libapache2-mod-shib/var/log/shibboleth
binary: binary-arch binary-indep
binary-indep:
binary-arch: DH_OPTIONS=-a
binary-arch: build-stamp install-stamp
dh_testdir
dh_testroot
dh_installchangelogs doc/NEWS.txt
dh_installdocs
dh_installinit --name=shibd
dh_installman
dh_installexamples
dh_link
dh_strip
dh_compress
dh_fixperms
DH_OPTIONS="" dh_makeshlibs -plibshib6
DH_OPTIONS="" dh_makeshlibs -plibshib-target5
dh_installdeb
dh_shlibdeps -L libshib6 -l $(CURDIR)/debian/tmp/usr/lib
dh_gencontrol
dh_md5sums
dh_builddeb
.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
.PHONY: install