File: repack

package info (click to toggle)
hunspell-ca 3.0.1%2Brepack1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,148 kB
  • ctags: 1
  • sloc: sh: 19; makefile: 10
file content (26 lines) | stat: -rwxr-xr-x 643 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
#!/bin/sh

set -e

PACKAGE="hunspell-ca"
CURDIR=$(pwd)
[ -n "${REPACK_PREFIX}" ] || REPACK_PREFIX=repack1

VERSION=${VERSION:-$2}
ORIGSRC=${ORIGSRC:-$3}

orig_SOURCES=${CURDIR}/${ORIGSRC}
Debian_TARBALL=${PACKAGE}_${VERSION}+${REPACK_PREFIX}.orig.tar.gz

unpack_base="unpack-tmp"
if [ -e "${unpack_base}" ]; then
    echo "$0: \"${unpack_base}\" already exists. Aborting ..." &>2
    exit 1
else
    mkdir -p ${unpack_base}
fi

( cd "${unpack_base}" \
	&& tar -xvzf ${orig_SOURCES} \
	&& GZIP="--best --no-name" fakeroot tar --transform "s/^\./${PACKAGE}_${VERSION}+"${REPACK_PREFIX}"/" -cvzf ../../${Debian_TARBALL} . )
rm -rf ${unpack_base}