[SCM] Debian packaging for OpenSAML 2.0 branch, debian, updated. debian/2.0-1-17-gb48c9d6

Ferenc Wagner wferi at niif.hu
Mon Jun 16 10:40:12 UTC 2008


The following commit has been merged in the debian branch:
commit 35a70f4462ca809f00c5c7a2ce21c658fcba1a2d
Author: Ferenc Wagner <wferi at niif.hu>
Date:   Mon Jun 16 12:16:59 2008 +0200

    Overhaul debian/rules
    
    Remove the normal CFLAGS setting and instead pass --enable-debug to
    configure.  dh_strip will remove the debugging symbols if appropriate.
    
    Use the right Autoconf logic to handle cross-builds.
    
    Use stamp files for configure and install and better logic for
    optionally running make clean.
    
    Always copy config.guess and config.sub before running configure and
    delete them in the clean target.
    
    Remove unnecessary debhelper programs.

diff --git a/debian/rules b/debian/rules
index 6fbcb84..a662f2a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,105 +16,86 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-
-CFLAGS = -Wall -g
-
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
+    DEBUG = --enable-debug
 else
-	CFLAGS += -O2
+    DEBUG =
 endif
 
-config.status: configure
-	dh_testdir
-	# Add here commands to configure the package.
-	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr CFLAGS="$(CFLAGS)" --disable-dependency-tracking
+# 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
 
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	cp /usr/share/misc/config.guess config.guess
+	cp /usr/share/misc/config.sub config.sub
+	CFLAGS="$(CFLAGS)" ./configure --prefix=/usr \
+	    --disable-dependency-tracking $(SYSTEM) $(DEBUG)
+	touch $@
 
-#Architecture 
 build: build-arch build-indep
-
 build-arch: build-stamp
-
-build-indep: build-stamp
-
-build-stamp: config.status
+build-indep:
+build-stamp: configure-stamp
+	dh_testdir
 	$(MAKE)
 	touch $@
 
 clean:
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp #CONFIGURE-STAMP#
-
-	# Add here commands to clean up after the build process.
-	-$(MAKE) distclean
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
-	cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
-	cp -f /usr/share/misc/config.guess config.guess
-endif
-
+	rm -f configure-stamp build-stamp install-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+	dh_clean config.guess config.sub
 
-	dh_clean 
-
-install:
+install: install-stamp
+install-stamp:
 	dh_testdir
 	dh_testroot
-	dh_clean -k -i -s
-	dh_installdirs -i -s
-
-	# Add here commands to install the the package into debian/tmp.
+	dh_clean -k
 	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
 	rm $(CURDIR)/debian/tmp/usr/share/doc/opensaml/{LOG4CPP.LICENSE,{LICENSE,NOTICE}.txt}
+	dh_install -s -i --fail-missing --sourcedir=debian/tmp
+	touch $@
 
-	dh_install -i -s --fail-missing --sourcedir=debian/tmp
-
-# Must not depend on anything. This is to be called by
-# binary-arch/binary-indep
-# in another 'make' thread.
-binary-common:
+binary: binary-arch binary-indep
+binary-arch: DH_OPTIONS=-a
+binary-arch: install-stamp
 	dh_testdir
 	dh_testroot
-	dh_installchangelogs 
+	dh_installchangelogs
 	dh_installdocs
-	dh_installexamples
-#	dh_installmenu
-#	dh_installdebconf	
-#	dh_installlogrotate	
-#	dh_installemacsen
-#	dh_installpam
-#	dh_installmime
-#	dh_python
-#	dh_installinit
-#	dh_installcron
-#	dh_installinfo
-	dh_installman
 	dh_link
 	dh_strip
-	dh_compress 
+	dh_compress
 	dh_fixperms
-#	dh_perl
 	dh_makeshlibs
 	dh_installdeb
 	dh_shlibdeps
 	dh_gencontrol
 	dh_md5sums
 	dh_builddeb
-# Build architecture independant packages using the common target.
-binary-indep: build-indep install
-	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
 
-# Build architecture dependant packages using the common target.
-binary-arch: build-arch install
-	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+binary-indep: DH_OPTIONS=-i
+binary-indep: install-stamp
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_link
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
 
-binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary install
+.PHONY: binary binary-arch binary-indep build build-arch build-indep clean
+.PHONY: install

-- 
Debian packaging for OpenSAML 2.0



More information about the Pkg-shibboleth-devel mailing list