File: orig-tar.sh

package info (click to toggle)
json-simple 1.1-dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 228 kB
  • sloc: java: 1,810; xml: 69; makefile: 16; sh: 11
file content (18 lines) | stat: -rwxr-xr-x 662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
SOURCE_NAME=json-simple
VERSION=$2
DEBIAN_VERSION=$VERSION-dfsg1
UPSTREAM_SOURCE_DIR=$(echo $SOURCE_NAME | tr '-' '_')-${VERSION}-all
DEBIAN_SOURCE_DIR=${SOURCE_NAME}-$DEBIAN_VERSION
TAR=${USCAN_DESTDIR:-.}/${SOURCE_NAME}_$DEBIAN_VERSION.orig.tar.bz2

# clean up the upstream tarball
unzip $3 >/dev/null
# rename upstream source dir
mv ${UPSTREAM_SOURCE_DIR} ${DEBIAN_SOURCE_DIR}
# Remove excluded files
tar -c -j -X debian/orig-tar.exclude -f $TAR ${DEBIAN_SOURCE_DIR}/
rm -rf ${DEBIAN_SOURCE_DIR} $3
echo "${SOURCE_NAME}: Applied DFSG removals and set up tarball to `basename ${TAR}`"