Package: python-support
Version: 0.2.2
Hi,
Attached is the diff for my python-support 0.2.3 NMU.
--
Raphaël Hertzog
Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/debian/changelog
/tmp/nadpDYxcB2/python-support-0.2.3/debian/changelog
--- /tmp/qo5noB02P7/python-support-0.2.2/debian/changelog 2006-05-03
18:51:05.000000000 +0200
+++ /tmp/nadpDYxcB2/python-support-0.2.3/debian/changelog 2006-06-12
18:16:32.000000000 +0200
@@ -1,3 +1,11 @@
+python-support (0.2.3) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Integrate dh_pysupport and generate the corresponding man-page.
+ Closes: #372774
+
+ -- Raphael Hertzog <[EMAIL PROTECTED]> Mon, 12 Jun 2006 17:59:47 +0200
+
python-support (0.2.2) unstable; urgency=low
* Rewrite the version parser to correctly handle the "-2.x" version
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/debian/control
/tmp/nadpDYxcB2/python-support-0.2.3/debian/control
--- /tmp/qo5noB02P7/python-support-0.2.2/debian/control 2006-05-03
18:47:24.000000000 +0200
+++ /tmp/nadpDYxcB2/python-support-0.2.3/debian/control 2006-06-12
18:28:10.000000000 +0200
@@ -3,6 +3,7 @@
Priority: optional
Maintainer: Josselin Mouette <[EMAIL PROTECTED]>
Build-Depends: debhelper (>= 4.1), cdbs
+Build-Depends-Indep: perl
Standards-Version: 3.7.0
Package: python-support
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/debian/install
/tmp/nadpDYxcB2/python-support-0.2.3/debian/install
--- /tmp/qo5noB02P7/python-support-0.2.2/debian/install 2006-01-02
14:52:17.000000000 +0100
+++ /tmp/nadpDYxcB2/python-support-0.2.3/debian/install 2006-06-12
18:04:18.000000000 +0200
@@ -1 +1,4 @@
update-python-modules /usr/sbin/
+dh_pysupport /usr/sbin/
+postinst-python-support /usr/share/debhelper/autoscripts/
+prerm-python-support /usr/share/debhelper/autoscripts/
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/debian/manpages
/tmp/nadpDYxcB2/python-support-0.2.3/debian/manpages
--- /tmp/qo5noB02P7/python-support-0.2.2/debian/manpages 2006-01-02
16:01:49.000000000 +0100
+++ /tmp/nadpDYxcB2/python-support-0.2.3/debian/manpages 2006-06-12
18:17:20.000000000 +0200
@@ -1 +1,2 @@
update-python-modules.8
+dh_pysupport.1
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/debian/rules
/tmp/nadpDYxcB2/python-support-0.2.3/debian/rules
--- /tmp/qo5noB02P7/python-support-0.2.2/debian/rules 2006-05-03
11:45:04.000000000 +0200
+++ /tmp/nadpDYxcB2/python-support-0.2.3/debian/rules 2006-06-12
18:21:17.000000000 +0200
@@ -2,6 +2,14 @@
include /usr/share/cdbs/1/rules/debhelper.mk
+VERSION=$(shell expr "`dpkg-parsechangelog |grep Version:`" : '.*Version:
\(.*\)')
+
+clean::
+ rm -f dh_pysupport.1
+
+build/python-support::
+ pod2man -c "python-support" -r "$(VERSION)" dh_pysupport dh_pysupport.1
+
binary-install/python-support::
for ver in 2.3 2.4 2.5; do \
mkdir -p debian/python-support/usr/lib/python$$ver/site-packages ;\
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/dh_pysupport
/tmp/nadpDYxcB2/python-support-0.2.3/dh_pysupport
--- /tmp/qo5noB02P7/python-support-0.2.2/dh_pysupport 1970-01-01
01:00:00.000000000 +0100
+++ /tmp/nadpDYxcB2/python-support-0.2.3/dh_pysupport 2006-06-12
18:27:06.000000000 +0200
@@ -0,0 +1,124 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_pysupport - use the python-support framework to handle Python modules
+
+=cut
+
+use strict;
+use File::Find;
+use Debian::Debhelper::Dh_Lib;
+
+=head1 SYNOPSIS
+
+B<dh_pysupport> [S<I<debhelper options>>] [B<-n>] [S<I<module dirs ...>>]
+
+=head1 DESCRIPTION
+
+dh_pysupport is a debhelper program that will scan your package, detect
+public modules in /usr/share/python-support and generate appropriate
+postinst/prerm scripts to byte-compile modules installed there for all
+available python versions.
+
+It will also look for private Python modules and will byte-compile them
+with the current Python version. You may have to list the directories
+containing private Python modules.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<module dirs>
+
+If your package installs private python modules in non-standard directories,
you
+can make dh_pysupport check those directories by passing their names on the
+command line. By default, it will check /usr/lib/$PACKAGE,
+/usr/share/$PACKAGE, /usr/lib/games/$PACKAGE and /usr/share/games/$PACKAGE
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=back
+
+=head1 CONFORMS TO
+
+Python policy as of 2006-06-10
+
+=cut
+
+init();
+
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+ my $tmp = tmpdir($package);
+
+ my @dirs = ("usr/lib/$package", "usr/share/$package",
+ "usr/lib/games/$package", "usr/share/games/$package", @ARGV
);
+ @dirs = grep -d, map "$tmp/$_", @dirs;
+
+ # Look for private python modules
+ my $dirlist="";
+ if (@dirs) {
+ foreach my $curdir (@dirs) {
+ my $has_module = 0;
+ $curdir =~ s%^$tmp/%%;
+ find sub {
+ return unless -f;
+ $has_module = 1 if (/\.py$/);
+ }, "$tmp/$curdir" ;
+ if ($has_module) {
+ $dirlist="$dirlist /$curdir";
+ }
+ }
+ }
+
+ if ($dirlist) {
+ # We have private python modules
+ # Use python-support to ensure that they are always
+ # byte-compiled for the current version
+ mkdir("$tmp/usr/share/python-support");
+ $dirlist =~ s/^\s*//;
+ $dirlist =~ s/\s*$//;
+ open(DIRLIST, "> $tmp/usr/share/python-support/$package.dirs")
||
+ error("Can't create
$tmp/usr/share/python-support/$package.dirs: $!");
+ print DIRLIST join("\n", split(/\s+/, $dirlist));
+ close(DIRLIST);
+ }
+
+ # Add scripts to postinst/prerm depending on what we found
+ if (-d "$tmp/usr/share/python-support") {
+ addsubstvar($package, "python:Depends", "python-support");
+ foreach my $ps_dir (glob("$tmp/usr/share/python-support/*")) {
+ if (-d $ps_dir) {
+ $ps_dir =~ s/^$tmp//;
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($package, "postinst",
"postinst-python-support", "s,#OPTIONS#,-i,;s,#DIRS#,$ps_dir,");
+ autoscript($package, "prerm",
"prerm-python-support", "s,#OPTIONS#,-i,;s,#DIRS#,$ps_dir,");
+ }
+ # TODO: we should generate the
+ # /usr/share/python-support/*/.version from
+ # XS-Python-Version
+ } elsif (-f $ps_dir) {
+ # $ps_dir is a ".dirs" file ...
+ $ps_dir =~ s/^$tmp//;
+ autoscript($package, "postinst",
"postinst-python-support", "s,#OPTIONS#,-b,;s,#DIRS#,$ps_dir,");
+ autoscript($package, "prerm",
"prerm-python-support", "s,#OPTIONS#,-b,;s,#DIRS#,$ps_dir,");
+ }
+ }
+ }
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of python-support but is made to work with debhelper.
+
+=head1 AUTHORS
+
+Josselin Mouette <[EMAIL PROTECTED]>
+Raphael Hertzog <[EMAIL PROTECTED]>
+
+=cut
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/postinst-python-support
/tmp/nadpDYxcB2/python-support-0.2.3/postinst-python-support
--- /tmp/qo5noB02P7/python-support-0.2.2/postinst-python-support
1970-01-01 01:00:00.000000000 +0100
+++ /tmp/nadpDYxcB2/python-support-0.2.3/postinst-python-support
2006-06-12 18:02:14.000000000 +0200
@@ -0,0 +1,3 @@
+if [ "$1" = "configure" ] && which update-python-modules >/dev/null 2>&1; then
+ update-python-modules #OPTIONS# #DIRS#
+fi
diff -Nru /tmp/qo5noB02P7/python-support-0.2.2/prerm-python-support
/tmp/nadpDYxcB2/python-support-0.2.3/prerm-python-support
--- /tmp/qo5noB02P7/python-support-0.2.2/prerm-python-support 1970-01-01
01:00:00.000000000 +0100
+++ /tmp/nadpDYxcB2/python-support-0.2.3/prerm-python-support 2006-06-12
18:02:19.000000000 +0200
@@ -0,0 +1,3 @@
+if which update-python-modules >/dev/null 2>&1; then
+ update-python-modules -c #OPTIONS# #DIRS#
+fi