summaryrefslogtreecommitdiff
path: root/debian/repack.sh
blob: 4b986bef2b8dda622e6a7db64cd7c046e2906d6f (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh -e
# Repackaging script to be called by Uscan

echo "Repackaging ..."
TMP="../"
PKG="`dpkg-parsechangelog|sed 's/^Source: //p;d'`_$2+repack.orig"


echo "Extracting tarball ..."
echo "$3 -->>  $2"
tar xzf "$3" -C "$TMP"
cd "$TMP"

echo "Rename source dir"
ls -l
mv Argyll_V$2 argyll_$2

echo "Removing unwanted stuff ..."
cd argyll_$2
ls -l
rm -f yajl/yajl_test.exe yajl/yajl_test.obj
rm -fr usb/bin
rm -fr jpeg
rm -fr tiff
rm -fr zlib
rm -fr png
chmod -R -x+X *
ls -l
#cd ..

echo "Creating repack tarball ..."
tar -caf "../argyll_$2+repack.orig.tar.xz" *

cd ..
echo "Clean tmp dir ..."
rm -rf argyll_$2

echo "Clean uscan files ..."
rm -rf Argyll_V$2_src.zip
#rm -rf argyll_$2.orig.tar.gz

echo "Repackaged tarball created"



	unzip ../Argyll_V${VERSION}_src.zip  -d ../
	mv ../Argyll_V${VERSION} ../argyll_${VERSION}
	rm -f ../argyll_${VERSION}/yajl/yajl_test.exe ../argyll_${VERSION}/yajl/yajl_test.obj
	rm -fr ../argyll_${VERSION}/usb/bin
	rm -fr ../argyll_${VERSION}/jpeg
	rm -fr ../argyll_${VERSION}/tiff
	rm -fr ../argyll_${VERSION}/zlib
	rm -fr ../argyll_${VERSION}/png
	chmod -R -x+X ../argyll_${VERSION}/*
	tar cJf ../argyll_${VERSION}+repack.orig.tar.xz ../argyll_${VERSION}
	rm -fr ../argyll_${VERSION} ../Argyll_V${VERSION}_src.zip