r8716 - in /trunk/libopengl-perl/debian: change-prefix-in-tar changelog copyright rules watch

ntyni-guest at users.alioth.debian.org ntyni-guest at users.alioth.debian.org
Wed Oct 31 21:08:34 UTC 2007


Author: ntyni-guest
Date: Wed Oct 31 21:08:34 2007
New Revision: 8716

URL: http://svn.debian.org/wsvn/?sc=1&rev=8716
Log:
* Repackage upstream source to remove non-free header files.

Added:
    trunk/libopengl-perl/debian/change-prefix-in-tar
Modified:
    trunk/libopengl-perl/debian/changelog
    trunk/libopengl-perl/debian/copyright
    trunk/libopengl-perl/debian/rules
    trunk/libopengl-perl/debian/watch

Added: trunk/libopengl-perl/debian/change-prefix-in-tar
URL: http://svn.debian.org/wsvn/trunk/libopengl-perl/debian/change-prefix-in-tar?rev=8716&op=file
==============================================================================
--- trunk/libopengl-perl/debian/change-prefix-in-tar (added)
+++ trunk/libopengl-perl/debian/change-prefix-in-tar Wed Oct 31 21:08:34 2007
@@ -1,0 +1,34 @@
+#!/usr/bin/perl -w
+use strict;
+use Archive::Tar;
+
+# 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. 
+
+# For every file inside a tar archive read from stdin,
+# rename the top directory into the name given as the
+# first and only argument, and write the result into stdout.
+#
+# I couldn't find a way to get 'tar --transform' to do this.
+# Please let me know if there's a better way.
+#
+# -- Niko Tyni <ntyni at iki.fi> Wed, 31 Oct 2007 21:53:13 +0200
+
+my $tar = Archive::Tar->new;
+
+$tar->read(\*STDIN) or die("read tar file from stdin: $!");
+
+my $newprefix = shift;
+
+die("Usage: $0 <new-prefix>")
+    if not defined $newprefix;
+
+for ($tar->list_files) {
+    my $oldname = $_;
+    s{^([^/]*)}{$newprefix};
+    $tar->rename($oldname, $_);
+}
+
+$tar->write(\*STDOUT);
+

Modified: trunk/libopengl-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libopengl-perl/debian/changelog?rev=8716&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/changelog (original)
+++ trunk/libopengl-perl/debian/changelog Wed Oct 31 21:08:34 2007
@@ -1,4 +1,4 @@
-libopengl-perl (0.56-1) UNRELEASED; urgency=low
+libopengl-perl (0.56.dfsg.1-1) UNRELEASED; urgency=low
 
   [ gregor herrmann ]
   * New upstream release. (Closes: #421408)
@@ -21,9 +21,9 @@
       bundled ones.
   * Upgrade to debhelper compatibility level 5.
   * Update debian/copyright.
-  * still UNRELEASED: includes non-free header files? See #368560
+  * Repackage upstream source to remove non-free header files.
 
- -- Niko Tyni <ntyni at iki.fi>  Tue, 30 Oct 2007 00:05:29 +0200
+ -- Niko Tyni <ntyni at iki.fi>  Wed, 31 Oct 2007 21:27:42 +0200
 
 libopengl-perl (0.54.alan1-8) unstable; urgency=low
 

Modified: trunk/libopengl-perl/debian/copyright
URL: http://svn.debian.org/wsvn/trunk/libopengl-perl/debian/copyright?rev=8716&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/copyright (original)
+++ trunk/libopengl-perl/debian/copyright Wed Oct 31 21:08:34 2007
@@ -3,6 +3,12 @@
 
 The tarball was downloaded from:
 	http://cpan.org/modules/by-module/OpenGL/
+
+The upstream tarball has been repackaged to exclude header files licensed
+under the "SGI Free Software License B" and the "GLX Public License
+Version 1.0". Details on the non-freeness of these can be found via
+Debian bug #368560. The 'get-orig-source' target in debian/rules can be
+used for the repackaging.
 
 Upstream authors:
 

Modified: trunk/libopengl-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libopengl-perl/debian/rules?rev=8716&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/rules (original)
+++ trunk/libopengl-perl/debian/rules Wed Oct 31 21:08:34 2007
@@ -9,6 +9,13 @@
 
 package	:= $(firstword $(shell dh_listpackages))
 prefix	:= $(CURDIR)/debian/$(package)/usr
+
+VERSION  = $(shell dpkg-parsechangelog | \
+        sed -ne 's/^Version: *\([0-9]\+:\)*//p')
+UPSTREAM_VERSION = $(shell echo $(VERSION) | \
+        sed 's/-[^-]\+$$//')
+UPSTREAM_ORIG_VERSION = $(shell echo $(UPSTREAM_VERSION) | \
+		sed 's/\.dfsg\.[0-9]\+//')
 
 cflags  := -g -Wall
 ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -63,4 +70,18 @@
 	dh_testdir
 	dh_testroot
 
-.PHONY:	binary binary-arch binary-indep clean checkroot build
+get-orig-source:
+	# delete the files include/* and glext_procs.h
+	# then rename the top directory into package-upstream.orig, as
+	# recommended in the Developer's Reference, section 6.7.8.2
+	# gzip --no-name is used to make the result deterministic (no time stamp)
+	wget --quiet -O- \
+	 'http://cpan.org/modules/by-module/OpenGL/OpenGL-$(UPSTREAM_ORIG_VERSION).tar.gz' | \
+	 gzip -dc | \
+	 tar --wildcards --delete '*/include/*' --delete '*/glext_procs.h' | \
+	 $(PERL) $(CURDIR)/debian/change-prefix-in-tar \
+		$(package)-$(UPSTREAM_ORIG_VERSION).orig |\
+	 gzip --no-name -9 \
+	> $(package)_$(UPSTREAM_VERSION).orig.tar.gz
+
+.PHONY:	binary binary-arch binary-indep clean checkroot build get-orig-source

Modified: trunk/libopengl-perl/debian/watch
URL: http://svn.debian.org/wsvn/trunk/libopengl-perl/debian/watch?rev=8716&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/watch (original)
+++ trunk/libopengl-perl/debian/watch Wed Oct 31 21:08:34 2007
@@ -1,3 +1,4 @@
 # format version number, currently 3; this line is compulsory!
 version=3
+opts=dversionmangle=s/\.dfsg\.\d+$// \
 http://cpan.org/modules/by-module/OpenGL/OpenGL-([\d\.]+)\.tar\.gz




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