[med-svn] r11231 - trunk/packages/libquazip/trunk/debian

Eric Maeker ericmaeker-guest at alioth.debian.org
Wed Jun 6 11:19:12 UTC 2012


Author: ericmaeker-guest
Date: 2012-06-06 11:19:12 +0000 (Wed, 06 Jun 2012)
New Revision: 11231

Modified:
   trunk/packages/libquazip/trunk/debian/rules
Log:
libquazip: correctly build && install: shared libs (release&debug) && static lib

Modified: trunk/packages/libquazip/trunk/debian/rules
===================================================================
--- trunk/packages/libquazip/trunk/debian/rules	2012-06-06 11:16:56 UTC (rev 11230)
+++ trunk/packages/libquazip/trunk/debian/rules	2012-06-06 11:19:12 UTC (rev 11231)
@@ -4,22 +4,40 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# Extract the current version number
+# Notes
+# The static lib needs a new qmake command to be built && make
+#	
+
+# Extract the current version number and package name
 DEBIAN  := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
 DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
 VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
-
 name := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
+#DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
+# QMake command line
+RELEASE_PREFIX := "PREFIX=$(CURDIR)/debian/tmp/usr"
+DEBUG_PREFIX := "PREFIX=$(CURDIR)/debian/tmp/usr/lib/debug/usr"
+QMAKE_GENERIC := \
+		LIBS+=-lz \
+		VERSION=$(VERSION)
+
+QMAKE_RELEASE := $(RELEASE_PREFIX) CONFIG+=release CONFIG-=debug
+QMAKE_DEBUG := $(DEBUG_PREFIX) CONFIG-=release CONFIG+=debug
+QMAKE_STATIC := $(RELEASE_PREFIX) CONFIG+=staticlib
+
 %:
 	dh $@
+	#dh $@ --buildsystem=qmake \
+	#--parallel
 
 override_dh_auto_configure:
-	# we can add
-	# "QMAKE_INSTALL_FILE=cp -a"
-	# "QMAKE_INSTALL_PROGRAM=cp -a"
-	# to the qmake command if symlinks are followed
-	qmake quazip/quazip.pro "PREFIX=$(CURDIR)/debian/tmp/usr" LIBS+=-lz VERSION=$(VERSION)
+	# Configure the shared library (release)
+	qmake quazip/quazip.pro $(QMAKE_GENERIC) $(QMAKE_RELEASE) -o Make.shared.release
+	# Configure the shared library (debug)
+	qmake quazip/quazip.pro $(QMAKE_GENERIC) $(QMAKE_DEBUG) -o Make.shared.debug
+	# Configure the static library
+	qmake quazip/quazip.pro $(QMAKE_GENERIC) $(QMAKE_RELEASE) $(QMAKE_STATIC) -o Make.static
 	
 # Clean build path
 override_dh_auto_clean:
@@ -29,22 +47,26 @@
 	find . -name Makefile -delete
 
 override_dh_auto_build:
-	dh_auto_build
-	# make the .so
-	$(MAKE)
-	# make the .a
-	$(MAKE) $(name).a
+	# make the shared lib
+	$(MAKE) -f Make.shared.release
+	$(MAKE) -f Make.shared.debug
+	# make the static lib
+	$(MAKE) -f Make.static
 
+.PHONY: override_dh_strip
+override_dh_strip:
+        dh_strip --dbg-package=libquazip0-dbg
+
 override_dh_auto_install:
-	$(MAKE) install
-	# we need to manage .a by hand
-	cp -a $(name).a $(CURDIR)/debian/tmp/usr/lib
-#	
+	$(MAKE) -f Make.shared.release install
+	$(MAKE) -f Make.shared.debug install_target
+	$(MAKE) -f Make.static install_target
+	
 #	# d-shlibs needs enhancement --> #675500
 #	# Call d-shlibmove to comply with library packaging guide
-#	debian/d-devlibdeps debian/$(pkg)0-dev.substvars \
+#	debian/d-devlibdeps debian/$(name)0-dev.substvars \
 #	             $(name).so
 #	debian/d-shlibmove --commit \
 #	            --movedev debian/tmp/usr/include usr/ \
-#	            debian/tmp/usr/lib/$(name).so 
-#	            # $(name).a
+#	            debian/tmp/usr/lib/$(name).so \
+#	            #$(name).a




More information about the debian-med-commit mailing list