forked from kronosnet/ci-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci-install-src
executable file
·51 lines (48 loc) · 1.82 KB
/
ci-install-src
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
#!/bin/sh
set -e
if [ -n "$build" ]; then
echo "$build detected, nothing to do here!"
exit 0
fi
if [ -n "$install" ] && [ "$install" = 1 ]; then
installpath=/srv/${project}/origin/${target}
case "${project}" in
sbd|booth)
installpath=${installpath}-pacemaker-${pacemakerver}/
;;
*)
installpath=${installpath}/
;;
esac
echo rm -rf $installpath
rm -rf $installpath
if [ "${project}" = "pacemaker" ]; then
echo "$MAKE clean"
$MAKE clean
echo "./configure --prefix=$installpath --exec-prefix=$installpath --sysconfdir="$installpath/etc" --with-initdir="$installpath/etc/init.d" --with-ocfdir="$installpath/lib/ocf" --with-systemdsystemunitdir="$installpath/usr/lib/systemd/system" $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH"
./configure --prefix=$installpath --exec-prefix=$installpath --sysconfdir="$installpath/etc" --with-initdir="$installpath/etc/init.d" --with-ocfdir="$installpath/lib/ocf" --with-systemdsystemunitdir="$installpath/usr/lib/systemd/system" $DISTROCONFOPTS PKG_CONFIG_PATH=$EXTERNAL_CONFIG_PATH
echo "$MAKE $PARALLELMAKE $MAKEOPTS"
$MAKE $PARALLELMAKE $MAKEOPTS
fi
echo "$MAKE $MAKEINSTALLOPTS install"
$MAKE $MAKEINSTALLOPTS install
echo "$JOB_URL/$BUILD_NUMBER/" > $installpath/.build-info
echo "Creating cross projects symlinks hacks for pcs testing"
case "${project}" in
pacemaker)
cd $installpath/lib/ocf
rm -f lib
ln -sf /srv/resource-agents/origin/main/lib/ocf/lib
cd resource.d
rm -f heartbeat
ln -sf /srv/resource-agents/origin/main/lib/ocf/resource.d/heartbeat
cd pacemaker
rm -f booth-site
if [ "${target}" = "main" ]; then
ln -sf /srv/booth/origin/main-pacemaker-main/lib/ocf/resource.d/pacemaker/booth-site
else
ln -sf /srv/booth/origin/main-pacemaker-${PACEMAKER_RELEASE}/lib/ocf/resource.d/pacemaker/booth-site
fi
;;
esac
fi