diff --git a/debian/orig-tar.exclude b/debian/orig-tar.exclude deleted file mode 100644 index 6c294b5..0000000 --- a/debian/orig-tar.exclude +++ /dev/null @@ -1,3 +0,0 @@ -*.jar -*/site* -*/slf4j-site* diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh index 4b36225..30d8378 100755 --- a/debian/orig-tar.sh +++ b/debian/orig-tar.sh @@ -1,20 +1,15 @@ #!/bin/sh -e -# $2 = version -# $3 = file -DIR=libslf4j-java-$2.orig -TAR=../libslf4j-java_$2.orig.tar.xz +PACKAGE=$(dpkg-parsechangelog -S Source) +VERSION=$2 +DIR=${PACKAGE}-${VERSION} +TAR=../${PACKAGE}_${VERSION}.orig.tar.xz -# clean up the upstream tarball -tar xzf $3 +mkdir $DIR +tar -xf $3 --strip-components=1 -C $DIR rm $3 -mv slf4j-$2 $DIR -XZ_OPT=--best tar cJf $TAR -X debian/orig-tar.exclude $DIR -rm -rf $DIR - -# move to directory 'tarballs' -if [ -r .svn/deb-layout ]; then - . .svn/deb-layout - mv $3 $origDir - echo "moved $3 to $origDir" -fi +XZ_OPT=--best tar -c -v -J -f $TAR \ + --exclude '*.jar' \ + --exclude 'site' \ + $DIR +rm -Rf $DIR