forked from overte-org/overte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-rpm-server
executable file
·56 lines (51 loc) · 2.13 KB
/
make-rpm-server
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
#!/bin/sh
if [ "$ATHENA" = "" ]; then
ATHENA=`realpath ../..`
fi
GITDATE=`git -C $ATHENA/source log -n 1 --format=raw | grep author | cut -d">" -f 2 | cut -d" " -f 2 | xargs -I {} date -d @{} +"%Y%m%d"`
GITCOMMIT=`git -C $ATHENA/source rev-parse HEAD | cut -c 1-7`
VERSION=0.86.0_K2_${GITDATE}_${GITCOMMIT}
SOFILES=`ls \
$ATHENA/build/libraries/*/*.so \
$ATHENA/qt5-install/lib/libQt5Network.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Core.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Script.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
$ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* \
| sed 's/\./\\\./g' \
| paste -d'|' -s`
DEPENDS=mesa-libGL,`ls \
$ATHENA/build/assignment-client/assignment-client \
$ATHENA/build/domain-server/domain-server \
$ATHENA/build/tools/oven/oven \
$ATHENA/build/libraries/*/*.so \
$ATHENA/qt5-install/lib/libQt5Network.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Core.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Widgets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Gui.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Script.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Quick.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5WebSockets.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5Qml.so.*.*.* \
$ATHENA/qt5-install/lib/libQt5ScriptTools.so.*.*.* \
$ATHENA/build/ext/makefiles/quazip/project/lib/libquazip5.so.*.*.* \
$ATHENA/build/assignment-client/plugins/*.so \
$ATHENA/build/assignment-client/plugins/*/*.so \
| xargs -I {} sh -c 'objdump -p {} | grep NEEDED' \
| awk '{print $2}' \
| sort | uniq \
| egrep -v "^($SOFILES)$" \
| grep -v ^libGL \
| xargs -I {} sh -c "ldconfig -p | grep {} | tr ' ' '\n' | grep /" \
| xargs rpm -qf --queryformat "%{NAME}\n" \
| sort | uniq \
| paste -d',' -s`
sudo yum install chrpath
export VERSION DEPENDS ATHENA
rpmbuild --target x86_64 -bb ./athena-server.spec
mv ~/rpmbuild/RPMS/x86_64/*.rpm .