chiark / gitweb /
Clean up debian/rules by using dh (with compat level 8).
authorhertzog <hertzog@313b444b-1b9f-4f58-a734-7bb04f332e8d>
Mon, 25 Jun 2012 16:57:16 +0000 (16:57 +0000)
committerhertzog <hertzog@313b444b-1b9f-4f58-a734-7bb04f332e8d>
Mon, 25 Jun 2012 16:57:16 +0000 (16:57 +0000)
git-svn-id: svn://anonscm.debian.org/ddp/manuals/trunk/developers-reference@9226 313b444b-1b9f-4f58-a734-7bb04f332e8d

debian/changelog
debian/compat
debian/control
debian/developers-reference-de.docs [new file with mode: 0644]
debian/developers-reference-fr.docs [new file with mode: 0644]
debian/developers-reference-ja.docs [new file with mode: 0644]
debian/developers-reference.docs [new file with mode: 0644]
debian/rules

index 60b7bea..dd9ca9e 100644 (file)
@@ -22,6 +22,7 @@ developers-reference (3.4.8) UNRELEASED; urgency=low
   [ RaphaĆ«l Hertzog ]
   * Update Standards-Version to 3.9.3 (no change required).
   * Switch to xz compression for source.
+  * Clean up debian/rules by using dh (with compat level 8).
 
  -- Osamu Aoki <osamu@debian.org>  Sun, 15 Apr 2012 20:54:05 +0900
 
index 7ed6ff8..45a4fb7 100644 (file)
@@ -1 +1 @@
-5
+8
index 3ead7fb..2f215fb 100644 (file)
@@ -7,7 +7,7 @@ Standards-Version: 3.9.3
 Build-Depends-Indep: docbook-xsl (>= 1.71.0), dblatex (>= 0.2), xsltproc, libxml2-utils, po4a, w3m,
  fonts-ipafont-gothic, fonts-ipafont-mincho, gsfonts, latex-cjk-xcjk, lmodern, tipa,
  texlive-lang-cyrillic, texlive-lang-french, texlive-lang-german, texlive-xetex
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper (>= 8), dpkg-dev (>= 1.16.1~)
 Vcs-Svn: svn://svn.debian.org/ddp/manuals/trunk/developers-reference
 Vcs-Browser: http://svn.debian.org/wsvn/ddp/manuals/trunk/developers-reference?op=log
 
diff --git a/debian/developers-reference-de.docs b/debian/developers-reference-de.docs
new file mode 100644 (file)
index 0000000..b9db1ff
--- /dev/null
@@ -0,0 +1,4 @@
+README-contrib
+de/*.html
+de/developers-reference.txt
+de/developers-reference.pdf
diff --git a/debian/developers-reference-fr.docs b/debian/developers-reference-fr.docs
new file mode 100644 (file)
index 0000000..f39ad55
--- /dev/null
@@ -0,0 +1,4 @@
+README-contrib
+fr/*.html
+fr/developers-reference.txt
+fr/developers-reference.pdf
diff --git a/debian/developers-reference-ja.docs b/debian/developers-reference-ja.docs
new file mode 100644 (file)
index 0000000..1574bae
--- /dev/null
@@ -0,0 +1,4 @@
+README-contrib
+ja/*.html
+ja/developers-reference.txt
+ja/developers-reference.pdf
diff --git a/debian/developers-reference.docs b/debian/developers-reference.docs
new file mode 100644 (file)
index 0000000..1d41a63
--- /dev/null
@@ -0,0 +1,4 @@
+README-contrib
+*.html
+developers-reference.txt
+developers-reference.pdf
index 5ca0113..c5acdd6 100755 (executable)
 #!/usr/bin/make -f
 # rules file for developers-reference
 
-package                := developers-reference
+include /usr/share/dpkg/default.mk
 
-# directory abstraction
-prefix         := debian/$(package)
-docdir         := $(prefix)/usr/share/doc/$(package)
-docbaserel     := /usr/share/doc-base
-docbasedir     := $(prefix)$(docbaserel)
-
-# list of language packages, in the form pkg-LANG; must jibe
-# with debian/control
-langs          := de fr ja
-langs_nopdf    := 
-
-# tool abstraction
-install_file   := install -o root -g root -m 644 -p
-install_script := install -o root -g root -m 755 -p
-make_directory := install -d -o root -g root -m 755
-
-# version abstraction
-DEB_VERSION    := $(shell awk -F '[()]' '/^$(package)/{ print $$2; exit }' debian/changelog)
 DEB_DATE       := $(shell dpkg-parsechangelog 2>/dev/null | sed -n 's/^Date: *//p')
