-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcompile.sh
executable file
·62 lines (54 loc) · 2.39 KB
/
compile.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
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash -e
if [[ $* == *--python3* ]]; then
PYEX=python3
else
PYEX=python
fi
CLEAN=0
[ "$1" = 'clean' ] && CLEAN=1
echo "-----------------------------------------------------------------"
echo "| Build openzwave |"
echo "-----------------------------------------------------------------"
cd openzwave/
[ $CLEAN -eq 1 ] && make clean
echo "Applying ugly patch to openzwave to work around bug in Cython"
sed -i '253s/.*//' cpp/src/value_classes/ValueID.h
VERSION_REV=0 make
cd ..
echo "-----------------------------------------------------------------"
echo "| Build python-openzwave |"
echo "-----------------------------------------------------------------"
[ $CLEAN -eq 1 ] && $PYEX setup-lib.py clean
[ $CLEAN -eq 1 ] && $PYEX setup-api.py clean
[ $CLEAN -eq 1 ] && rm -Rf build/
[ $CLEAN -eq 1 ] && rm -Rf docs/_build
[ $CLEAN -eq 1 ] && rm lib/libopenzwave.cpp
$PYEX setup-lib.py build
$PYEX setup-api.py build
#Remove the doc generattion as it fails on Ubuntu 10.04
#if [ u != $(which sphinx-build)u ] ; then
# echo "-----------------------------------------------------------------"
# echo "| Make documentation |"
# echo "-----------------------------------------------------------------"
# python setup-lib.py install --root=build/tmp
# python setup-api.py install --root=build/tmp
# cd docs
# make html
# cd ..
#else
# echo "-----------------------------------------------------------------"
# echo "| sphinx not found |"
# echo "| No documentation general |"
# echo "-----------------------------------------------------------------"#
#
#fi
echo "-----------------------------------------------------------------"
echo "| You can now install python-openzwave |"
echo "| Run the following command |"
echo "| sudo ./install.sh |"
#echo "| Installation directories : |"
#echo "| config directory : /usr/local/share/python-openzwave |"
#if [ u != $(which sphinx-build)u ] ; then
# echo "| Documentation : /usr/local/share/doc/python-openzwave |"
#fi
echo "-----------------------------------------------------------------"