]> git.donarmstrong.com Git - debhelper.git/blobdiff - debian/rules
r1990: releasing version 5.0.46
[debhelper.git] / debian / rules
index 4029f2092af6ab952c794d2892ea56dfbde0ae13..af5c5e341107c21b76436ebe7f60a23fb43a84cc 100755 (executable)
@@ -26,23 +26,30 @@ MAKEMANLIST=perl -e ' \
                }'
 
 # Figure out the `current debhelper version.
-VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')
+VERSION=$(shell expr "`dpkg-parsechangelog |grep Version:`" : '.*Version: \(.*\)')
 
 PERLLIBDIR=$(shell perl -MConfig -e 'print $$Config{vendorlib}')
 
 POD2MAN=pod2man -c Debhelper -r "$(VERSION)"
 
-build: test build-stamp
+# l10n to be built is determined from .po files
+LANGS=$(notdir $(basename $(wildcard man/po4a/po/*.po)))
+
+version:
+       printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';\n1" > \
+               Debian/Debhelper/Dh_Version.pm
+
+build: version test build-stamp
 build-stamp:
        find . -maxdepth 1 -type f -perm +100 -name "dh_*" \
                -exec $(POD2MAN) {} {}.1 \;
        cat debhelper.pod | \
                $(MAKEMANLIST) `find . -maxdepth 1 -type f -perm +100 -name "dh_*" | sort` | \
-               $(POD2MAN) --section=7  > debhelper.7
-       po4a po/po4a.cfg 
+               $(POD2MAN) --name="debhelper" --section=7  > debhelper.7
+       po4a man/po4a/po4a.cfg 
        set -e; \
-       for dir in man/*; do \
-               lang=`basename $$dir`; \
+       for lang in $(LANGS); do \
+               dir=man/$$lang; \
                for file in $$dir/dh_*.pod; do \
                        prog=`basename $$file | sed 's/.pod//'`; \
                        $(POD2MAN) $$file $$prog.$$lang.1; \
@@ -52,17 +59,18 @@ build-stamp:
                        $(POD2MAN) --section=7 > debhelper.$$lang.7; \
        done
        
-       printf "package Debian::Debhelper::Dh_Version;\n\$$version='$(VERSION)';" > \
-               Debian/Debhelper/Dh_Version.pm
        touch build-stamp
 
 clean:
        ./run dh_testdir
        ./run dh_testroot
        ./run dh_clean *.1 *.7 *-stamp Debian/Debhelper/Dh_Version.pm
-       rm -rf man
+       po4a --rm-translations --rm-backups man/po4a/po4a.cfg
+       for lang in $(LANGS); do \
+               if [ -e man/$$lang ]; then rmdir man/$$lang; fi; \
+       done;
 
-test: test-stamp
+test: version test-stamp
 test-stamp:
        ./run dh_clean
        ./run perl -MTest::Harness -e 'runtests grep { ! /CVS/ && ! /\.svn/ } @ARGV' t/*
@@ -80,7 +88,6 @@ binary-indep: build
        ./run dh_installexamples examples/*
        ./run dh_installman *.1 *.7
        ./run dh_installchangelogs
-       ./run dh_shlibdeps
        ./run dh_link
        ./run dh_compress
        ./run dh_fixperms
@@ -90,12 +97,9 @@ binary-indep: build
        ./run dh_md5sums
        ./run dh_builddeb
 
-# Update the debhelper web page. Not intended for use by anyone except the
-# author.
-DIR=/home/web/kitenet.net/programs/debhelper
-installhook:
-       cp debian/changelog $(DIR)/CHANGES
-       echo -n $(VERSION) > $(DIR)/LATEST-VERSION-IS
+# Not intended for use by anyone except the author.
+announcedir:
+       @echo ${HOME}/src/joeywiki/code/debhelper/news
 
 binary-arch:
 binary: binary-indep binary-arch