-# pretty-print the date; I wish this was dynamic like the top-level makefile but oh well
 PUBDATE                := $(shell LC_ALL=C date --date="$(DEB_DATE)" -I)
 
-# debhelper verbose mode
-#export DH_VERBOSE=1
-
-build: build-arch build-indep
+LANGS          := $(shell dh_listpackages| sed -n -e 's/developers-reference-//p')
 
-build-arch:
-#      nothing arch dependant
+%:
+       dh $@
 
-build-indep:
-       $(checkdir)
-       rm -f version.ent
-       $(MAKE) VERSION=$(DEB_VERSION) PUBDATE=$(PUBDATE) LANGS="$(langs) $(langs_nopdf)"
-       touch build
+override_dh_auto_build:
+       $(MAKE) VERSION=$(DEB_VERSION) PUBDATE=$(PUBDATE) LANGS="$(LANGS)"
 
-.PHONY: clean
-clean:
-       $(checkdir)
-       $(MAKE) clean
-       rm -f build
-       dh_clean
+override_dh_compress:
+       dh_compress -X.pdf
 
-.PHONY: test
-test:
-#       nothing to test ATM
-
-.PHONY: install
-install:       build
-       $(checkdir)
-       $(checkroot)
-       dh_clean -k
-
-       dh_installdocs -p$(package) README-contrib \
-           *.html \
-           developers-reference.txt \
-           developers-reference.pdf
-
-       set -e; for lang in $(langs); do \
-           dh_installdocs -p$(package)-$$lang README-contrib \
-               $$lang/*.html \
-               $$lang/developers-reference.txt \
-               $$lang/developers-reference.pdf; \
+override_dh_installdeb:
+       debian/tocsubstvars
+       dh_installdeb
+               
+update-l10n-files:
+       for lang in $(LANGS); do \
+           (echo "README-contrib"; \
+            echo "$$lang/*.html"; \
+            echo "$$lang/developers-reference.txt"; \
+            echo "$$lang/developers-reference.pdf") \
+           > debian/developers-reference-$$lang.docs; \
        done
 
-       set -e; for lang in $(langs_nopdf); do \
-           dh_installdocs -p$(package)-$$lang README-contrib \
-                   $$lang/*.html \
-                   $$lang/developers-reference.txt; \
-       done
-
-.PHONY: binary-indep
-binary-indep:  test install
-       $(checkdir)
-       $(checkroot)
-       dh_installdirs -i
-       dh_installchangelogs -i
-       dh_compress -i -X.pdf
-       dh_fixperms -i
-       debian/tocsubstvars -i
-       dh_installdeb -i
-       dh_gencontrol -i
-       dh_md5sums -i
-       dh_builddeb -i
-
-
-.PHONY: binary-arch
-binary-arch:   build install
-#       There are no architecture-dependent files to be uploaded
-#       generated by this package.
-
-define checkdir
-       test -f debian/rules
-       test -f index.dbk
-endef
-
-# Below here is fairly generic really
-
-define checkroot
-       test `id -u` = 0
-endef
-
-.PHONY: binary
-binary:                binary-indep binary-arch
+.PHONY: update-l10n-files