forked from CVL-dev/cvl-fabric-launcher
-
Notifications
You must be signed in to change notification settings - Fork 6
/
package_ubuntu_version.sh
executable file
·54 lines (39 loc) · 1.51 KB
/
package_ubuntu_version.sh
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
#!/bin/bash
VERSION=`grep '^version_number' launcher_version_number.py | cut -f 2 -d '"'`
ARCHITECTURE=`uname -m | sed s/x86_64/amd64/g | sed s/i686/i386/g`
./package_linux_version.sh $VERSION $ARCHITECTURE
TMP="tmp_debian_build"
alias sudo=""
sudo rm -fr $TMP
sudo rm -f *.deb
TARGET=$TMP/opt/Strudel
mkdir -p $TARGET
mkdir -p $TMP/usr/share/applications
cp Strudel.desktop $TMP/usr/share/applications/
cp -r dist/Strudel-${VERSION}_${ARCHITECTURE}/* $TARGET/
mkdir $TMP/DEBIAN
cp release/control $TMP/DEBIAN
# This is not necessary on Ubuntu 13.04 when building for Ubuntu
# cp release/postinst $TMP/DEBIAN
# Remove pango from the control file, not needed on Ubuntu 13
sed -i 's/libpango1.0-dev,//g' $TMP/DEBIAN/control
installedSize=`du -sx --exclude DEBIAN $TMP | awk '{print $1}'`
sed -i "s/VERSION/${VERSION}/g" $TMP/DEBIAN/control
sed -i "s/ARCHITECTURE/${ARCHITECTURE}/g" $TMP/DEBIAN/control
sed -i "s/XXINSTALLEDSIZE/${installedSize}/g" $TMP/DEBIAN/control
sudo chown -R root.root $TMP
sudo find $TMP/ -iname '*.so.*' -exec chmod a-x {} \;
sudo find $TMP/ -iname '*.so.*' -exec strip {} \;
mkdir -p $TMP/opt/Strudel/icons/
cp IconPngs/MASSIVElogoTransparent144x144.png $TMP/opt/Strudel/icons/MASSIVElogoTransparent144x144.png
cp Strudel.desktop $TMP/opt/Strudel/"Strudel.desktop"
sudo chmod a-x $TMP/opt/Strudel/icons/MASSIVElogoTransparent144x144.png
sudo chmod a-x $TMP/opt/Strudel/"Strudel.desktop"
DEB=strudel_UBUNTU_${VERSION}_${ARCHITECTURE}.deb
sudo dpkg -b $TMP $DEB
echo
echo
echo
ls -lh *.deb
echo
echo