[ace-of-penguins] 04/141: debian/rules: rewrite for dh(1)
Markus Koschany
apo-guest at moszumanska.debian.org
Wed Jan 6 13:54:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
apo-guest pushed a commit to branch master
in repository ace-of-penguins.
commit b42fb2073f31ad0522b82d4965e293a29b1901e6
Author: Jari Aalto <jari.aalto at cante.net>
Date: Sat Jun 26 15:23:55 2010 +0300
debian/rules: rewrite for dh(1)
---
debian/rules | 152 ++++++++++++++++++-----------------------------------------
1 file changed, 45 insertions(+), 107 deletions(-)
diff --git a/debian/rules b/debian/rules
index 1c65a85..0c45a4a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,10 +2,6 @@
PACKAGE = ace-of-penguins
PRGPREFIX = ace-
-MANSECT = 6
-MANSRC = debian
-MK_MAN = pod2man.mk
-MANDIR = $(MANROOTDIR)/man6
# list of programs taken from games/Makefile
PROGS = \
@@ -17,6 +13,7 @@ PROGS = \
minesweeper \
pegged \
solitaire \
+ spider \
taipedit \
taipei \
thornq
@@ -24,9 +21,10 @@ PROGS = \
CONFFLAGS = --prefix=/usr --bindir=/usr/games
include debian/debian-vars.mk
-include debian/debian-vars.mk
include debian/debian-compile.mk
+MANDIR = $(MANROOTDIR)/man6
+
#######################################################################
test:
@@ -41,23 +39,8 @@ test:
man:
# target: man
- $(MAKE) -C $(MANSRC) -f $(MK_MAN) PACKAGE=$(PACKAGE) \
- MANSECT=$(MANSECT) makeman
-
-build-stamp:
- # target build-stamp
-
- dh_testdir
-
- ./configure $(CONFFLAGS)
-
- # Compile the package
- $(MAKE) to_srcdir="$(TOPDIR)" top_builddir="$(TOPDIR)" \
- $(MAKE_FLAGS) CFLAGS="$(CFLAGS)"
-
- touch build-stamp
-
-build: build-man build-stamp
+ $(MAKE) -C debian -f pod2man.mk PACKAGE=$(PACKAGE) \
+ MANSECT=6 makeman
clean-man:
# target: clean-man - remove manual page links (will be generated)
@@ -68,48 +51,57 @@ clean-man:
rm -f $$man; \
done || :
-clean-files: clean-man
- # target: clean-files - build process files
-
- dh_testdir
-
- rm -f build-stamp
-
- # Temporary files from editor
- pwd
- rm -f debian/.*[#~]* debian/[#~]*
-
- # Prevent running ./configure again
- touch config.status
+build-man: man
+ # target: build-man - link pages to master page
+ for NAME in $(PROGS); \
+ do \
+ man=debian/$(PRGPREFIX)$$NAME.6; \
+ echo ".so man6/ace-of-penguins.6.gz" > $$man; \
+ done
+override_dh_clean: clean-man
# You may safely ignore message "invalid host type"
-
if [ -f Makefile ]; then \
$(MAKE) to_srcdir="$(TOPDIR)" \
top_builddir="$(TOPDIR)" \
clean distclean || : ; \
fi
- rm -f config.stamp config.status Makefile */Makefile
- rm -f lib/libcards1.la
rm -rf lib/.lib lib/.deps games/.lib games/.deps */*.[ao] *.[ao]
dh_clean
-clean: clean-files
+override_dh_auto_configure:
+ ./configure $(CONFFLAGS)
+
+override_dh_auto_build: build-man
+ # # Compile the package
+ # $(MAKE) to_srcdir="$(TOPDIR)" top_builddir="$(TOPDIR)" \
+ # $(MAKE_FLAGS) CFLAGS="$(CFLAGS)"
-install: build
- # target: build
+override_dh_installman:
+ dh_installman
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
+ # Check that all is in order
+ echo "PWD: pwd"
+ ( cd $(MANDIR) && ls -l )
+
+ # Cleanup dh_installman symlinks to point to correct files:
+ # ln: ace-canfield.6 -> ace-of-penguins.6.gz
+ # =>
+ # ln: ace-canfield.6.gz -> ace-of-penguins.6.gz
+
+ cd $(MANDIR) && \
+ for NAME in $(PROGS); \
+ do \
+ mv $(PRGPREFIX)$$NAME.6 $(PRGPREFIX)$$NAME.6.gz; \
+ done
- # [install] Commands to install the package into debian/<packagename>
- $(MAKE) install DESTDIR="$(PKGDIR)"
+override_dh_auto_install:
+ # $(MAKE) install DESTDIR="$(PKGDIR)"
+ dh_auto_install
- # [install] rename programs to avoid name clashes
+ # rename programs to start with prefix
for NAME in $(PROGS) ; do \
mv $(PKGDIR)/usr/games/$$NAME \
$(PKGDIR)/usr/games/$(PRGPREFIX)$$NAME || exit 1; \
@@ -118,70 +110,16 @@ install: build
$(INSTALL_DIR) $(PKGDIR)/usr/share/applications
$(INSTALL_DATA) debian/*.desktop $(PKGDIR)/usr/share/applications
- # [install] delete test-program
+ # delete test-program
rm -f $(PKGDIR)/usr/games/penguins
- # delete libcards.so
- # rm -rf $(PKGDIR)/usr/lib
-
- # Install overrides
- dh_lintian
-
-build-man: man
- # target: build-man - link pages to master page
- for NAME in $(PROGS); \
- do \
- man=debian/$(PRGPREFIX)$$NAME.6; \
- echo ".so man6/ace-of-penguins.6.gz" > $$man; \
- done
-
-binary-arch: build install build-man
-
- # target: binary-arch
-
- dh_testdir
- dh_testroot
-
+override_dh_installdocs:
# Policy: COPYING file is not needed
dh_installdocs -X COPYING -X.git -XCVS -X.svn docs/*
- dh_installmenu
-
- dh_installman debian/*.6
-
- # Not needed, generated from *.pod
- rm -f debian/*.6
-
- dh_installchangelogs ChangeLog
- dh_compress
-
- # Cleanup dh_installman symlinks to point to correct files:
- # ln: ace-canfield.6 -> ace-of-penguins.6.gz
- # =>
- # ln: ace-canfield.6.gz -> ace-of-penguins.6.gz
-
- # Check that all is in order
- echo "PWD: pwd"
- ( cd $(MANDIR) && ls -l )
-
- cd $(MANDIR) && \
- for NAME in $(PROGS); \
- do \
- mv $(PRGPREFIX)$$NAME.6 $(PRGPREFIX)$$NAME.6.gz; \
- done
+%:
+ dh $@
- dh_strip
- dh_compress
- dh_fixperms
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
-.PHONY: man build-man
+.PHONY: build-man clean-man
# End of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ace-of-penguins.git
More information about the Pkg-games-commits
mailing list