r7567 - in /trunk/dh-make-perl: debian/changelog dh-make-perl

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Fri Sep 14 08:29:14 UTC 2007


Author: dmn
Date: Fri Sep 14 08:29:13 2007
New Revision: 7567

URL: http://svn.debian.org/wsvn/?sc=1&rev=7567
Log:
* Use http://search.cpan.org/dist/$perlname/ for upstream URL, watch and
  Homepage. Idea borrowed from David Paleino.

Modified:
    trunk/dh-make-perl/debian/changelog
    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=7567&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Fri Sep 14 08:29:13 2007
@@ -1,11 +1,16 @@
 dh-make-perl (0.31) unstable; urgency=low
 
+  [ David Paleino ]
   * rules.MakeMaker.*: changed approach to the removal of unneeded (and
     unwanted) dirs:
     - /usr/lib/perl5/ for architecture-independent packages;
     - /usr/share/perl5/ for architecture-dependent packages
 
- -- David Paleino <d.paleino at gmail.com>  Thu, 13 Sep 2007 22:50:06 +0200
+  [ Damyan Ivanov ]
+  * Use http://search.cpan.org/dist/$perlname/ for upstream URL, watch and
+    Homepage. Idea borrowed from David Paleino.
+
+ -- Damyan Ivanov <dmn at debian.org>  Fri, 14 Sep 2007 11:23:00 +0300
 
 dh-make-perl (0.30) unstable; urgency=low
 

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/dh-make-perl?rev=7567&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Fri Sep 14 08:29:13 2007
@@ -275,14 +275,12 @@
 			$dist->get || die "Cannot get $mod->{CPAN_FILE}\n";
 			$tarball .= $mod->{CPAN_FILE};
 			$maindir = $dist->{'build_dir'};
-			$upsurl = "http://www.cpan.org/authors/id/" . $mod->{CPAN_FILE};
 		} else {
 			# CPAN internals changed
 			$dist = $CPAN::META->instance('CPAN::Distribution', $mod->cpan_file);
 			$dist->get || die "Cannot get ", $mod->cpan_file, "\n";
 			$tarball .= $mod->cpan_file;
 			$maindir = $dist->dir;
-			$upsurl = "http://www.cpan.org/authors/id/" . $mod->cpan_file;
 		}
 
 		copy ($tarball, $ENV{'PWD'});
@@ -383,6 +381,8 @@
 
     print "Found: $perlname $version ($pkgname arch=$arch)\n";
     $debiandir = "$maindir/debian";
+
+    $upsurl = "http://search.cpan.org/dist/$perlname/";
 
     $copyright = extract_basic_copyright();
     if ($modulepm) {
@@ -822,6 +822,7 @@
 	$fh->print("Depends: $depends\n") if $depends;
 	$fh->print($extrapfields) if defined $extrapfields;
 	$fh->print("Description: $desc\n$longdesc\n .\n This description was automagically extracted from the module by dh-make-perl.\n");
+	$fh->print(" .\n  Homepage: $upsurl\n") if $upsurl;
 	$fh->close;
 }
 
@@ -928,18 +929,14 @@
 }
 
 sub create_watch {
-        my ($fh, $perl_path_name);
-	$fh = _file_w(shift);
-	$perl_path_name = shift;
-	
-	$perl_path_name =~ s|::|-|g;
-	$perl_path_name =~ s|(\w+)(-.*)|$1/$1$2|;
-	$perl_path_name .= '-([\.\d]+)\.(?:tar\.gz|tar|tgz)';
+	my $fh = _file_w(shift);
+
+	my $version_re = '([\.\d]+)\.(?:tar\.gz|tar|tgz)';
 
 	$fh->print(
 "\# format version number, currently 3; this line is compulsory!
 version=3
-http://www.cpan.org/modules/by-module/$perl_path_name
+$upsurl .*/$perlname-$version_re\$
 ");
 	$fh->close;
 }




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