r22956 - in /packages/unstable/gnome-main-menu/debian: changelog dh_autoreconf dh_autoreconf_clean patches/series rules

jak at users.alioth.debian.org jak at users.alioth.debian.org
Wed Feb 3 16:57:29 UTC 2010


Author: jak
Date: Wed Feb  3 16:57:27 2010
New Revision: 22956

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=22956
Log:
debian/rules: Use dh_autoreconf instead of manual autoreconf stuff.

Added:
    packages/unstable/gnome-main-menu/debian/dh_autoreconf   (with props)
    packages/unstable/gnome-main-menu/debian/dh_autoreconf_clean   (with props)
Modified:
    packages/unstable/gnome-main-menu/debian/changelog
    packages/unstable/gnome-main-menu/debian/patches/series
    packages/unstable/gnome-main-menu/debian/rules

Modified: packages/unstable/gnome-main-menu/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-main-menu/debian/changelog?rev=22956&op=diff
==============================================================================
--- packages/unstable/gnome-main-menu/debian/changelog [utf-8] (original)
+++ packages/unstable/gnome-main-menu/debian/changelog [utf-8] Wed Feb  3 16:57:27 2010
@@ -1,3 +1,9 @@
+gnome-main-menu (0.9.13-4) UNRELEASED; urgency=low
+
+  * debian/rules: Use dh_autoreconf instead of manual autoreconf stuff.
+
+ -- Julian Andres Klode <jak at debian.org>  Wed, 03 Feb 2010 16:31:22 +0100
+
 gnome-main-menu (0.9.13-3) unstable; urgency=low
 
   * debian/patches: Add DEP-3 headers to all our patches.

Added: packages/unstable/gnome-main-menu/debian/dh_autoreconf
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-main-menu/debian/dh_autoreconf?rev=22956&op=file
==============================================================================
--- packages/unstable/gnome-main-menu/debian/dh_autoreconf (added)
+++ packages/unstable/gnome-main-menu/debian/dh_autoreconf [utf-8] Wed Feb  3 16:57:27 2010
@@ -1,0 +1,48 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_autoreconf - Call autoreconf -f -i and keep track of the changed files.
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_autoreconf> [S<I<debhelper options>>]
+
+=head1 DESCRIPTION
+
+dh_autoreconf is responsible for calling autoreconf and creating the files
+debian/autoreconf.before and debian/autoreconf.after which contain the md5sum
+of all files before/after the build. It is complemented by dh_autoreconf_clean
+which creates a list of all changed and added files and removes them.
+
+=cut
+
+init();
+
+# Create a list of all the files
+complex_doit('find -type f | xargs md5sum > debian/autoreconf.before');
+
+# Run autoreconf to recreate the needed files.
+doit('autoreconf', '-f', '-i');
+
+# Create a list of all the files (compared later on)
+complex_doit('find -type f | xargs md5sum > debian/autoreconf.after');
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of autotools-dev but made for debhelper.
+
+L<dh_autoreconf_clean(1)>
+
+=head1 AUTHOR
+
+Julian Andres Klode <jak at debian.org>
+
+=cut

