-
Notifications
You must be signed in to change notification settings - Fork 20
/
create-linux.sh
executable file
·74 lines (61 loc) · 2.1 KB
/
create-linux.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
#-----------------------------------------------------------------------------
# create-linux.sh
#
# Create a Linux directory for the installer to use.
#
# Copyright 2006-2012 Boshvark Software, LLC.
#
# This file is part of Zyzzyva.
#
# Zyzzyva is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Zyzzyva is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#-----------------------------------------------------------------------------
set -e
QTVER=4.8.1
INSTDIR=installer
if [ "$QTDIR" = "" ]; then
QTDIR=/usr/local/Trolltech/Qt-$QTVER
fi
if [ "$(uname -m)" = "x86_64" ]; then
PLATFORM=linux-x64
else
PLATFORM=linux
fi
OUTDIR=$INSTDIR/$PLATFORM
$QTDIR/bin/qmake
make
mkdir -p $OUTDIR/bin
cp $(find /usr/lib -name libstdc++.so.6 | head -n 1) $OUTDIR/bin
cp $(find /lib -name libgcc_s.so.1 | head -n 1) $OUTDIR/bin
cp -d $QTDIR/lib/libQt{AssistantClient,Core,Gui,Network,Sql,Xml}.so* $OUTDIR/bin
rm $OUTDIR/bin/*.debug
cp -d $QTDIR/bin/assistant $OUTDIR/bin
cp -d bin/libzyzzyva.so* $OUTDIR/bin
cp -d bin/zyzzyva $OUTDIR/bin
cp -d installer/zyzzyva.sh $OUTDIR/zyzzyva
cp zyzzyva.top $OUTDIR
cp AUTHORS $OUTDIR/AUTHORS
cp CHANGES $OUTDIR/CHANGES
cp COPYING $OUTDIR/COPYING
cp LICENSE $OUTDIR/LICENSE
cp README $OUTDIR/README
mkdir -p $OUTDIR/images
cp images/zyzzyva-32x32.png $OUTDIR/images
cp -r data $OUTDIR
find $OUTDIR/data -type d -name '.svn' -print0 | xargs -0 rm -rf
pushd $INSTDIR
tar -czf $PLATFORM.tar.gz $PLATFORM
popd
#perl -pi -e "\$f = '$OUTDIR';s/\@\@EXECUTABLE\@\@/zyzzyva/g; s/\@\@INSTALLDIR\@\@/\$f/g;" $OUTDIR/zyzzyva.sh