[SCM] Debian packaging of dh-make-perl branch, master, updated. debian/0.76-1-33-ga2d201b
Axel Beckert
abe at deuxchevaux.org
Wed Mar 6 18:37:42 UTC 2013
The following commit has been merged in the master branch:
commit 6b5050507f4e005d640c757710d22e1aaefd5f64
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Wed Mar 6 19:24:13 2013 +0100
Add option --build-source to also build .dsc file (c.f. #645011)
diff --git a/debian/changelog b/debian/changelog
index 645f3ff..733ab5d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -50,6 +50,7 @@ dh-make-perl (0.77-1) UNRELEASED; urgency=low
* Add patch by Matthew Gabeler-Lee to understand packages named
"-vX.Y.Z". (Closes: #701140)
* Fix "fatal: pathspec '…' did not match any files" error of "git add".
+ * Add option --build-source to also build .dsc file (c.f. #645011)
-- Salvatore Bonaccorso <carnil at debian.org> Wed, 19 Sep 2012 15:11:17 +0200
diff --git a/debian/copyright b/debian/copyright
index 8d48309..601b09e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -17,6 +17,7 @@ Copyright: 2000, 2001, Paolo Molaro <lupus at debian.org>
2011, Tim Retout <diocles at debian.org>
2011, Ansgar Burchardt <ansgar at debian.org>
2011, Maximilian Gass <mxey at cloudconnected.org>
+ 2013, Axel Beckert <abe at debian.org>
License: GPL-2
License: GPL-2
diff --git a/dh-make-perl b/dh-make-perl
index ceeb73a..a19ea63 100755
--- a/dh-make-perl
+++ b/dh-make-perl
@@ -46,8 +46,8 @@ can specify the directory with the already unpacked sources. If neither
L<--cpan> nor a directory is given as argument, B<dh-make-perl>
tries to create a Perl package from the data in the current directory.
-You can build and install the debian package using the L</--build>
-and L</--install> command line switches.
+You can build and install the debian binary package using the
+L</--build> and L</--install> command line switches.
If B<dh-make-perl> is called as
@@ -193,13 +193,24 @@ the field should not appear in debian/rules (if you really mean it, of course
=item B<--build>
-Builds the package after setting it up.
+Builds the binary package (i.e. the .deb file) after setting the
+package directory up.
NB: This builds only a binary package (by calling "fakeroot debian/rules
binary") and does not sign the package. It is meant for a quick local
install of a package, not for creating a package ready for submission to the
Debian archive.
+=item B<--build-source>
+
+Builds the source package (i.e. the .dsc and .debian.tar.gz files)
+after setting the package directory up.
+
+NB: This builds only a source package (by calling "dpkg-source -b")
+and does not sign the package. It is meant for a quick local install
+of a source package to be thrown into e.g. a pbuilder, not for
+creating a source package ready for submission to the Debian archive.
+
=item B<--closes> I<ITPBUG>
Manually specify the ITP bug number that this package closes. If not
diff --git a/lib/DhMakePerl/Command/make.pm b/lib/DhMakePerl/Command/make.pm
index 94a088a..51d6032 100644
--- a/lib/DhMakePerl/Command/make.pm
+++ b/lib/DhMakePerl/Command/make.pm
@@ -233,6 +233,8 @@ sub execute {
$self->git_add_debian($tarball)
if $self->cfg->{vcs} eq 'git';
+ $self->build_source_package
+ if $self->cfg->build_source;
$self->build_package
if $self->cfg->build or $self->cfg->install;
$self->install_package if $self->cfg->install;
@@ -356,6 +358,17 @@ sub build_package {
|| die "Cannot create deb package: 'fakeroot debian/rules binary' failed.\n";
}
+sub build_source_package {
+ my ( $self ) = @_;
+
+ my $main_dir = $self->main_dir;
+ # uhmf! dpkg-genchanges doesn't cope with the deb being in another dir..
+ #system("dpkg-buildpackage -S -us -uc " . $self->cfg->dbflags) == 0
+ system("fakeroot make -C $main_dir -f debian/rules clean");
+ system("dpkg-source -b $main_dir") == 0
+ || die "Cannot create source package: 'dpkg-source -b' failed.\n";
+}
+
sub install_package {
my ($self) = @_;
@@ -733,6 +746,8 @@ L<http://bugs.debian.org/dh-make-perl>
=item Copyright (C) 2009-2010, Salvatore Bonaccorso <carnil at debian.org>
+=item Copyright (C) 2013, Axel Beckert <abe at debian.org>
+
=back
This program is free software; you can redistribute it and/or modify it under
diff --git a/lib/DhMakePerl/Config.pm b/lib/DhMakePerl/Config.pm
index 7cb3853..f04b448 100644
--- a/lib/DhMakePerl/Config.pm
+++ b/lib/DhMakePerl/Config.pm
@@ -17,6 +17,7 @@ use constant options => (
'arch=s', 'backups!',
'basepkgs=s',
'bdepends=s', 'bdependsi=s',
+ 'build-source!',
'build!', 'closes=i',
'config-file=s', 'core-ok',
'cpan-mirror=s', 'cpan=s',
--
Debian packaging of dh-make-perl
More information about the Pkg-perl-cvs-commits
mailing list