[tecnoballz] 25/56: Shorten the rules file by using dh(1) and add a patch to honor CXXFLAGS.

Markus Koschany apo-guest at moszumanska.debian.org
Fri Jan 30 12:12:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository tecnoballz.

commit aad7891de25ef76b8073d238f278a838bd78aa35
Author: Peter Pentchev <roam at ringlet.net>
Date:   Thu Feb 17 09:56:34 2011 +0000

    Shorten the rules file by using dh(1) and add a patch to honor CXXFLAGS.
---
 debian/changelog                       |  4 +-
 debian/clean                           | 10 ++++
 debian/patches/031_honor_cxxflags.diff | 16 +++++++
 debian/patches/series                  |  1 +
 debian/rules                           | 87 +++++-----------------------------
 debian/tecnoballz.manpages             |  2 +
 6 files changed, 45 insertions(+), 75 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d78d371..d12b966 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,10 @@ tecnoballz (0.92-4) UNRELEASED; urgency=low
   * Add misc:Depends to the binary packages.
   * Bump the debhelper compatibility level to 7:
     - let dh_clean remove the *-stamp files
-    - use dh_prep instead of dh_clean -k
     - dh_installchangelogs picks up the CHANGES file now
+    - break the clean-up list and the manpages list into debian/* files
+    - shorten the rules file by using the dh(1) helper
+  * Add the 031_honor_cxxflags patch.
 
  -- Peter Pentchev <roam at ringlet.net>  Thu, 17 Feb 2011 10:35:58 +0200
 
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..13149a1
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,10 @@
+config.status config.log
+config.sub config.guess
+configure
+aclocal.m4
+INSTALL
+autotools/config.sub
+autotools/config.guess
+autotools/depcomp
+autotools/install-sh
+src/.deps
diff --git a/debian/patches/031_honor_cxxflags.diff b/debian/patches/031_honor_cxxflags.diff
new file mode 100644
index 0000000..a0710e2
--- /dev/null
+++ b/debian/patches/031_honor_cxxflags.diff
@@ -0,0 +1,16 @@
+Description: Honor the user-supplied CXXFLAGS.
+Forwarded: no
+Author: Peter Pentchev <roam at ringlet.net>
+Last-Update: 2011-02-17
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,7 +16,7 @@
+ 
+ dnl  Default flags
+ #CXXFLAGS="-g -O3 -Wall"
+-CXXFLAGS=" -O3 -Wall"
++#CXXFLAGS=" -O3 -Wall"
+ 
+ dnl  Check for X
+ AC_PATH_X
diff --git a/debian/patches/series b/debian/patches/series
index 0260c03..1781f23 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 011_gcc-4.3-fixes.diff
 020_level_data.diff
 030_texts_dir.diff
+031_honor_cxxflags.diff
diff --git a/debian/rules b/debian/rules
index 4ec309f..e1a7f1f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,16 +3,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)  
-DEB_HOST_GNU_TYPE  := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-
-# FOR AUTOCONF 2.52 AND NEWER ONLY
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-  confflags += --build $(DEB_HOST_GNU_TYPE)
-else
-  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
-
 # Optimisation flag if needed
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 	CXXFLAGS += -O0
@@ -23,86 +13,35 @@ endif
 # Warnings
 CXXFLAGS = -g -Wall
 
-configure: configure-stamp 
-configure-stamp: 
-	dh_testdir
-	printf "\n\n*** Configuring the package ***\n\n"
-
-	autoreconf -fvi
-
-	CXXFLAGS="$(CXXFLAGS)" ./configure $(confflags) --prefix=/usr --datadir=/usr/share/games
-	touch configure-stamp
+export CXXFLAGS
 
 build: build-stamp
-build-stamp: configure-stamp
-	printf "\n*** Building the package ***\n"
-	dh_testdir
-	$(MAKE) CXXFLAGS="$(CXXFLAGS)"
+build-stamp:
+	dh build --before auto_configure
+	autoreconf -fvi
+	dh_auto_configure -- --datadir=/usr/share/games
+	dh build --remaining
 	touch build-stamp
 
 clean: 
-	printf "\n*** Cleaning the package ***\n"
-	dh_testdir
-	dh_testroot
-	[ ! -f Makefile ] || $(MAKE) distclean
-	rm -f config.status config.log
-	rm -f config.sub config.guess
-	rm -f configure
-	rm -f aclocal.m4
-	rm -f INSTALL
-	rm -f autotools/config.sub
-	rm -f autotools/config.guess
-	rm -f autotools/depcomp
-	rm -f autotools/install-sh
+	dh $@ --before dh_clean
 	find ./ -name Makefile.in -delete
-	rm -rf src/.deps
-	dh_clean 
+	dh $@ --remaining
 
 install: build
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
-	# building the main package
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-
+	dh $@ --until auto_install
 	# The data package
 	mv $(CURDIR)/debian/tmp/var/games/tecnoballz/tecnoballz.hi \
 		$(CURDIR)/debian/tmp/var/games/tecnoballz/tecnoballz.hi.clean
+	dh $@ --remaining
 
 # Build architecture-independent files here.
 binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_install -i --list-missing
-	dh_installchangelogs -i
-	dh_installdocs -i
-	dh_installexamples -i
-	dh_compress -i
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
+	dh $@
 
 # Build architecture-dependent files here.
 binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_install -s --list-missing
-	dh_installchangelogs -s
-	dh_installdocs -s
-	dh_installmenu -s
-	dh_installman -s man/*.6
-	dh_link -s
-	dh_strip -s
-	dh_compress -s
-	dh_fixperms -s
-	dh_installdeb -s
-	dh_shlibdeps -s
-	dh_gencontrol -s
-	dh_md5sums -s
-	dh_builddeb -s
+	dh $@
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/tecnoballz.manpages b/debian/tecnoballz.manpages
new file mode 100644
index 0000000..4ac1c6d
--- /dev/null
+++ b/debian/tecnoballz.manpages
@@ -0,0 +1,2 @@
+man/tecnoballz.6
+man/tecnoballz.fr.6

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/tecnoballz.git



More information about the Pkg-games-commits mailing list