On Tue, Mar 30, 2010 at 06:15:26PM +0200, Julian Andres Klode wrote: > Package: wnpp > Severity: wishlist > Owner: Julian Andres Klode <jak@debian.org> > > * Package name : dh-autoreconf > Version : 1 > Upstream Author : Julian Andres Klode <jak@debian.org> > * License : GPL-2 > Programming Lang: Perl > Description : debhelper add-on to call autoreconf and clean up after the build > > Package: dh-autoreconf > Architecture: all > Depends: ${misc:Depends}, autoconf, automake | automaken, libtool > Description: debhelper add-on to call autoreconf and clean up after the build > dh-autoreconf provides a debhelper sequence addon named 'autoreconf' and two > commands, dh_autoreconf and dh_autoreconf_clean. > . > The dh_autoreconf command creates a list of the files and their checksums, > calls autoreconf and then creates a second list for the new files. > . > The dh_autoreconf_clean command compares these two lists and removes all > files which have been added or changed (files may be excluded if needed). > > I am using this inside the gnome-main-menu package and it works perfectly, > although a bit slow because it creates md5sums of the whole source tree > two times (I may add an option to use timestamp+size instead for larger > source packages). > It seems that we could also read the requested versions of automake and autoconf from debian/control and export them automatically using: # Setup the environment for autoreconf to run the correct versions sub program { my $program=shift; my $version=""; open (CONTROL, 'debian/control') || error("cannot read debian/control: $!\n"); foreach my $builddeps (join('', <CONTROL>) =~ /^Build-Depends[^:]*:.*\n(?:^[^\w\n].*\n)*/gmi) { while ($builddeps =~ /$program([0-9.]+)/g) { error("Multiple versions of $program requested ($version, $1)") if ($version ne ""); $version=$1; } } close CONTROL; return $version eq "" ? $program : $program."-".$version; } $ENV{"AUTOCONF"} = program("autoconf") if not defined $ENV{"AUTOCONF"}; $ENV{"AUTOHEADER"} = program("autoconf") if not defined $ENV{"AUTOHEADER"}; $ENV{"ACLOCAL"} = program("automake") if not defined $ENV{"ACLOCAL"}; $ENV{"AUTOMAKE"} = program("automake") if not defined $ENV{"AUTOMAKE"}; Does this sound like a good idea? -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
Attachment:
pgpLH_Ts_UkGi.pgp
Description: PGP signature