[Pkg-giraffe-maintainers] [PATCH] debian/rules: adding switch for no giraffe-dev build

c.schoenert at t-online.de c.schoenert at t-online.de
Wed Apr 2 18:26:32 UTC 2014


From: Carsten Schoenert <c.schoenert at t-online.de>

While testing various build cases in case of developing Giraffe the build of
the giraffe-dbg package will take much time, but mostly we don't ever
use the -dbg package. We have to wait for finishing the seperate package
builds.

The waiting time can be significant reduced if we skip the build of the
-dbg package while developing a new version or fixing something.
But how to do that?

This commit implements an 'if then else' construct that check if the
debian/changelog has set up a Release == UNRELEASED or not.
If the Release == UNRELEASED the build of the -dbg package will be
skipped, otherwise it will be like all the other packages build. This
ensures a normal build of all packages on the autobuilders.

Signed-off-by: Carsten Schoenert <c.schoenert at t-online.de>
---
 debian/rules | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/debian/rules b/debian/rules
index 4aa4898..50107f3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,6 +25,10 @@ DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 INSTDIR=$(CURDIR)/debian/tmp
 SMARTYVER=2.6.14
 
+# checking the release type, if $(RELEASE)=UNRELEASED we won't build
+# the giraffe-dbg package
+RELEASE := $(shell head -1 debian/changelog | cut -d" " -f3 | tr -d ';')
+
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CONFFLAG = ""
 else
@@ -186,6 +190,11 @@ binary-arch-real: install-arch
 #	dh_installinfo
 #	dh_installman
 	dh_link
+	if [ "$(RELEASE)" != "UNRELEASED" ]; then \
+		dh_strip --dbg-package=giraffe-dbg; \
+	else \
+		dh_strip; \
+	fi
 	dh_strip --dbg-package=giraffe-dbg
 	dh_compress -X.py -X.pl
 	dh_fixperms
-- 
1.9.1




More information about the Pkg-giraffe-maintainers mailing list