[Pkg-owncloud-commits] [SCM] php-sabredav.git branch, master, updated. debian/1.6.3-1-12-g9c87568
David Prévot
taffit at debian.org
Tue Mar 26 19:02:32 UTC 2013
The following commit has been merged in the master branch:
commit 386eb8c0d6d48856a4ea4b3785ccbd0ea74f3c76
Author: David Prévot <taffit at debian.org>
Date: Tue Mar 26 12:35:06 2013 -0400
Adapt repack.sh from owncloud
diff --git a/debian/repack.sh b/debian/repack.sh
new file mode 100755
index 0000000..05df395
--- /dev/null
+++ b/debian/repack.sh
@@ -0,0 +1,44 @@
+#!/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+dfsg"
+FILE="$3"
+PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'`
+
+REPACK_DIR="$PKG-$VER.orig" # DevRef § 6.7.8.2
+
+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"
+unzip "$FILE" -d "$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 non-DFSG compliant RFCs
+rm -vr $UP_BASE/docs
+## End
+
+mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+# Using a pipe hides tar errors!
+tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
+xz < "$DIR/repacked.tar" > "$DIR/repacked.tar.xz"
+RESULTING_FILE="$(dirname $FILE)/${PKG}_${VER}.orig.tar.xz"
+mv "$DIR/repacked.tar.xz" "$RESULTING_FILE"
+rm -f "$FILE"
+
+echo "*** $FILE repackaged"
+echo "*** Please note that the upstream version must be $VER since we are repackaging the tarball!"
diff --git a/debian/rules b/debian/rules
index 100bb93..dd8ef17 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,7 @@
dh $@
get-orig-source:
- uscan --force --verbose --rename --repack
+ uscan --verbose
override_dh_auto_clean:
rm -f build.xml
diff --git a/debian/watch b/debian/watch
index cfee918..e6fa01b 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,5 +1,7 @@
version=3
#http://code.google.com/p/sabredav/ downloads/detail?name=SabreDAV-(.*)\.zip
-http://code.google.com/p/sabredav/downloads/list //sabredav.googlecode.com/files/SabreDAV-(.*).zip
-
+options="dversionmangle=s/\+dfsg[0-9]*//" \
+ http://code.google.com/p/sabredav/downloads/list \
+ //sabredav.googlecode.com/files/SabreDAV-(.*).zip \
+ debian sh debian/repack.sh
--
php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list