upgrade 3 libraries
[goodguy/cinelerra.git] / cinelerra-5.1 / blds / bld_package.sh
1 #!/bin/bash -x
2
3 if [ $# -ne 2 ]; then
4   echo "usage: $0 <os> <typ>"
5   echo "  os = centos | ubuntu | suse | debian"
6   echo " typ = sta | dyn"
7   exit 1
8 fi
9
10 dir="$1"
11 typ="$2"
12 path="/home"
13 bld="git-repo"
14 proj="cinelerra5"
15 base="cinelerra-5.1"
16
17 arch01="arch-20160601"
18 arch="arch-20161201"
19 cent01="centos-7.0-1406"
20 centos="centos-7.x-1611"
21 deb01="debian-8.4.0"
22 deb03="debian-8.7.1"
23 debian="debian-8.6.0"
24 fc23="fedora-23"
25 fc24="fedora-24"
26 fedora="fedora-25"
27 leap01="leap-42.1"
28 leap="leap-42.2"
29 mint01="mint-14.04.1"
30 mint="mint-18.1"
31 slk32="slk32-14.2"
32 slk64="slk64-14.2"
33 suse="opensuse-13.2"
34 tweed="opensuse-tw"
35 ub14="ub14.04.1"
36 ub15="ub15.10"
37 ub16="ub16.04"
38 ub17="ub17.04"
39 ub1601="ub16.10"
40 ubuntu="ubuntu-14.04.1"
41
42 eval os="\${$dir}"
43 if [ -z "$os" ]; then
44   echo "unknown os: $dir"
45 fi
46
47 if [ ! -d "$path/$dir/$bld/$proj.$typ/$base" ]; then
48   echo "missing $bld/$proj.$typ/$base in $path/$dir"
49   exit 1
50 fi
51
52 sfx=`uname -m`-`date +"%Y%m%d"`
53 if [ "$typ" = "sta" ]; then
54   sfx="$sfx-static"
55 elif [ "$typ" != "dyn" ]; then
56   echo "err: suffix must be [sta | dyn]"
57   exit 1
58 fi
59
60 cd "$path/$dir/$bld/$proj.$typ/$base"
61 tar -C bin -cJf "../$base-$os-$sfx.txz" .
62 rm -f "$path/$dir/$base-$os-$sfx.txz"
63 mv "../$base-$os-$sfx.txz" "$path/$dir/."
64