Am Dienstag, den 16.02.2010, 14:16 -0200 schrieb Henrique de Moraes Holschuh: > Would you agree on _updateconfig and _restoreconfig ?
I've prepared an NMU to finally implement this feature, please find it attached to this mail. I tried to stay close to what has been done in the quilt package, but refrained from changing documentation, package description etc. Cheers, Fabian
diff -Nru autotools-dev-20090611.1/debian/autotools-dev.dirs autotools-dev-20090611.1+nmu1/debian/autotools-dev.dirs --- autotools-dev-20090611.1/debian/autotools-dev.dirs 2009-07-23 22:34:12.000000000 +0200 +++ autotools-dev-20090611.1+nmu1/debian/autotools-dev.dirs 2010-02-17 10:45:25.000000000 +0100 @@ -1 +1,3 @@ +usr/bin usr/share/misc +usr/share/perl5/Debian/Debhelper/Sequence diff -Nru autotools-dev-20090611.1/debian/autotools_dev.pm autotools-dev-20090611.1+nmu1/debian/autotools_dev.pm --- autotools-dev-20090611.1/debian/autotools_dev.pm 1970-01-01 01:00:00.000000000 +0100 +++ autotools-dev-20090611.1+nmu1/debian/autotools_dev.pm 2010-02-17 10:18:42.000000000 +0100 @@ -0,0 +1,9 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Debian::Debhelper::Dh_Lib; + +insert_before("dh_auto_configure", "dh_autotools-dev_updateconfig"); +insert_before("dh_clean", "dh_autotools-dev_restoreconfig"); + +1; diff -Nru autotools-dev-20090611.1/debian/changelog autotools-dev-20090611.1+nmu1/debian/changelog --- autotools-dev-20090611.1/debian/changelog 2009-07-23 22:34:12.000000000 +0200 +++ autotools-dev-20090611.1+nmu1/debian/changelog 2010-02-17 10:53:41.000000000 +0100 @@ -1,3 +1,16 @@ +autotools-dev (20090611.1+nmu1) unstable; urgency=low + + * Non-maintainer upload. + * Add new dh_autotools-dev_updateconfig and dh_autotools-dev_restoreconfig + commands to be used within debhelper. Also add a debhelper addon so that + the dh command can update and restore config.{guess,sub} files with a + simple "dh --with autotools_dev $@" in the tiny rules file provided by + debhelper 7 (Closes: #527581). + * Add Build-Depends-Indep on perl for pod2man and man page generation of the + new dh_autotools-dev_* commands. + + -- Fabian Greffrath <fabian+deb...@greffrath.com> Wed, 17 Feb 2010 10:44:22 +0100 + autotools-dev (20090611.1) unstable; urgency=low * Sync to upstream git 2009-06-11 [8e40fa5a8487dff4] diff -Nru autotools-dev-20090611.1/debian/control autotools-dev-20090611.1+nmu1/debian/control --- autotools-dev-20090611.1/debian/control 2009-07-23 22:34:12.000000000 +0200 +++ autotools-dev-20090611.1+nmu1/debian/control 2010-02-17 10:42:11.000000000 +0100 @@ -3,6 +3,7 @@ Priority: optional Maintainer: Henrique de Moraes Holschuh <h...@debian.org> Build-Depends: debhelper (>> 5) +Build-Depends-Indep: perl Standards-Version: 3.8.0 Homepage: http://savannah.gnu.org/projects/config/ Vcs-Browser: http://git.debian.org/?p=users/hmh/autotools-dev.git diff -Nru autotools-dev-20090611.1/debian/dh_autotools-dev_restoreconfig autotools-dev-20090611.1+nmu1/debian/dh_autotools-dev_restoreconfig --- autotools-dev-20090611.1/debian/dh_autotools-dev_restoreconfig 1970-01-01 01:00:00.000000000 +0100 +++ autotools-dev-20090611.1+nmu1/debian/dh_autotools-dev_restoreconfig 2010-02-17 10:53:41.000000000 +0100 @@ -0,0 +1,57 @@ +#!/usr/bin/perl -w + +=head1 NAME + +dh_autotools-dev_restoreconfig - restore B<config.sub> and B<config.guess> + +=cut + +use strict; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B<dh_autotools-dev_restoreconfig> [S<I<debhelper options>>] + +=head1 DESCRIPTION + +dh_autotools-dev_restoreconfig restores the original B<config.sub> and B<config.guess> +files that have been backed up by dh_autotools-dev_updateconfig under the names +B<config.sub.dh-orig> and B<config.guess.dh-orig>. + +=head1 EXAMPLES + +dh_autotools-dev_restoreconfig is usually called indirectly in a rules file via the +dh command. + + %: + dh --with autotools_dev $@ + +It can also be direcly called in the clean rule. + + clean: + dh_testdir + dh_testroot + [ ! -f Makefile ] || $(MAKE) clean + dh_autotools-dev_restoreconfig + dh_clean + +=cut + +init(); + +complex_doit('for c_g in `find -type f -name config.guess` ; do if test -e $c_g.dh-orig ; then mv -f $c_g.dh-orig $c_g ; fi ; done'); +complex_doit('for c_s in `find -type f -name config.sub` ; do if test -e $c_s.dh-orig ; then mv -f $c_s.dh-orig $c_s ; fi ; done'); + +=head1 SEE ALSO + +L<debhelper(7)>, L<dh(1)>. + +This program is meant to be used together with debhelper. + +=head1 AUTHOR + +Fabian Greffrath <fabian+deb...@greffrath.com> + +=cut + diff -Nru autotools-dev-20090611.1/debian/dh_autotools-dev_updateconfig autotools-dev-20090611.1+nmu1/debian/dh_autotools-dev_updateconfig --- autotools-dev-20090611.1/debian/dh_autotools-dev_updateconfig 1970-01-01 01:00:00.000000000 +0100 +++ autotools-dev-20090611.1+nmu1/debian/dh_autotools-dev_updateconfig 2010-02-17 10:53:41.000000000 +0100 @@ -0,0 +1,57 @@ +#!/usr/bin/perl -w + +=head1 NAME + +dh_autotools-dev_updateconfig - update B<config.sub> and B<config.guess> + +=cut + +use strict; +use Debian::Debhelper::Dh_Lib; + +=head1 SYNOPSIS + +B<dh_autotools-dev_updateconfig> [S<I<debhelper options>>] + +=head1 DESCRIPTION + +dh_autotools-dev_updateconfig replaces all occurances of B<config.sub> and B<config.guess> +in the source tree by the up-to-date versions found in the autotools-dev package. +The original files are backed up under the names B<config.sub.dh-orig> and +B<config.guess.dh-orig>. + +=head1 EXAMPLES + +dh_autotools-dev_updateconfig is usually called indirectly in a rules file via the +dh command. + + %: + dh --with autotools_dev $@ + +It can also be direcly called at the start of the build (or configure) +rule. + + build: + dh_autotools-dev_updateconfig + ./configure + $(MAKE) + +=cut + +init(); + +complex_doit('for c_g in `find -type f -name config.guess` ; do if ! test -e $c_g.dh-orig ; then mv -f $c_g $c_g.dh-orig ; cp -f /usr/share/misc/config.guess $c_g ; fi ; done'); +complex_doit('for c_s in `find -type f -name config.sub` ; do if ! test -e $c_s.dh-orig ; then mv -f $c_s $c_s.dh-orig ; cp -f /usr/share/misc/config.sub $c_s ; fi ; done'); + +=head1 SEE ALSO + +L<debhelper(7)>, L<dh(1)>. + +This program is meant to be used together with debhelper. + +=head1 AUTHOR + +Fabian Greffrath <fabian+deb...@greffrath.com> + +=cut + diff -Nru autotools-dev-20090611.1/debian/rules autotools-dev-20090611.1+nmu1/debian/rules --- autotools-dev-20090611.1/debian/rules 2009-07-23 22:34:12.000000000 +0200 +++ autotools-dev-20090611.1+nmu1/debian/rules 2010-02-17 10:52:56.000000000 +0100 @@ -12,11 +12,14 @@ build: build-stamp build-stamp: dh_testdir + pod2man -c Debhelper debian/dh_autotools-dev_updateconfig debian/dh_autotools-dev_updateconfig.1 + pod2man -c Debhelper debian/dh_autotools-dev_restoreconfig debian/dh_autotools-dev_restoreconfig.1 touch build-stamp clean: dh_testdir dh_testroot + -rm -f debian/dh_autotools-dev_updateconfig.1 debian/dh_autotools-dev_restoreconfig.1 -rm -f build-stamp dh_clean @@ -27,6 +30,8 @@ dh_installdirs install config.guess config.sub $(CURDIR)/debian/autotools-dev/usr/share/misc + install debian/dh_autotools-dev_updateconfig debian/dh_autotools-dev_restoreconfig $(CURDIR)/debian/autotools-dev/usr/bin + install debian/autotools_dev.pm $(CURDIR)/debian/autotools-dev/usr/share/perl5/Debian/Debhelper/Sequence # Build architecture-dependent files here. binary-arch: build install @@ -46,7 +51,7 @@ # dh_installmime # dh_installinit # dh_installcron - dh_installman + dh_installman debian/dh_autotools-dev_updateconfig.1 debian/dh_autotools-dev_restoreconfig.1 # dh_installinfo # dh_undocumented # dh_installchangelogs