Propchange: packages/unstable/gnome-main-menu/debian/dh_autoreconf
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/unstable/gnome-main-menu/debian/dh_autoreconf_clean
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-main-menu/debian/dh_autoreconf_clean?rev=22956&op=file
==============================================================================
--- packages/unstable/gnome-main-menu/debian/dh_autoreconf_clean (added)
+++ packages/unstable/gnome-main-menu/debian/dh_autoreconf_clean [utf-8] Wed Feb  3 16:57:27 2010
@@ -1,0 +1,88 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_autoreconf_clean - Clean all changes made by dh_autoreconf
+
+=cut
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_autoreconf_clean> [S<I<debhelper options>>] [B<-X>I<item>]
+
+=head1 DESCRIPTION
+
+dh_autoreconf_clean removes all files which have been created or changed
+during the autoreconf call executed by L<dh_autoreconf(1)>.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-X>I<item> B<--exclude=>I<item>
+
+Exclude files that contain "item" anywhere in their filename from being
+deleted, even if they would normally be deleted. You may use this option
+multiple times to build up a list of things to exclude.
+
+=back
+
+=cut
+
+init();
+
+if (! -r 'debian/autoreconf.before' || ! -r 'debian/autoreconf.after') {
+    exit 0;
+}
+
+# Mapping of filename => md5sum (the old state will be stored here).
+my %oldstate = ();
+# An array of the names of the files which should be removed.
+my @delete = ();
+
+# Populate %oldstate using the state before running autoreconf.
+open(FILE, 'debian/autoreconf.before') or die($!);
+while(<FILE>) {
+    chomp($_);
+    my ($checksum, $filename) = split;
+    $oldstate{$filename} = $checksum;
+}
+close(FILE);
+
+# Read the new files
+open(FILE, 'debian/autoreconf.after') or die($!);
+while(<FILE>) {
+    chomp($_);
+    my ($checksum, $filename) = split;
+    # Mark a file for deletion if its new or if it has changed; but only if
+    # it is not excluded and if it is not inside debian/.
+    push @delete, $filename if ((!defined($oldstate{$filename}) ||
+                                 $oldstate{$filename} ne $checksum)
+                                && !excludefile($_)
+                                && ($filename !~ /^.\/debian\//));
+}
+close(FILE);
+
+# Cleanup
+doit('rm', '-f', '--', @delete) if @delete;
+doit('rm', '-f', 'debian/autoreconf.before', 'debian/autoreconf.after');
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of autotools-dev but made for debhelper.
+
+L<dh_autoreconf(1)>
+
+=head1 AUTHOR
+
+Julian Andres Klode <jak at debian.org>
+
+The documentation for the B<-X> option was taken from L<dh_clean(1)> which
+was written by Joey Hess <joeyh at debian.org>.
+
+=cut

Propchange: packages/unstable/gnome-main-menu/debian/dh_autoreconf_clean
------------------------------------------------------------------------------
    svn:executable = *

Modified: packages/unstable/gnome-main-menu/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-main-menu/debian/patches/series?rev=22956&op=diff
==============================================================================
--- packages/unstable/gnome-main-menu/debian/patches/series [utf-8] (original)
+++ packages/unstable/gnome-main-menu/debian/patches/series [utf-8] Wed Feb  3 16:57:27 2010
@@ -1,7 +1,7 @@
 fix-trigger-panel-run-dialog.diff
 default-applications.diff
 #gnome-session-kill.diff
-ltmain-as-needed.diff
+#ltmain-as-needed.diff
 non-linux.diff
 respect-nautilus-spacial-setting.diff
 applet-category.diff

Modified: packages/unstable/gnome-main-menu/debian/rules
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/gnome-main-menu/debian/rules?rev=22956&op=diff
==============================================================================
--- packages/unstable/gnome-main-menu/debian/rules [utf-8] (original)
+++ packages/unstable/gnome-main-menu/debian/rules [utf-8] Wed Feb  3 16:57:27 2010
@@ -1,30 +1,21 @@
 #!/usr/bin/make -f
 export LDFLAGS += -Wl,--as-needed
 export DEB_BUILD_OPTIONS += nocheck
-
 include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
 include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
 
 %:
 	dh --with quilt $@
 
-
-override_dh_auto_clean:
-	dh_auto_clean
-
-	# Cleanup
-	find -type d -name autom4te.cache -print0 | xargs -0 -r rm -rf \;
-	find -type d -name build -print0 | xargs -0 -r rm -rf \;
-	find -type f -name Makefile.in -print0 | xargs -0 -r rm -f \;
-	rm -f configure config.sub config.guess aclocal.m4 config.h.in
-
+override_dh_clean:
+	perl -w ./debian/dh_autoreconf_clean
+	dh_clean
+	
 clean::
 	dh $@
 
 override_dh_auto_configure:
-	ln -s /usr/share/misc/config.sub .
-	ln -s /usr/share/misc/config.guess .
-	autoreconf -fi
+	perl -w ./debian/dh_autoreconf
 	dh_auto_configure -- --with-gconf-schema-file-dir=/usr/share/gconf/schemas \
                              --libexecdir=/usr/lib/gnome-main-menu \
                              --bindir=/usr/lib/gnome-main-menu




More information about the pkg-gnome-commits mailing list