File: orig-tar.sh

package info (click to toggle)
svnkit 1.3.5%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,116 kB
  • sloc: java: 109,839; xml: 990; sh: 193; makefile: 25
file content (19 lines) | stat: -rwxr-xr-x 749 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh 

set -e

# called by uscan with '--upstream-version' <version> <file>
echo "version $2"
package=`dpkg-parsechangelog | sed -n 's/^Source: //p'`
debian_version=`dpkg-parsechangelog | sed -ne 's/^Version: \(.*+dfsg\)-.*/\1/p'`
TAR=${package}_${debian_version}.orig.tar.gz
DIR=${package}-${debian_version}.orig

# clean up the upstream tarball
unzip -d orig $3
mv "$(find orig -maxdepth 1 -type d ! -name orig)" orig/$DIR
GZIP=--best tar -C orig -c -z -f $TAR --exclude doc/javadoc                 \
   --exclude '*.class' --exclude contrib/javahl --exclude contrib/jna       \
   --exclude contrib/junit --exclude contrib/maven --exclude contrib/sqljet \
   --exclude contrib/trilead --numeric-owner --group 0 --owner 0 $DIR
rm -rf $3 orig