r7630 - in /trunk/dh-make-perl: debian/changelog debian/control dh-make-perl
hanska-guest at users.alioth.debian.org
hanska-guest at users.alioth.debian.org
Mon Sep 17 09:21:14 UTC 2007
Author: hanska-guest
Date: Mon Sep 17 09:21:14 2007
New Revision: 7630
URL: http://svn.debian.org/wsvn/?sc=1&rev=7630
Log:
Added automatic fetching of ITP bug number from WNPP
using WWW::Mechanize
Modified:
trunk/dh-make-perl/debian/changelog
trunk/dh-make-perl/debian/control
trunk/dh-make-perl/dh-make-perl
Modified: trunk/dh-make-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/debian/changelog?rev=7630&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Mon Sep 17 09:21:14 2007
@@ -7,8 +7,9 @@
[ David Paleino ]
* Added new command line switch (--closes), to specify the ITP that
the new package is going to close
-
- -- David Paleino <d.paleino at gmail.com> Sun, 16 Sep 2007 13:13:55 +0200
+ * Now dh-make-perl automagically fetches the ITP bug number from WNPP!
+
+ -- David Paleino <d.paleino at gmail.com> Mon, 17 Sep 2007 11:16:21 +0200
dh-make-perl (0.31) unstable; urgency=low
Modified: trunk/dh-make-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/debian/control?rev=7630&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/control (original)
+++ trunk/dh-make-perl/debian/control Mon Sep 17 09:21:14 2007
@@ -15,7 +15,8 @@
Package: dh-make-perl
Architecture: all
Depends: debhelper (>= 4.0.2), libpod-parser-perl, ${perl:Depends}, make,
- dpkg-dev, fakeroot, ${misc:Depends}, libyaml-perl, libmodule-depends-perl
+ dpkg-dev, fakeroot, ${misc:Depends}, libyaml-perl, libmodule-depends-perl,
+ libwww-mechanize-perl
Recommends: apt-file, libmodule-build-perl
Description: Create Debian packages from perl modules
dh-make-perl will create the files required to build a Debian source
Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/dh-make-perl?rev=7630&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Mon Sep 17 09:21:14 2007
@@ -99,7 +99,6 @@
$bdepends = 'debhelper (>= 5.0.0)';
$maintainer = get_maintainer();
$arch = 'all';
-$closes = 'nnnnnn';
$date = `date -R`;
$startdir = getcwd();
$dh_compat = 5;
@@ -189,6 +188,8 @@
create_control("$debiandir/control");
if (defined $opts{closes}) {
$closes = $opts{closes};
+} else {
+ $closes = get_itp($pkgname);
}
create_changelog("$debiandir/changelog", $closes);
create_rules("$debiandir/rules");
@@ -740,6 +741,30 @@
return join (", ", map { $_->{version} ?
$_->{name} ." (>= ". $_->{version} .")" :
$_->{name} } @deps);
+}
+
+sub get_itp {
+ use WWW::Mechanize;
+
+ my ($package) = shift @_;
+
+ my $wnpp = 'http://www.debian.org/devel/wnpp/being_packaged';
+ my $mech = WWW::Mechanize->new();
+
+ $mech->get($wnpp);
+
+ my @links = $mech->links();
+
+ foreach my $link (@links) {
+ my $href = $link->url();
+ my $desc = $link->text();
+
+ if ($desc =~ /$package: .*/) {
+ $href =~ s/^.*\/(\d{6})$/$1/;
+ return $href;
+ }
+ }
+ return 'nnnnnn';
}
sub substitute_perl_dependency {
More information about the Pkg-perl-cvs-commits
mailing list