Add automagic bundling scripts.
[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="$BASE/boost_1_56_0"
7
8 # Note: we could use:
9 # ARCH=`uname -i`
10 # but it does not work on a VM (tested in i386 returns unknown)
11 if [[ `getconf LONG_BIT` == "64" ]]; then
12     ARCH='x86_64-linux-gnu'
13 else
14     ARCH='i386-linux-gnu'
15 fi
16
17 cd $BASE
18 mkdir binaries && cd binaries
19
20 cp /usr/bin/gpg .
21 cp $BASE/bitmask_launcher/build/src/launcher bitmask
22 cp $BOOST/stage/lib/libboost_filesystem.so.1.56.0 .
23 cp $BOOST/stage/lib/libboost_python.so.1.56.0 .
24 cp $BOOST/stage/lib/libboost_system.so.1.56.0 .
25
26 cp $BASE/pyside-setup.git/pyside_package/PySide/libpyside-python2.7.so.1.2 .
27 cp $BASE/pyside-setup.git/pyside_package/PySide/libshiboken-python2.7.so.1.2 .
28
29 cp /usr/lib/$ARCH/libQtGui.so libQtGui.non-ubuntu
30 cp /usr/lib/$ARCH/libQtCore.so libQtCore.non-ubuntu
31
32 cp /usr/lib/$ARCH/libaudio.so.2 .
33 cp /usr/lib/$ARCH/libffi.so.5 .
34 cp /usr/lib/$ARCH/libfontconfig.so.1 .
35 cp /lib/$ARCH/libpng12.so.0 .  # NOTE: it should be libpng15.so.15
36 cp /usr/lib/libpython2.7.so.1.0 .
37 cp /usr/lib/$ARCH/libssl.so.1.0.0 .
38 cp /usr/lib/$ARCH/libstdc++.so.6 .
39
40 touch root.json  # empty file for TUF
41
42 mkdir openvpn.files
43 cd openvpn.files
44 cp $BASE/openvpn/src/openvpn/openvpn leap-openvpn
45
46 # TODO: to avoid network requests this should be copied from the cloned repositories
47 # after `bundler gitclone` and before `bundler pythonsetup`
48 wget https://raw.githubusercontent.com/leapcode/bitmask_client/develop/pkg/linux/bitmask-root
49 wget https://raw.githubusercontent.com/leapcode/bitmask_client/develop/pkg/linux/leap-install-helper.sh
50 wget https://raw.githubusercontent.com/leapcode/bitmask_client/develop/pkg/linux/polkit/se.leap.bitmask.bundle.policy
51 chmod +x bitmask-root
52 chmod +x leap-install-helper.sh