[snappy-java] 51/51: Replaced debian/get-orig-source with debian/orig-tar.sh

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Nov 25 17:16:47 GMT 2014


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository snappy-java.

commit b1b58a1f25acb05efe7e0482ece546e12eb68623
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Nov 25 18:09:30 2014 +0100

    Replaced debian/get-orig-source with debian/orig-tar.sh
---
 debian/changelog       |  2 ++
 debian/get-orig-source | 31 -------------------------------
 debian/orig-tar.sh     | 21 +++++++++++++++++++++
 debian/rules           |  2 +-
 debian/watch           |  2 +-
 5 files changed, 25 insertions(+), 33 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0e26235..f2175d0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ snappy-java (1.0.4.1~dfsg-2) UNRELEASED; urgency=low
     - Use canonical URLs for the Vcs-* fields
     - Updated the project URL
   * debian/watch: Watch the release tags on Github
+  * Replaced debian/get-orig-source with debian/orig-tar.sh
+  * Use XZ compression for the upstream tarball
   * Switch to debhelper level 9
 
  -- Emmanuel Bourg <ebourg at apache.org>  Tue, 25 Nov 2014 14:07:43 +0100
diff --git a/debian/get-orig-source b/debian/get-orig-source
deleted file mode 100755
index af97157..0000000
--- a/debian/get-orig-source
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-# get source for snappy-java to enable stripping binaries without source
-
-set -e
-NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
-
-if ! echo $@ | grep -q upstream-version ; then
-    VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
-else
-    VERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+\) .*${NAME}.*?\1?"`
-    if echo "$VERSION" | grep -q "upstream-version" ; then
-        echo "Unable to parse version number"
-        exit
-    fi
-fi
-
-mkdir -p ../tarballs
-cd ../tarballs
-mv ../${NAME}-${VERSION}.tar.gz .
-
-tar -xzf ${NAME}-${VERSION}.tar.gz
-
-# Remove native libraries for different OSes which are not needed because we link
-# against Debian packaged libraries
-rm -rf ${NAME}-${VERSION}/src/main/resources/org/xerial/snappy/native
-
-# Remove lib/ directory which was also stripped by Charles Plessy before and seems to be unneeded
-rm -rf ${NAME}-${VERSION}/lib
-
-GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -czf "$NAME"_"$VERSION"~dfsg.orig.tar.gz "${NAME}-${VERSION}"
-rm -rf "${NAME}-$VERSION"
diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh
new file mode 100755
index 0000000..bdfb192
--- /dev/null
+++ b/debian/orig-tar.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+VERSION=$2
+TAR=../snappy-java_$VERSION.tar.xz
+DIR=snappy-java-$VERSION
+
+tar -xf $3
+rm $3
+
+XZ_OPT=--best tar -cJvf $TAR \
+    --exclude 'src/main/resources/org/xerial/snappy/native/*' \
+    --exclude 'lib/*' \
+    --exclude '*.bytecode' \
+    --exclude '*.jar' \
+    --exclude '*.class' \
+    --exclude '.settings' \
+    --exclude '.classpath' \
+    --exclude '.project' \
+    --exclude '.hg*' \
+    $DIR
diff --git a/debian/rules b/debian/rules
index 7212f42..064f190 100755
--- a/debian/rules
+++ b/debian/rules
@@ -25,4 +25,4 @@ override_dh_auto_install:
 	dh_install -plibsnappy-jni target/*.so usr/lib/$(DEB_HOST_MULTIARCH)/jni
 
 get-orig-source:
-	uscan --verbose --force-download
+	uscan --download-current-version --rename --force-download
diff --git a/debian/watch b/debian/watch
index ed413cd..9f99274 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
 version=3
 #http://googlecode.debian.net/p/snappy-java/snappy-java-(.*).tar.gz
-https://github.com/xerial/snappy-java/tags .*/([\d\.]+).tar.gz debian debian/get-orig-source
+https://github.com/xerial/snappy-java/tags .*/([\d\.]+).tar.gz debian debian/orig-tar.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/snappy-java.git



More information about the pkg-java-commits mailing list