r36107 - in /trunk/libopengl-perl/debian: change-prefix-in-tar changelog repack.sh rules watch

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Fri May 22 08:22:27 UTC 2009


Author: ryan52-guest
Date: Fri May 22 08:22:21 2009
New Revision: 36107

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=36107
Log:
* convert to +dfsg version format
* change the d/rules and d/change-prefix-in-tar to d/watch and
  d/repack.sh

Added:
    trunk/libopengl-perl/debian/repack.sh   (with props)
Removed:
    trunk/libopengl-perl/debian/change-prefix-in-tar
Modified:
    trunk/libopengl-perl/debian/changelog
    trunk/libopengl-perl/debian/rules
    trunk/libopengl-perl/debian/watch

Modified: trunk/libopengl-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libopengl-perl/debian/changelog?rev=36107&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/changelog (original)
+++ trunk/libopengl-perl/debian/changelog Fri May 22 08:22:21 2009
@@ -1,11 +1,6 @@
 libopengl-perl (0.56.dfsg.1-3) UNRELEASED; urgency=low
 
   [ gregor herrmann ]
-  TODO before upgrading to 0.57:
-  .dfsg.1 -> +dfsg
-  convert the get-orig-source target (and the debian/change-prefix-in-tar
-  script) to a proper debian/repack.sh script
-
   * debian/watch: use dist-based URL.
   * Add debian/README.source to document quilt usage, as required by
     Debian Policy since 3.8.0.
@@ -15,8 +10,11 @@
 
   [ Ryan Niebur ]
   * add myself to uploaders
+  * convert to +dfsg version format
+  * change the d/rules and d/change-prefix-in-tar to d/watch and
+    d/repack.sh
 
- -- Ryan Niebur <ryanryan52 at gmail.com>  Fri, 22 May 2009 01:13:00 -0700
+ -- Ryan Niebur <ryanryan52 at gmail.com>  Fri, 22 May 2009 01:21:32 -0700
 
 libopengl-perl (0.56.dfsg.1-2) unstable; urgency=low
 

Added: trunk/libopengl-perl/debian/repack.sh
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libopengl-perl/debian/repack.sh?rev=36107&op=file
==============================================================================
--- trunk/libopengl-perl/debian/repack.sh (added)
+++ trunk/libopengl-perl/debian/repack.sh Fri May 22 08:22:21 2009
@@ -1,0 +1,43 @@
+#!/bin/sh
+# Repackage upstream source to exclude non-distributable files
+# should be called as "repack.sh --upstream-source <ver> <downloaded file>
+# (for example, via uscan)
+
+set -e
+set -u
+
+VER="$2"
+FILE="$3"
+PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
+
+REPACK_DIR="$PKG-$VER+dfsg.orig" # DevRef § 6.7.8.2
+DFSG_TAR="../${PKG}_$VER+dfsg.orig.tar.gz"
+
+echo -e "\nRepackaging $FILE\n"
+
+DIR=`mktemp -d ./tmpRepackXXXXXX`
+trap "rm -rf \"$DIR\"" QUIT INT EXIT
+
+# Create an extra directory to cope with rootless tarballs
+UP_BASE="$DIR/unpack"
+mkdir "$UP_BASE"
+tar xzf "$FILE" -C "$UP_BASE"
+
+if [ `ls -1 "$UP_BASE" | wc -l` -eq 1 ]; then
+	# Tarball does contain a root directory
+	UP_BASE="$UP_BASE/`ls -1 "$UP_BASE"`"
+fi
+
+## Remove stuff
+rm -vr $UP_BASE/glext_procs.h $UP_BASE/include/
+## End
+
+mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+# Using a pipe hides tar errors!
+tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
+gzip -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.gz"
+
+mv "$DIR/repacked.tar.gz" "$DFSG_TAR"
+
+echo "*** $DFSG_TAR ready"

Propchange: trunk/libopengl-perl/debian/repack.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: trunk/libopengl-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libopengl-perl/debian/rules?rev=36107&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/rules (original)
+++ trunk/libopengl-perl/debian/rules Fri May 22 08:22:21 2009
@@ -9,13 +9,6 @@
 
 package	:= $(firstword $(shell dh_listpackages))
 TMP   	:= $(CURDIR)/debian/$(package)
-
-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)))
@@ -70,18 +63,4 @@
 	dh_testdir
 	dh_testroot
 
-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/pkg-perl/trunk/libopengl-perl/debian/watch?rev=36107&op=diff
==============================================================================
--- trunk/libopengl-perl/debian/watch (original)
+++ trunk/libopengl-perl/debian/watch Fri May 22 08:22:21 2009
@@ -1,4 +1,5 @@
 # format version number, currently 3; this line is compulsory!
 version=3
-opts=dversionmangle=s/\.dfsg\.\d+$// \
-http://search.cpan.org/dist/OpenGL/   .*/OpenGL-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)
+opts="dversionmangle=s/\+dfsg//" \
+http://search.cpan.org/dist/OpenGL/   .*/OpenGL-v?(\d[\d_.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) \
+debian sh debian/repack.sh




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