-
Notifications
You must be signed in to change notification settings - Fork 6
/
make_tardistro.sh.template
124 lines (92 loc) · 3.13 KB
/
make_tardistro.sh.template
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/sh
# user configs - please adjust for your installation:
# the root directory of ultrascan-2:
#US2=/export/home/user/demeler/us/ultrascan
# change to bin64/lib64 for 64 bit distros:
#US2BIN=$US2/bin
#US2LIB=$US2/lib
# the root directory of ultrascan-3:
US3=/export/home/user/demeler/ultrascan3
# the library directory for the QT3 library:
QT3=/opt/kde3/lib/qt3/lib
# the root directory for the QT4 distribution:
QT4=/usr/local/Trolltech/Qt-4.7.3
# the library directory for the qt3 version of qwt:
QWT3=/usr/local/qwt/lib
# the library directory for the qt4 version of qwt:
QWT4=/opt/qwt/lib
# the library directory for the qt3 version of the qwtplot3d library:
QWT3D3=/usr/local/qwtplot3d/lib
# the library directory for the qt4 version of the qwtplot3d library:
QWT3D4=/export/home/user/demeler/ultrascan3/lib
# the mysql, crypt(o), png and jpg libraries linked to your distribution:
MYSQL=/export/home/user/demeler/ultrascan3/lib/libmysqlclient.so.16
CRYPTO=/lib/libcrypto.so.0*
CRYPT=/lib/libcrypt[-.]*
PNG=/usr/lib/libpng14.so.14*
JPG=/usr/X11R6/lib/libjpeg.so.*
SSL=/lib/libssl.so.0*
# a temporary directory for building the distribution:
TMP=/tmp
# the version to be built:
VER=1.0
# 32 or 64 bit:
ARCH=32
#############################################################
OS=Linux
REV=`cut -d\" -f2 programs/us/us_revision.h | cut -d ' ' -f2`
FILE=ultrascan-$OS$ARCH-$VER-rev$REV
BUILD=$TMP/$FILE
echo "Cleaning up previous UltraScan-3 build if it exists..."
rm -rf $BUILD
mkdir $BUILD
echo "Copying UltraScan-3 and QT4 binaries..."
cp -a $US3/bin $BUILD/.
cp $QT4/bin/assistant $BUILD/bin/.
echo "Copying UltraScan-3 libraries..."
cp -a $US3/lib $BUILD/.
echo "Copying UltraScan-3 etc..."
cp -a $US3/etc $BUILD/.
echo "Copying UltraScan-3 QT4 libraries..."
for x in libQtCLucene.so.4 libQtCore.so.4 libQtDBus.so.4 libQtGui.so.4 \
libQtHelp.so.4 libQtNetwork.so.4 libQtOpenGL.so.4 libQtSql.so.4 \
libQtSvg.so.4 libQtWebKit.so.4 libQtXml.so.4 libphonon.so.4; do
cp -d $QT4/lib/$x* $BUILD/lib/.
done
echo "Copying UltraScan-3 QWT..."
cp -d $QWT4/* $BUILD/lib/.
echo "Copying UltraScan-3 QWTPLOT3D..."
cp -d $QWT3D4/* $BUILD/lib/.
echo "Copying UltraScan-3 libraries..."
cp -d $US2/lib/* $BUILD/lib/.
#echo "Copying UltraScan-2 binaries..."
#cp $US2BIN/us3* $BUILD/bin/.
#cp $US2BIN/rasmol* $BUILD/bin/.
#echo "Copying UltraScan-2 libraries..."
#cp -d $US2LIB/* $BUILD/lib/.
echo "Copying UltraScan-2 QT libraries..."
cp -d $QT3/* $BUILD/lib/.
echo "Copying UltraScan-2 QWT libraries..."
cp -a $QWT3/* $BUILD/lib/.
echo "Copying UltraScan-2 QWT3DPLOT libraries..."
cp -a $QWT3D3/* $BUILD/lib/.
#echo "Copying UltraScan-2 SOMO config files..."
#cp -a $US2/etc/somo* $BUILD/etc/.
rm -f $BUILD/etc/somo*prev
echo "Removing unneeded files..."
rm -rf $BUILD/lib/*prl
rm -rf $BUILD/lib/*.la
echo "Copying miscellaneous libraries..."
cp -d $MYSQL $BUILD/lib/.
cp -d $JPG $BUILD/lib/.
cp -d $PNG $BUILD/lib/.
cp -d $CRYPT $BUILD/lib/.
cp -d $CRYPTO $BUILD/lib/.
cp -d $SSL $BUILD/lib/.
echo "Stripping debugging symbols..."
strip $BUILD/bin/*
strip $BUILD/lib/*
echo "removing SVN stuff..."
find $BUILD -name .svn | xargs rm -Rf
cd $TMP
tar -cvzf $FILE.tar.gz $FILE