forked from gluster/glusterfs-patch-acceptance-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·49 lines (43 loc) · 1.07 KB
/
build.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
#!/usr/bin/env bash
set -e
# needed for freebsd
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
SRC=$(pwd);
# Get platform-specific values.
case $(uname -s) in
'Linux')
nproc=$(getconf _NPROCESSORS_ONLN)
bd="yes"
werror="-Werror"
;;
'NetBSD'|'FreeBSD')
nproc=$(getconf NPROCESSORS_ONLN)
bd="no"
werror=""
;;
*)
nproc=4
bd="no"
werror=""
esac
case $JOB_NAME in
'gh_regression-test-with-multiplex'|'gh_regression-on-demand-multiplex')
brickmux="--enable-brickmux"
;;
*)
brickmux=""
esac
if type rpm >/dev/null 2>&1; then
rpm -qa | grep glusterfs | xargs --no-run-if-empty rpm -e
fi
./autogen.sh;
P=/build;
rm -rf $P/scratch;
mkdir -p $P/scratch;
cd $P/scratch;
rm -rf $P/install;
$SRC/configure --prefix=$P/install --with-mountutildir=$P/install/sbin \
--with-initdir=$P/install/etc --localstatedir=/var \
--enable-debug --enable-gnfs --silent ${brickmux}
make install CFLAGS="-Wall ${werror} -Wno-cpp" -j ${nproc}
cd $SRC;