fixup git-merge-changelog package
authorIan Beckwith <ianb@erislabs.net>
Sun, 2 Mar 2014 21:59:20 +0000 (21:59 +0000)
committerIan Beckwith <ianb@erislabs.net>
Sun, 2 Mar 2014 21:59:20 +0000 (21:59 +0000)
debian/README.git-merge-changelog [deleted file]
debian/changelog
debian/clscan/copyright.in
debian/control
debian/copyright
debian/git-merge-changelog.README.Debian [new file with mode: 0644]
debian/git-merge-changelog.manpages [new file with mode: 0644]
debian/git-merge-changelog.pod [new file with mode: 0644]
debian/rules

diff --git a/debian/README.git-merge-changelog b/debian/README.git-merge-changelog
deleted file mode 100644 (file)
index e68b69f..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-
-/* README:
-   The default merge driver of 'git' *always* produces conflicts when
-   pulling public modifications into a privately modified ChangeLog file.
-   This is because ChangeLog files are always modified at the top; the
-   default merge driver has no clue how to deal with this. Furthermore
-   the conflicts are presented with more <<<< ==== >>>> markers than
-   necessary; this is because the default merge driver makes pointless
-   efforts to look at the individual line changes inside a ChangeLog entry.
-
-   This program serves as a 'git' merge driver that avoids these problems.
-   1. It produces no conflict when ChangeLog entries have been inserted
-      at the top both in the public and in the private modification. It
-      puts the privately added entries above the publicly added entries.
-   2. It respects the structure of ChangeLog files: entries are not split
-      into lines but kept together.
-   3. It also handles the case of small modifications of past ChangeLog
-      entries, or of removed ChangeLog entries: they are merged as one
-      would expect it.
-   4. Conflicts are presented at the top of the file, rather than where
-      they occurred, so that the user will see them immediately. (Unlike
-      for source code written in some programming language, conflict markers
-      that are located several hundreds lines from the top will not cause
-      any syntax error and therefore would be likely to remain unnoticed.)
- */
-
-/* Installation:
-
-   For git users:
-     - Add to .git/config of the checkout (or to your $HOME/.gitconfig) the
-       lines
-
-          [merge "merge-changelog"]
-                  name = GNU-style ChangeLog merge driver
-                  driver = /usr/bin/git-merge-changelog %O %A %B
-
-     - In every directory that contains a ChangeLog file, add a file
-       '.gitattributes' with this line:
-
-          ChangeLog    merge=merge-changelog
-
-       (See "man 5 gitattributes" for more info.)
-
-   For bzr users:
-     - Install the 'extmerge' bzr plug-in listed at
-         <http://doc.bazaar.canonical.com/plugins/en/index.html>
-         <http://wiki.bazaar.canonical.com/BzrPlugins>
-     - Add to your $HOME/.bazaar/bazaar.conf the line
-
-          external_merge = git-merge-changelog %b %T %o
-
-     - Then, to merge a conflict in a ChangeLog file, use
-
-          $ bzr extmerge ChangeLog
-
-   For hg users:
-     - Add to your $HOME/.hgrc the lines
-
-        [merge-patterns]
-        ChangeLog = git-merge-changelog
-
-        [merge-tools]
-        git-merge-changelog.executable = /usr/bin/git-merge-changelog
-        git-merge-changelog.args = $base $local $other
-
-       See <http://www.selenic.com/mercurial/hgrc.5.html> section merge-tools
-       for reference.
- */
-
-/* Use as an alternative to 'diff3':
-   git-merge-changelog performs the same role as "diff3 -m", just with
-   reordered arguments:
-     $ git-merge-changelog %O %A %B
-   is comparable to
-     $ diff3 -m %A %O %B
- */
-
-/* Calling convention:
-   A merge driver is called with three filename arguments:
-     1. %O = The common ancestor of %A and %B.
-     2. %A = The file's contents from the "current branch".
-     3. %B = The file's contents from the "other branch"; this is the contents
-        being merged in.
-
-   In case of a "git stash apply" or of an upstream pull (e.g. from a subsystem
-   maintainer to a central maintainer) or of a downstream pull with --rebase:
-     2. %A = The file's newest pulled contents; modified by other committers.
-     3. %B = The user's newest copy of the file; modified by the user.
-   In case of a downstream pull (e.g. from a central repository to the user)
-   or of an upstream pull with --rebase:
-     2. %A = The user's newest copy of the file; modified by the user.
-     3. %B = The file's newest pulled contents; modified by other committers.
-
-   It should write its merged output into file %A. It can also echo some
-   remarks to stdout.  It should exit with return code 0 if the merge could
-   be resolved cleanly, or with non-zero return code if there were conflicts.
- */
-
-/* How it works:
-   The structure of a ChangeLog file: It consists of ChangeLog entries. A
-   ChangeLog entry starts at a line following a blank line and that starts with
-   a non-whitespace character, or at the beginning of a file.
-   The merge driver works as follows: It reads the three files into memory and
-   dissects them into ChangeLog entries. It then finds the differences between
-   %O and %B. They are classified as:
-     - removals (some consecutive entries removed),
-     - changes (some consecutive entries removed, some consecutive entries
-       added),
-     - additions (some consecutive entries added).
-   The driver then attempts to apply the changes to %A.
-   To this effect, it first computes a correspondence between the entries in %O
-   and the entries in %A, using fuzzy string matching to still identify changed
-   entries.
-     - Removals are applied one by one. If the entry is present in %A, at any
-       position, it is removed. If not, the removal is marked as a conflict.
-     - Additions at the top of %B are applied at the top of %A.
-     - Additions between entry x and entry y (y may be the file end) in %B are
-       applied between entry x and entry y in %A (if they still exist and are
-       still consecutive in %A), otherwise the additions are marked as a
-       conflict.
-     - Changes are categorized into "simple changes":
-         entry1 ... entryn
-       are mapped to
-         added_entry ... added_entry modified_entry1 ... modified_entryn,
-       where the correspondence between entry_i and modified_entry_i is still
-       clear; and "big changes": these are all the rest. Simple changes at the
-       top of %B are applied by putting the added entries at the top of %A. The
-       changes in simple changes are applied one by one; possibly leading to
-       single-entry conflicts. Big changes are applied en bloc, possibly
-       leading to conflicts spanning multiple entries.
-     - Conflicts are output at the top of the file and cause an exit status of
-       1.
- */
index 674b3b4..e11c841 100644 (file)
@@ -1,13 +1,17 @@
 gnulib (20140202+stable-2) unstable; urgency=low
 
