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

hanska-guest at users.alioth.debian.org hanska-guest at users.alioth.debian.org
Wed Sep 19 17:24:50 UTC 2007


Author: hanska-guest
Date: Wed Sep 19 17:24:50 2007
New Revision: 7769

URL: http://svn.debian.org/wsvn/?sc=1&rev=7769
Log:
Added --email|-e and --packagename|-p switches,
documented them and closing #443170

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=7769&op=diff
==============================================================================
--- trunk/dh-make-perl/debian/changelog (original)
+++ trunk/dh-make-perl/debian/changelog Wed Sep 19 17:24:50 2007
@@ -1,3 +1,9 @@
+dh-make-perl (0.33) UNRELEASED; urgency=low
+
+  * Added --email|-e and --packagename|-p switches (Closes: #443170).
+
+ -- David Paleino <d.paleino at gmail.com>  Wed, 19 Sep 2007 19:17:48 +0200
+
 dh-make-perl (0.32) unstable; urgency=low
 
   [ Frank Lichtenheld ]

Modified: trunk/dh-make-perl/dh-make-perl
URL: http://svn.debian.org/wsvn/trunk/dh-make-perl/dh-make-perl?rev=7769&op=diff
==============================================================================
--- trunk/dh-make-perl/dh-make-perl (original)
+++ trunk/dh-make-perl/dh-make-perl Wed Sep 19 17:24:50 2007
@@ -86,7 +86,7 @@
 package main;
 my (@stdmodules, $perl_pkg, $debstdversion, $priority, $section, $depends, 
     $bdepends, $bdependsi, $maintainer, $arch, $closes, $date, $debiandir,
-    $startdir, $dh_compat, $datadir, $homedir);
+    $startdir, $dh_compat, $datadir, $homedir, $email);
 our %overrides;
 
 $perl_pkg = get_perl_pkg_details();
@@ -97,7 +97,6 @@
 $depends = '${perl:Depends}';
 $bdependsi = "perl (>= $perl_pkg->{Version})";
 $bdepends = 'debhelper (>= 5.0.0)';
-$maintainer = get_maintainer();
 $arch = 'all';
 $date = `date -R`;
 $startdir = getcwd();
@@ -128,7 +127,8 @@
 	   'build!', 'core-ok', 'cpan=s', 'cpanplus=s', 'closes=i', 
 	   'cpan-mirror=s', 'dbflags=s', 'depends=s', 'desc=s',
 	   'exclude|i:s{,}', 'help', 'install!', 'nometa', 'notest',
-	   'pkg-perl!', 'requiredeps', 'version=s') or die usage_instructions();
+	   'pkg-perl!', 'requiredeps', 'version=s', 'e=s', 'email=s',
+	   'p=s', 'packagename=s') or die usage_instructions();
 
 @stdmodules = get_stdmodules();
 
@@ -143,10 +143,25 @@
 my $tarball = setup_dir();
 $meta = process_meta("$maindir/META.yml") if (-f "$maindir/META.yml");
 findbin_fix();
+
+if (defined $opts{e}) {
+  $email = $opts{e};
+} elsif (defined $opts{email}) {
+  $email = $opts{email};
+} else {
+  $email = '';
+}
+$maintainer = get_maintainer($email);
+
 if (defined $opts{desc}) {
   $desc = $opts{desc};
 }
 ($pkgname, $version) = extract_basic();
+if (defined $opts{p}) {
+  $pkgname = $opts{p};
+} elsif (defined $opts{packagename}) {
+  $pkgname = $opts{packagename};
+}
 unless (defined $opts{version}) {
 	$pkgversion = $version . "-1";
 } else {
@@ -213,7 +228,8 @@
                [ --bdependsi BUILD-DEPENDS-INDEP ] [ --cpan-mirror MIRROR ]
                [ --exclude|-i [REGEX] ] [ --notest ] [ --nometa ] 
                [ --requiredeps ] [ --core-ok ] [ --basepkgs PKGSLIST ]
-               [ --closes ITPBUG ]
+               [ --closes ITPBUG ] [ --packagename|-p PACKAGENAME ]
+               [ --email|-e EMAIL ]
 USAGE
 }
 
@@ -974,7 +990,7 @@
 }
 
 sub get_maintainer {
-        my ($user, $pwnam, $email, $name, $mailh);
+    my ($user, $pwnam, $email, $name, $mailh);
 	$user = $ENV{LOGNAME} || $ENV{USER};
 	$pwnam = getpwuid($<);
 	die "Cannot determine current user\n" unless $pwnam;
@@ -986,7 +1002,7 @@
 	}
 	$user ||= $pwnam->name;
 	$name ||= $user;
-	$email = $ENV{DEBEMAIL} || $ENV{EMAIL};
+	$email = shift @_ || ($ENV{DEBEMAIL} || $ENV{EMAIL});
 	unless ($email) {
 		chomp($mailh = `cat /etc/mailname`);
 		$email = $user.'@'.$mailh;
@@ -1125,6 +1141,16 @@
 =item B<--version> I<VERSION>
 
 Specifies the version of the resulting package.
+
+=item B<--email> | B<-e> I<EMAIL>
+
+Manually specify the Maintainer email address to use in debian/control and
+in debian/changelog.
+
+=item B<--packagename> | B<-p> I<PACKAGENAME>
+
+Manually specify the Package Name, useful when the module has dashes in its
+name.
 
 =item B<--closes> I<ITPBUG>
 




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