Commit | Line | Data |
---|---|---|
a591496f JR |
1 | # Create build directory |
2 | rm -rf $WORKSPACE/build | |
3 | mkdir -p $WORKSPACE/build | |
4 | ||
5 | PREFIX="$WORKSPACE/build" | |
6 | ||
7 | ./bootstrap | |
8 | ||
9 | CONF_OPTS="" | |
10 | ||
11 | case "$conf" in | |
12 | static) | |
13 | echo "Static build" | |
14 | CONF_OPTS="--enable-static --disable-shared" | |
15 | ;; | |
16 | python_bindings) | |
17 | echo "Build with python bindings" | |
18 | # We only support bindings built with Python 3 | |
19 | export PYTHON="python3" | |
20 | export PYTHON_CONFIG="/usr/bin/python3-config" | |
21 | CONF_OPTS="--enable-python-bindings" | |
22 | ;; | |
23 | *) | |
24 | echo "Standard build" | |
25 | CONF_OPTS="" | |
26 | ;; | |
27 | esac | |
28 | ||
29 | ./configure --prefix=$PREFIX $CONF_OPTS | |
30 | ||
31 | make | |
32 | make install | |
33 | ||
34 | rm -rf $WORKSPACE/tap | |
35 | mkdir -p $WORKSPACE/tap | |
36 | ||
37 | cd $WORKSPACE/tests | |
38 | ||
39 | # Run make check tests | |
40 | prove --merge --exec '' - < $WORKSPACE/tests/tests --archive $WORKSPACE/tap/ || true | |
41 | ||
42 | # TAP plugin is having a hard time with .yml files. | |
43 | rm -f $WORKSPACE/tap/meta.yml | |
44 | ||
45 | # And also with files without extension, so rename all result to *.tap | |
46 | find $WORKSPACE/tap/ -type f -exec mv {} {}.tap \; | |
47 | ||
48 | make clean | |
49 | ||
50 | # Cleanup rpath and libtool .la files | |
51 | find $WORKSPACE/build/bin -executable -type f -exec chrpath --delete {} \; | |
52 | find $WORKSPACE/build/lib -name "*.so" -exec chrpath --delete {} \; | |
53 | find $WORKSPACE/build/lib -name "*.la" -exec rm -f {} \; |