-  * Don't hardcode gnulib directory in 01-gnulib-directory.patch.
-    Instead, install gnulib-tool into the gnulib directory and symlink to
-    it from /usr/bin, like the docs say to do.
-  * Package git-merge-changelog (Closes: #646013).
-  * Override for lintian getting confused by example GFDL blurbs.
-  * Bump debhelper compat level to 9 for hardening flags.
-
- -- Samuel Bronson <naesten@gmail.com>  Wed, 06 Nov 2013 21:41:19 -0500
+  * New package: git-merge-changelog (Closes: #646013).
+  * Thanks to Samuel Bronson <naesten@gmail.com> for
+    the git-merge-changelog patches:
+    + debian/ changes for git-merge-changelog.
+    + Don't hardcode gnulib directory in 01-gnulib-directory.patch.
+      Instead, install gnulib-tool into the gnulib directory and symlink to
+      it from /usr/bin, like the docs say to do.
+    + Bump debhelper compat level to 9 for hardening flags.
+  * Man page for git-merge-changelog adapted
+    from comments at the top of git-merge-changelog.c
+
+ -- Ian Beckwith <ianb@debian.org>  Sun, 02 Mar 2014 19:39:23 +0000
 
 gnulib (20140202+stable-1) unstable; urgency=low
 
index ee8ab6b..1f04bc5 100644 (file)
@@ -25,6 +25,23 @@ License:
  Detailed copyright information follows, see debian/clscan/README
  in the gnulib source package for information on updating this.
 
+Files: debian/git-merge-changelog.pod
+Copyright: 2008-2010 Bruno Haible <bruno@clisp.org>
+           2014 Ian Beckwith <ianb@debian.org>
+License: GPL-2+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 Files: debian/*
 Copyright: 2009-2014 Ian Beckwith <ianb@debian.org>
            2006-2008 Daniel Baumann <daniel@debian.org>
index 0eecc35..ea337af 100644 (file)
@@ -2,7 +2,7 @@ Source: gnulib
 Section: devel
 Priority: optional
 Maintainer: Ian Beckwith <ianb@debian.org>
-Build-Depends: dpkg-dev (>= 1.16.2), debhelper (>= 9), autoconf, automake
+Build-Depends: dpkg-dev (>= 1.16.2), debhelper (>= 9), autoconf, automake, perl
 Build-Depends-Indep: texinfo
 Standards-Version: 3.9.5
 Homepage: http://www.gnu.org/software/gnulib/
index 4e75a1e..02ecd19 100644 (file)
@@ -25,6 +25,23 @@ License:
  Detailed copyright information follows, see debian/clscan/README
  in the gnulib source package for information on updating this.
 
+Files: debian/git-merge-changelog.pod
+Copyright: 2008-2010 Bruno Haible <bruno@clisp.org>
+           2014 Ian Beckwith <ianb@debian.org>
+License: GPL-2+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 Files: debian/*
 Copyright: 2009-2014 Ian Beckwith <ianb@debian.org>
            2006-2008 Daniel Baumann <daniel@debian.org>
diff --git a/debian/git-merge-changelog.README.Debian b/debian/git-merge-changelog.README.Debian
new file mode 100644 (file)
index 0000000..e68b69f
--- /dev/null
@@ -0,0 +1,133 @@
+
+/* README:
+   The default merge driver of 'git' *always* produces conflicts when
+   pulling public modifications into a privately modified ChangeLog file.
+   This is because ChangeLog files are always modified at the top; the
+   default merge driver has no clue how to deal with this. Furthermore
+   the conflicts are presented with more <<<< ==== >>>> markers than
+   necessary; this is because the default merge driver makes pointless
+   efforts to look at the individual line changes inside a ChangeLog entry.
+
+   This program serves as a 'git' merge driver that avoids these problems.
+   1. It produces no conflict when ChangeLog entries have been inserted
+      at the top both in the public and in the private modification. It
+      puts the privately added entries above the publicly added entries.
+   2. It respects the structure of ChangeLog files: entries are not split
+      into lines but kept together.
+   3. It also handles the case of small modifications of past ChangeLog
+      entries, or of removed ChangeLog entries: they are merged as one
+      would expect it.
+   4. Conflicts are presented at the top of the file, rather than where
+      they occurred, so that the user will see them immediately. (Unlike
+      for source code written in some programming language, conflict markers
+      that are located several hundreds lines from the top will not cause
+      any syntax error and therefore would be likely to remain unnoticed.)
+ */
+
+/* Installation:
+
+   For git users:
+     - Add to .git/config of the checkout (or to your $HOME/.gitconfig) the
+       lines
+
+          [merge "merge-changelog"]
+                  name = GNU-style ChangeLog merge driver
+                  driver = /usr/bin/git-merge-changelog %O %A %B
+
+     - In every directory that contains a ChangeLog file, add a file
+       '.gitattributes' with this line:
+
+          ChangeLog    merge=merge-changelog
+
+       (See "man 5 gitattributes" for more info.)
+
+   For bzr users:
+     - Install the 'extmerge' bzr plug-in listed at
+         <http://doc.bazaar.canonical.com/plugins/en/index.html>
+         <http://wiki.bazaar.canonical.com/BzrPlugins>
+     - Add to your $HOME/.bazaar/bazaar.conf the line
+
+          external_merge = git-merge-changelog %b %T %o
+
+     - Then, to merge a conflict in a ChangeLog file, use
+
+          $ bzr extmerge ChangeLog
+
+   For hg users:
+     - Add to your $HOME/.hgrc the lines
+
+        [merge-patterns]
+        ChangeLog = git-merge-changelog
+
+        [merge-tools]
+        git-merge-changelog.executable = /usr/bin/git-merge-changelog
+        git-merge-changelog.args = $base $local $other
+
+       See <http://www.selenic.com/mercurial/hgrc.5.html> section merge-tools
+       for reference.
+ */
+
+/* Use as an alternative to 'diff3':
+   git-merge-changelog performs the same role as "diff3 -m", just with
+   reordered arguments:
+     $ git-merge-changelog %O %A %B
+   is comparable to
+     $ diff3 -m %A %O %B
+ */
+
+/* Calling convention:
+   A merge driver is called with three filename arguments:
+     1. %O = The common ancestor of %A and %B.
+     2. %A = The file's contents from the "current branch".
+     3. %B = The file's contents from the "other branch"; this is the contents
+        being merged in.
+
+   In case of a "git stash apply" or of an upstream pull (e.g. from a subsystem
+   maintainer to a central maintainer) or of a downstream pull with --rebase:
+     2. %A = The file's newest pulled contents; modified by other committers.
+     3. %B = The user's newest copy of the file; modified by the user.
+   In case of a downstream pull (e.g. from a central repository to the user)
+   or of an upstream pull with --rebase:
+     2. %A = The user's newest copy of the file; modified by the user.
+     3. %B = The file's newest pulled contents; modified by other committers.
+
+   It should write its merged output into file %A. It can also echo some
+   remarks to stdout.  It should exit with return code 0 if the merge could
+   be resolved cleanly, or with non-zero return code if there were conflicts.
+ */
+
+/* How it works:
+   The structure of a ChangeLog file: It consists of ChangeLog entries. A
+   ChangeLog entry starts at a line following a blank line and that starts with
+   a non-whitespace character, or at the beginning of a file.
+   The merge driver works as follows: It reads the three files into memory and
+   dissects them into ChangeLog entries. It then finds the differences between
+   %O and %B. They are classified as:
+     - removals (some consecutive entries removed),
+     - changes (some consecutive entries removed, some consecutive entries
+       added),
+     - additions (some consecutive entries added).
+   The driver then attempts to apply the changes to %A.
+   To this effect, it first computes a correspondence between the entries in %O
+   and the entries in %A, using fuzzy string matching to still identify changed
+   entries.
+     - Removals are applied one by one. If the entry is present in %A, at any
+       position, it is removed. If not, the removal is marked as a conflict.
+     - Additions at the top of %B are applied at the top of %A.
+     - Additions between entry x and entry y (y may be the file end) in %B are
+       applied between entry x and entry y in %A (if they still exist and are
+       still consecutive in %A), otherwise the additions are marked as a
+       conflict.
+     - Changes are categorized into "simple changes":
+         entry1 ... entryn
+       are mapped to
+         added_entry ... added_entry modified_entry1 ... modified_entryn,
+       where the correspondence between entry_i and modified_entry_i is still
+       clear; and "big changes": these are all the rest. Simple changes at the
+       top of %B are applied by putting the added entries at the top of %A. The
+       changes in simple changes are applied one by one; possibly leading to
+       single-entry conflicts. Big changes are applied en bloc, possibly
+       leading to conflicts spanning multiple entries.
+     - Conflicts are output at the top of the file and cause an exit status of
+       1.
+ */
diff --git a/debian/git-merge-changelog.manpages b/debian/git-merge-changelog.manpages
new file mode 100644 (file)
index 0000000..e46b3d7
--- /dev/null
@@ -0,0 +1 @@
+debian/git-merge-changelog.1
diff --git a/debian/git-merge-changelog.pod b/debian/git-merge-changelog.pod
new file mode 100644 (file)
index 0000000..8ef1bbd
--- /dev/null
@@ -0,0 +1,281 @@
+=head1 NAME
+
+git-merge-changelog - git merge driver for GNU ChangeLog files
+
+=head1 DESCRIPTION
+
+The default merge driver of 'git' B<always> produces conflicts when
+pulling public modifications into a privately modified ChangeLog file.
+This is because ChangeLog files are always modified at the top; the
+default merge driver has no clue how to deal with this. Furthermore
+the conflicts are presented with more E<lt>E<lt>E<lt>E<lt> ==== E<gt>E<gt>E<gt>E<gt> markers than
+necessary; this is because the default merge driver makes pointless
+efforts to look at the individual line changes inside a ChangeLog entry.
+
+This program serves as a 'git' merge driver that avoids these problems.
+
+=over 4
+
+=item Z<>1.
+
+It produces no conflict when ChangeLog entries have been inserted
+at the top both in the public and in the private modification. It
+puts the privately added entries above the publicly added entries.
+
+=item Z<>2.
+
+It respects the structure of ChangeLog files: entries are not split
+into lines but kept together.
+
+=item Z<>3.
+
+It also handles the case of small modifications of past ChangeLog
+entries, or of removed ChangeLog entries: they are merged as one
+would expect it.
+
+=item Z<>4.
+
+Conflicts are presented at the top of the file, rather than where
+they occurred, so that the user will see them immediately. (Unlike
+for source code written in some programming language, conflict markers
+that are located several hundreds lines from the top will not cause
+any syntax error and therefore would be likely to remain unnoticed.)
+
+=back
+
+=head2 For git users:
+
+=over 4
+
+=item -
+
+Add to .git/config of the checkout (or to your $HOME/.gitconfig) the
+lines
+
+ [merge "merge-changelog"]
+     name = GNU-style ChangeLog merge driver
+     driver = /usr/bin/git-merge-changelog %O %A %B
+
+=item -
+
+In every directory that contains a ChangeLog file, add a file
+'.gitattributes' with this line:
+
+ ChangeLog    merge=merge-changelog
+
+(See "man 5 gitattributes" for more info.)
+
+=back
+
+=head2 For bzr users:
+
+=over 4
+
+=item -
+
+Install the 'extmerge' bzr plug-in listed at
+L<http://doc.bazaar.canonical.com/plugins/en/index.html>
+L<http://wiki.bazaar.canonical.com/BzrPlugins>
+
+=item -
+
+Add to your $HOME/.bazaar/bazaar.conf the line
+
+ external_merge = git-merge-changelog %b %T %o
+
+=item -
+
+Then, to merge a conflict in a ChangeLog file, use
+
+ $ bzr extmerge ChangeLog
+
+=back
+
+=head2 For hg users:
+
+=over 4
+
+=item -
+
+Add to your $HOME/.hgrc the lines
+
+ [merge-patterns]
+    ChangeLog = git-merge-changelog
+
+ [merge-tools]
+     git-merge-changelog.executable = /usr/bin/git-merge-changelog
+     git-merge-changelog.args = $base $local $other
+
+See L<http://www.selenic.com/mercurial/hgrc.5.html> section B<merge-tools>
+for reference.
+
+=back
+
+=head2 Use as an alternative to 'diff3':
+
+git-merge-changelog performs the same role as "diff3 -m", just with
+reordered arguments:
+
+ $ git-merge-changelog %O %A %B
+
+is comparable to
+
+ $ diff3 -m %A %O %B
+
+=head2 Calling convention:
+
+A merge driver is called with three filename arguments:
+
+=over 4
+
+=item Z<>1.
+
+%O = The common ancestor of %A and %B.
+
+=item Z<>2.
+
+%A = The file's contents from the "current branch".
+
+=item Z<>3.
+
+%B = The file's contents from the "other branch"; this is the contents
+being merged in.
+
+=back
+
+In case of a "git stash apply" or of an upstream pull (e.g. from a subsystem
+maintainer to a central maintainer) or of a downstream pull with --rebase:
+
+=over 4
+
+=item Z<>2.
+
+%A = The file's newest pulled contents; modified by other committers.
+
+=item Z<>3.
+
+%B = The user's newest copy of the file; modified by the user.
+
+=back
+
+In case of a downstream pull (e.g. from a central repository to the user)
+or of an upstream pull with --rebase:
+
+=over 4
+
+=item Z<>2.
+
+%A = The user's newest copy of the file; modified by the user.
+
+=item Z<>3.
+
+%B = The file's newest pulled contents; modified by other committers.
+
+=back
+
+It should write its merged output into file %A. It can also echo some
+remarks to stdout.  It should exit with return code 0 if the merge could
+be resolved cleanly, or with non-zero return code if there were conflicts.
+
+=head2 How it works:
+
+The structure of a ChangeLog file: It consists of ChangeLog entries. A
+ChangeLog entry starts at a line following a blank line and that starts with
+a non-whitespace character, or at the beginning of a file.
+The merge driver works as follows: It reads the three files into memory and
+dissects them into ChangeLog entries. It then finds the differences between
+%O and %B. They are classified as:
+
+=over 4
+
+=item -
+
+removals (some consecutive entries removed),
+
+=item -
+
+changes (some consecutive entries removed, some consecutive entries added),
+
+=item -
+
+additions (some consecutive entries added).
+
+=back
+
+The driver then attempts to apply the changes to %A.
+To this effect, it first computes a correspondence between the entries in %O
+and the entries in %A, using fuzzy string matching to still identify changed
+entries.
+
+=over 4
+
+=item -
+
+Removals are applied one by one. If the entry is present in %A, at any
+position, it is removed. If not, the removal is marked as a conflict.
+
+=item -
+
+Additions at the top of %B are applied at the top of %A.
+
+=item -
+
+Additions between entry x and entry y (y may be the file end) in %B are
+applied between entry x and entry y in %A (if they still exist and are
+still consecutive in %A), otherwise the additions are marked as a
+conflict.
+
+=item -
+
+Changes are categorized into "simple changes":
+ entry1 ... entryn
+are mapped to
+ added_entry ... added_entry modified_entry1 ... modified_entryn,
+where the correspondence between entry_i and modified_entry_i is still
+clear; and "big changes": these are all the rest. Simple changes at the
+top of %B are applied by putting the added entries at the top of %A. The
+changes in simple changes are applied one by one; possibly leading to
+single-entry conflicts. Big changes are applied en bloc, possibly
+leading to conflicts spanning multiple entries.
+
+=item -
+
+Conflicts are output at the top of the file and cause an exit status of 1.
+
+=back
+
+=head1 SEE ALSO
+
+git(1), git-merge(1)
+
+=head1 AUTHOR
+
+The git-merge-changelog author and maintainer is Bruno Haible.
+
+This man page was adapted by Ian Beckwith from the comments at the top
+of git-merge-changelog.c.
+
+=head1 AVAILABILITY
+
+git-merge-changelog is part of the GNU gnulib project.
+
+Gnulib home page: L<http://www.gnu.org/software/gnulib/>
+
+=head1 COPYRIGHT
+
+Copyright (C) 2008-2010 Bruno Haible E<lt>bruno@clisp.orgE<gt>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see L<http://www.gnu.org/licenses/>
+
+=cut
index 1dec219..8cdf024 100755 (executable)
@@ -1,36 +1,41 @@
 #!/usr/bin/make -f
 
+#EXPORT DH_VERBOSE=1
+
 %:
-       dh ${@} --sourcedirectory=utils
+       dh ${@}
 
 override_dh_auto_clean:
        $(MAKE) -C doc clean
-       rm -rf utils/*
+       -rm -rf debian/git-merge-changelog.src
+       -rm -f debian/git-merge-changelog.1
        dh_auto_clean
 
 override_dh_auto_configure-arch:
        ./gnulib-tool --create-testdir --without-tests -S \
-               --dir=utils git-merge-changelog
-       dh_auto_configure
-
-override_dh_auto_install-arch:
-       dh_auto_install --destdir=debian/git-merge-changelog
+               --dir=debian/git-merge-changelog.src git-merge-changelog
+       dh_auto_configure --sourcedir debian/git-merge-changelog.src
 
 override_dh_auto_build-indep:
        $(MAKE) -C doc info
        $(MAKE) -C doc html
 
+override_dh_auto_build-arch:
+       dh_auto_build --sourcedir debian/git-merge-changelog.src
+       pod2man --section=1 debian/git-merge-changelog.pod debian/git-merge-changelog.1
+
+override_dh_auto_install-arch:
+       dh_auto_install --sourcedir=debian/git-merge-changelog.src --destdir=debian/git-merge-changelog
+
 override_dh_auto_install-indep:
        mkdir -p debian/gnulib/usr/bin
        cp -a check-module debian/gnulib/usr/bin
-
        mkdir -p debian/gnulib/usr/share/gnulib
        cp -a build-aux posix-modules config doc lib m4 modules top tests \
              MODULES.html.sh Makefile gnulib-tool \
              debian/gnulib/usr/share/gnulib
        ln -s ../share/gnulib/gnulib-tool debian/gnulib/usr/bin
-
-       # Fixing permissions
+       # Fix permissions
        chmod 0755 debian/gnulib/usr/share/gnulib/build-aux/config.guess
        chmod 0755 debian/gnulib/usr/share/gnulib/build-aux/config.sub
        chmod 0755 debian/gnulib/usr/share/gnulib/build-aux/gendocs.sh
@@ -45,8 +50,7 @@ override_dh_auto_install-indep:
        chmod 0644 debian/gnulib/usr/share/gnulib/tests/test-fflush.c
        chmod 0755 debian/gnulib/usr/share/gnulib/tests/test-posix_spawn1.in.sh
        chmod 0755 debian/gnulib/usr/share/gnulib/tests/test-posix_spawn2.in.sh
-
-       # Removing unused files
+       # Remove unused files
        rm -f debian/gnulib/usr/share/gnulib/modules/COPYING
        rm -f debian/gnulib/usr/share/gnulib/*/.cvsignore
        rm -f debian/gnulib/usr/share/gnulib/*/.gitignore