File: get-orig-source

package info (click to toggle)
fasttree 2.1.9-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 512 kB
  • ctags: 472
  • sloc: ansic: 7,930; makefile: 18; sh: 18
file content (22 lines) | stat: -rwxr-xr-x 645 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

PKG=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | cut -d- -f1`


mkdir -p ../tarballs
uscan --verbose --force-download --repack --destdir=../tarballs
cd ../tarballs
/usr/bin/wget http://www.microbesonline.org/fasttree/ChangeLog 
rm *.orig.tar.gz
for f in FastTree*.c; do
  dir=`echo $f|sed "s/\.c//"` 
  tarfile=`echo $f|sed "s/c/tar.xz/"`
  mkdir $dir
  mv $f $dir/fasttree.c
  cp ChangeLog $dir/changelog
  tar --exclude-vcs --owner=root --group=root --mode=a+rX -caf $tarfile $dir
  rm -rf $dir
done
rm ChangeLog
ln -s $tarfile ${PKG}_${VERSION}.orig.tar.xz