File: get-orig-source

package info (click to toggle)
tm-align 20120507-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 212 kB
  • sloc: fortran: 3,204; sh: 17; makefile: 16
file content (31 lines) | stat: -rw-r--r-- 780 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
29
30
31
#!/bin/sh

# bail out with the first problem
set -e

# script to download and repack source package of TMalign which strips the binaries from upstream tarball

PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
VERSION=`uscan --verbose --force-download | \
    grep "Newest version on remote site is .* local version is .*" | \
    head -n 1 | \
    sed "s/Newest version on remote site is \([-0-9.]\+\),.*/\1/"`

# mkdir -p does not fail when directories exist already
mkdir -p ../tarballs
cd ../tarballs
TARBALLDIR=`pwd`

UPSTREAMDIR=${PKG}-${VERSION}

mkdir -p ${UPSTREAMDIR}
cd ${UPSTREAMDIR}

tar -xzf ../../TMtools${VERSION}.tar.gz

rm -rf TMscore TMalign
cd ..

GZIP="--best --no-name" tar -czf "$PKG"_"$VERSION".orig.tar.gz "${UPSTREAMDIR}"
rm -rf "${UPSTREAMDIR}"