forked from IRATI/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-user-from-scratch
executable file
·67 lines (57 loc) · 1.84 KB
/
install-user-from-scratch
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
#!/bin/sh
# -*- sh -*-
#
# Written by: Francesco Salvestrini <f DOT salvestrini AT nextworks DOT it>
#
#
# Script-local parameters
#
PREFIX=`echo "$1"|sed -e "s,\/$,,"`
SRCDIR=`pwd`
#
# Do not touch under this line
#
ME=install-user-from-scratch
. ./.env || {
echo "$ME: Cannot load environment"
exit 1
}
echo "$ME: Installation directory will be \`$PREFIX'"
if test -n "$PREFIX" ; then
mkdir -p $PREFIX || {
echo "$ME: Cannot create directory \`$PREFIX'"
}
fi
echo "$ME: Build directory will be \`$BUILDDIR'"
if test -n "$BUILDDIR" ; then
mkdir -p $BUILDDIR || {
echo "$ME: Cannot create directory \`$BUILDDIR'"
}
fi
echo "$ME: Starting librina phase"
(cd librina && ./bootstrap) || {
echo "$ME: Cannot bootstrap"
exit 1
}
(mkdir -p $BUILDDIR/librina && cd $BUILDDIR/librina && $SRCDIR/librina/configure --enable-java-bindings --with-sysheaders=$SRCDIR/linux/usr/include --prefix=$PREFIX && make $MAKEFLAGS clean install installcheck) || {
echo "$ME: Cannot complete librina phase"
exit 1
}
echo "$ME: Starting rinad phase"
(cd rinad && ./bootstrap) || {
echo "$ME: Cannot bootstrap"
exit 1
}
(mkdir -p $BUILDDIR/rinad && cd $BUILDDIR/rinad && PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH $SRCDIR/rinad/configure --prefix=$PREFIX && make $MAKEFLAGS clean install installcheck) || {
echo "$ME: Cannot complete rinad phase"
exit 1
}
echo "$ME: Starting rina-tools phase"
(cd rina-tools && ./bootstrap) || {
echo "$ME: Cannot bootstrap"
exit 1
}
(mkdir -p $BUILDDIR/rina-tools && cd $BUILDDIR/rina-tools && PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH $SRCDIR/rina-tools/configure --prefix=$PREFIX && make $MAKEFLAGS clean all install installcheck) || {
echo "$ME: Cannot complete rina-tools phase"
exit 1
}