Add bitmask 0.9.0alpha12 spec file
[bitmask_bundler.git] / copy-binaries.sh
1 #!/bin/bash
2
3 set -e  # Exit immediately if a command exits with a non-zero status.
4
5 BASE='/home/leap/bitmask.bundle'
6 BOOST_MINOR="57"
7 BOOST="$BASE/boost_1_${BOOST_MINOR}_0"
8
9 # Note: we could use:
10 # ARCH=`uname -i`
11 # but it does not work on a VM (tested in i386 returns unknown)
12 if [[ `getconf LONG_BIT` == "64" ]]; then
13     ARCH='x86_64-linux-gnu'
14 else
15     ARCH='i386-linux-gnu'
16 fi
17
18 cd $BASE
19 rm -fr binaries
20 mkdir binaries && cd binaries
21
22 cp /usr/bin/gpg .
23 cp $BASE/bitmask_launcher/build/src/launcher bitmask
24 cp $BOOST/stage/lib/libboost_filesystem.so.1.${BOOST_MINOR}.0 .
25 cp $BOOST/stage/lib/libboost_python.so.1.${BOOST_MINOR}.0 .
26 cp $BOOST/stage/lib/libboost_system.so.1.${BOOST_MINOR}.0 .
27
28 cp $BASE/pyside-setup.git/pyside_package/PySide/libpyside-python2.7.so.1.2 .
29 cp $BASE/pyside-setup.git/pyside_package/PySide/libshiboken-python2.7.so.1.2 .
30
31 cp /usr/lib/$ARCH/libQtGui.so libQtGui.non-ubuntu
32 cp /usr/lib/$ARCH/libQtCore.so libQtCore.non-ubuntu
33
34 cp /usr/lib/$ARCH/libaudio.so.2 .
35 cp /usr/lib/$ARCH/libffi.so.5 .
36 cp /usr/lib/$ARCH/libfontconfig.so.1 .
37 cp /lib/$ARCH/libpng12.so.0 .  # NOTE: it should be libpng15.so.15
38 cp /usr/lib/libpython2.7.so.1.0 .
39 cp /usr/lib/$ARCH/libssl.so.1.0.0 .
40 cp /usr/lib/$ARCH/libstdc++.so.6 .
41
42 # NOTE: this needs to be always the same root.json file
43 cp $BASE/root.json .
44
45 mkdir openvpn.files && cd openvpn.files
46 cp $BASE/openvpn/src/openvpn/openvpn leap-openvpn
47
48 cp $BASE/bundler.output/bitmask_client/pkg/linux/bitmask-root .
49 cp $BASE/bundler.output/bitmask_client/pkg/linux/leap-install-helper.sh .
50 cp $BASE/bundler.output/bitmask_client/pkg/linux/polkit/se.leap.bitmask.bundle.policy .
51 chmod +x bitmask-root
52 chmod +x leap-install-helper.sh