Debian Codegraph @

debian/get-orig-source

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`. -e
2 # creating source tarbal for abacas which comes as plain Perl file
3 # and needs to be putin to a tarball
4
5 PKG=`dpkg-parsechangelogscip-shell system . . dpkg-parsechangelog. | awkscip-shell system . . awk. '/^Source/ { print $2 }scip-shell filesystem . . `/^Source/ { print $2 }`.'`
6
7 if ! echoscip-shell system . . echo. $@ | grepscip-shell system . . grep. -q upstream-version ; then
8 # if called manually run uscan to obtain file and version number
9 # VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
10 VERSION=`uscanscip-shell system . . uscan. --verbose --force-download | \
11 grep "Newest version on remote site is .* local version is .*" | \
12 head -n 1 | \
13 sed "s/Newest version on remote site is \([-0-9.]\+\),.*/\1/"`
14 else
15 # If called by uscan
16 VERSION=`echoscip-shell system . . echo. $@ | sedscip-shell system . . sed. 's?^.*--upstream-version \([0-9.]\+\) .*abacas.*?\1?'`
17 if echoscip-shell system . . echo. "$VERSION" | grepscip-shell system . . grep. -q "upstream-version" ; then
18 echoscip-shell system . . echo. "Unable to parse version number"
19 exit
20 fi
21 fi
22
23 #if [ "$VERSION" = "" ] ; then
24 # VERSION=`ls ../${PKG}.*.pl | sed "s/.*$PKG\.\(.*\)\.pl/\1/"`
25 #fi
26
27 mkdirscip-shell system . . mkdir. -p ../tarballs/${PKG}-${VERSION}
28 cd ../tarballs
29
30 # Rename perl file (without .pl suffix) and fix perl path
31 sedscip-shell system . . sed. -e '1s?/usr/local/bin/perl?/usr/bin/perl?' \
32 -e "s/^${PKG}.pl/${PKG}/" \
33 ../${PKG}.${VERSION}.pl > ${PKG}-${VERSION}/${PKG}
34 touchscip-shell system . . touch. -r ../${PKG}.${VERSION}.pl ${PKG}-${VERSION}/${PKG}
35 rmscip-shell system . . rm. -f ../${PKG}.${VERSION}.pl
36
37 cd ${PKG}-${VERSION}
38 wget -q -N http://abacas.sourceforge.net/Manual.html
39 sedscip-shell system . . sed. -i -e 's?index.html">Home?http://abacas.sourceforge.net/&?' \
40 -e 's?documentation.html">Documentation?http://abacas.sourceforge.net/&?' \
41 -e 's/perl abacas\.pl/abacas/' \
42 -e 's/abacas\.pl/abacas/' \
43 Manual.html
44 wget -q -N http://abacas.sourceforge.net/style.css
45 cd ..
46
47 GZIP="--best --no-name" tarscip-shell system . . tar. -czf "$PKG"_"$VERSION".orig.tar.gz "$PKG"-"$VERSION"
48 rmscip-shell system . . rm. -rf "$PKG"-"$VERSION"