11 -*) echo "Unknown option $1" && exit 1 ;;
17 if test -z "$version" -o $target = none
; then
18 echo "Usage: $0 { -d | -e | -u } <version>"
22 if git tag
-l |
grep -q "^$version\$" > /dev
/null
2> /dev
/null
; then
25 echo "I don't know version $version, here's what I know:"
26 git tag
-l |
sed -e 's/^/ /'
32 if test $target = eee
; then
34 cmake
="$BASE/utils/cmake-static"
35 elif test $target = ubuntu
; then
38 elif test $target = debian
; then
42 echo "Unknown target: $target"
48 i
[3456]86) arch
=i386
;;
51 echo "Unrecognized output of 'uname -m': $uname_m"
60 $BASE/utils
/snapshot
$version "$tmp/tarball.tar.gz" ||
exit 1
61 tar -xzf "$tmp/tarball.tar.gz" -C "$tmp" ||
exit 1
64 cd "$tmp/skype-call-recorder-$version" && \
67 make DESTDIR
=..
/root
install
70 echo -n "Package size: "
71 size
=`du -sk "$tmp/root" | cut -f1`
74 echo -n "Generate control file: "
76 mkdir
"$tmp/root/DEBIAN" && \
77 cp "$tmp/skype-call-recorder-$version/skype-call-recorder.control" "$tmp/root/DEBIAN/control" ||
exit 1
79 for flag
in $controlflags; do
80 sed -i -e "s/^@@$flag\s\+//" "$tmp/root/DEBIAN/control" ||
exit 1
86 -e "s/@version@/$version/g" \
87 -e "s/@size@/$size/g" \
88 -e "s/@arch@/$arch/g" \
89 "$tmp/root/DEBIAN/control" ||
exit 1
93 dpkg-deb
-b -Zbzip2 -z9 "$tmp/root" "skype-call-recorder-${target}_${version}_$arch.deb"