[SCM] Debian packaging of CPANPLUS CPAN distribution branch, master, updated. 50ef24523dd5c80e2063958d3ec3d577f59426c9

gregor herrmann gregoa at debian.org
Mon May 20 19:21:39 UTC 2013


The following commit has been merged in the master branch:
commit 7258f9c2853bab5aed1194db6398537bc1b9009d
Author: gregor herrmann <gregoa at debian.org>
Date:   Mon May 20 21:17:29 2013 +0200

    add preist/postrm with diversion for scripts/manpages from perl-core

diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..ddd680a
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = remove ]
+then
+    dpkg-divert --remove --package libcpanplus-perl --rename \
+        --divert /usr/bin/cpanp.bundled /usr/bin/cpanp
+    dpkg-divert --remove --package libcpanplus-perl --rename \
+        --divert /usr/bin/cpan2dist.bundled /usr/bin/cpan2dist
+    dpkg-divert --remove --package libcpanplus-perl --rename \
+        --divert /usr/bin/cpanp-run-perl.bundled /usr/bin/cpanp-run-perl
+
+    dpkg-divert --remove --package libcpanplus-perl --rename \
+        --divert /usr/share/man/man1/cpanp.bundled.1.gz /usr/share/man/man1/cpanp.1.gz
+    dpkg-divert --remove --package libcpanplus-perl --rename \
+        --divert /usr/share/man/man1/cpan2dist.bundled.1.gz /usr/share/man/man1/cpan2dist.1.gz
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/preinst b/debian/preinst
new file mode 100644
index 0000000..1f9d138
--- /dev/null
+++ b/debian/preinst
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = install ] || [ "$1" = upgrade ]
+then
+    dpkg-divert --add --package libcpanplus-perl --rename \
+        --divert /usr/bin/cpanp.bundled /usr/bin/cpanp
+    dpkg-divert --add --package libcpanplus-perl --rename \
+        --divert /usr/bin/cpan2dist.bundled /usr/bin/cpan2dist
+    dpkg-divert --add --package libcpanplus-perl --rename \
+        --divert /usr/bin/cpanp-run-perl.bundled /usr/bin/cpanp-run-perl
+
+    # this diversion is needed even if we don't actually ship cpan*.1.gz,
+    # because otherwise it takes precedence over cpan*.1p.gz (which we do
+    # ship)
+    dpkg-divert --add --package libcpanplus-perl --rename \
+        --divert /usr/share/man/man1/cpanp.bundled.1.gz /usr/share/man/man1/cpanp.1.gz
+    dpkg-divert --add --package libcpanplus-perl --rename \
+        --divert /usr/share/man/man1/cpan2dist.bundled.1.gz /usr/share/man/man1/cpan2dist.1.gz
+fi
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

-- 
Debian packaging of CPANPLUS CPAN distribution



More information about the Pkg-perl-cvs-commits mailing list