r13639 - in /trunk/libvorbis-perl/debian: changelog repack.pl watch
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Jan 26 20:12:16 UTC 2008
Author: dmn
Date: Sat Jan 26 20:12:16 2008
New Revision: 13639
URL: http://svn.debian.org/wsvn/?sc=1&rev=13639
Log:
* source re-packaged, deleting debian/ directory, configure-stamp and
build-stamp files.
+ added debian/repack.pl and hook it to debian/watch
+ added uversionmangle to debian/watch to automatically add .ds1 to
upstream version
Added:
trunk/libvorbis-perl/debian/repack.pl (with props)
Modified:
trunk/libvorbis-perl/debian/changelog
trunk/libvorbis-perl/debian/watch
Modified: trunk/libvorbis-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libvorbis-perl/debian/changelog?rev=13639&op=diff
==============================================================================
--- trunk/libvorbis-perl/debian/changelog (original)
+++ trunk/libvorbis-perl/debian/changelog Sat Jan 26 20:12:16 2008
@@ -1,4 +1,4 @@
-libvorbis-perl (0.05-6) UNRELEASED; urgency=low
+libvorbis-perl (0.05.ds1-1) UNRELEASED; urgency=low
[ gregor herrmann ]
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
@@ -21,6 +21,13 @@
[ Frank Lichtenheld ]
* debian/rules: leave nostrip support to dh_strip
+
+ [ Damyan Ivanov ]
+ * source re-packaged, deleting debian/ directory, configure-stamp and
+ build-stamp files.
+ + added debian/repack.pl and hook it to debian/watch
+ + added uversionmangle to debian/watch to automatically add .ds1 to
+ upstream version
-- gregor herrmann <gregor+debian at comodo.priv.at> Sat, 26 Jan 2008 19:17:42 +0100
Added: trunk/libvorbis-perl/debian/repack.pl
URL: http://svn.debian.org/wsvn/trunk/libvorbis-perl/debian/repack.pl?rev=13639&op=file
==============================================================================
--- trunk/libvorbis-perl/debian/repack.pl (added)
+++ trunk/libvorbis-perl/debian/repack.pl Sat Jan 26 20:12:16 2008
@@ -1,0 +1,54 @@
+#!/usr/bin/perl -w
+use strict;
+use Archive::Tar;
+
+# repack the original Vorbis tarball, removing debian/ directory shipped
+# upstream and changing the directory prefix as per the Debian Developer
+# Reference.
+#
+# Copyright 2007 Niko Tyni <ntyni at iki.fi>
+# This program is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+# this should be called (strictly) like uscan does:
+# "repack.pl --upstream-version <ver> <downloaded file>
+
+sub usage {
+ die "Usage: $0 --upstream-version <ver> <downloaded file>\n";
+}
+
+my $arg = shift;
+my $version = shift;
+my $file = shift;
+
+usage() if
+ ($arg ne "--upstream-version"
+ or not defined $version
+ or not defined $file);
+
+$version =~ s/\+dfsg$//;
+
+my $tar = Archive::Tar->new;
+$tar->read($file) or die("read tar file $file: $!");
+
+my $found;
+for ($tar->list_files) {
+ if (m{^libvorbis-perl-(?:\d[\d._]*)/(?:debian/|configure-stamp|build-stamp)}) {
+ $tar->remove($_);
+ $found++;
+ next;
+ }
+ my $oldname = $_;
+ # change the top-level directory to *.orig
+ s{^([^/]+)(?=/|$)}{${1}.orig};
+ $tar->rename($oldname, $_);
+}
+die("Nothing removed, did upstream stop shipping debian/ directory?")
+ if (!$found);
+
+open(OUT, "|gzip -9 --no-name > $file")
+ or die("opening the repacked tar archive failed: $!");
+$tar->write(\*OUT) or die("writing to the repacked tar archive failed: $!");
+
+print "$file repackaged succesfully.\n";
+
Propchange: trunk/libvorbis-perl/debian/repack.pl
------------------------------------------------------------------------------
svn:executable = *
Modified: trunk/libvorbis-perl/debian/watch
URL: http://svn.debian.org/wsvn/trunk/libvorbis-perl/debian/watch?rev=13639&op=diff
==============================================================================
--- trunk/libvorbis-perl/debian/watch (original)
+++ trunk/libvorbis-perl/debian/watch Sat Jan 26 20:12:16 2008
@@ -1,2 +1,2 @@
version=3
-http://search.cpan.org/dist/libvorbis-perl/ .*/libvorbis-perl-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)
+opts="uversionmangle=s/$/.ds1/" http://search.cpan.org/dist/libvorbis-perl/ .*/libvorbis-perl-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) debian debian/repack.pl
More information about the Pkg-perl-cvs-commits
mailing list