File: repack

package info (click to toggle)
polylib 5.22.5-4.2%2Bdfsg
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 14,464 kB
  • sloc: ansic: 16,346; sh: 10,134; makefile: 506
file content (28 lines) | stat: -rwxr-xr-x 680 bytes parent folder | download | duplicates (4)
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
#!/bin/sh
# repacking actions, called from uscan trough watch file
# see
# http://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#repackagedorigtargz
# for debian repacking policy
set -e
set -x


# called by uscan with '--upstream-version' <version> <file>
basedir=polylib-$2
shortdir=$basedir.orig
dir=../$shortdir
origtarball=polylib_$2.orig.tar.gz

# clean up the upstream tarball
tar -x -z -f $3 
mv $basedir $shortdir

echo "removing non-free documentation from original sources"
tar -c -z -f ../$origtarball \
	--exclude="$shortdir/doc/*.pdf" --exclude="$shortdir/doc/*.gz" \
	$shortdir 

# removed everything accordingly
rm -rf $shortdir

exit 0