File: orig-tar.sh

package info (click to toggle)
svnkit 1.8.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 17,256 kB
  • ctags: 26,264
  • sloc: java: 221,083; ansic: 389; xml: 273; sh: 264; makefile: 47; python: 17; perl: 8
file content (28 lines) | stat: -rwxr-xr-x 1,036 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh 

set -e

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

# clean up the upstream tarball
unzip -d orig $3
mv "$(find orig -maxdepth 1 -type d ! -name orig)" orig/$DIR
XZ_OPT=--best tar -C orig -c -v -J -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                \
    --exclude gradle-wrapper.jar             \
    --exclude 'nailgun-*.jar'                \
    --exclude '*.exe'                        \
    --numeric-owner --group 0 --owner 0 $DIR
rm -rf $3 orig