[Pkg-owncloud-commits] [SCM] owncloud.git branch, master, updated. upstream/4.0.0-110-g91f6117

Paul van Tilburg paulvt at debian.org
Tue May 22 22:04:13 UTC 2012


The following commit has been merged in the master branch:
commit 5fe21482f0ddf2ea5b21476d3f7bca5b54e10aaa
Author: Paul van Tilburg <paulvt at debian.org>
Date:   Tue May 22 23:54:05 2012 +0200

    Repack source by removing 3rdparty/timepicker/css/include

diff --git a/debian/repack.sh b/debian/repack.sh
new file mode 100755
index 0000000..68157f8
--- /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="$2debian"
+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"
+tar xjf "$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 -vfr $UP_BASE/3rdparty/timepicker/css/include
+## End
+
+mv "$UP_BASE" "$DIR/$REPACK_DIR"
+
+# Using a pipe hides tar errors!
+tar cfC "$DIR/repacked.tar" "$DIR" "$REPACK_DIR"
+bzip2 -9 < "$DIR/repacked.tar" > "$DIR/repacked.tar.bz2"
+RESULTING_FILE="$(dirname $FILE)/${PKG}_${VER}.orig.tar.bz2"
+mv "$DIR/repacked.tar.bz2" "$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/watch b/debian/watch
index c2a14af..26f039c 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,4 @@
 version=3
-http://owncloud.org/install/ http://owncloud.org/releases/owncloud-(.*)\.tar\.bz2
-
+options="dversionmangle=s/debian[0-9]*//" \
+  http://owncloud.org/install/ http://owncloud.org/releases/owncloud-(.*)\.tar\.bz2 \
+  debian sh debian/repack.sh

-- 
owncloud.git



More information about the Pkg-owncloud-commits mailing list