-
Notifications
You must be signed in to change notification settings - Fork 31
/
build-auto.sh
executable file
·71 lines (58 loc) · 1.63 KB
/
build-auto.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
63
64
65
66
67
68
69
70
71
#!/bin/sh
cd "$(dirname "$0")"
export DVBTEE_ROOT="`pwd`"
mkdir -p usr/bin
mkdir -p usr/lib
mkdir -p usr/include
if [ -e .clean ]; then
make clean -C libdvbpsi
if [ $? != 0 ]; then
echo "make clean (libdvbpsi) failed"
#exit 1 // dont exit
fi
make clean
if [ $? != 0 ]; then
echo "make clean failed"
#exit 1 // dont exit
fi
fi
if [ -e libdvbpsi/bootstrap ]; then
cd libdvbpsi
else
rm -rf libdvbpsi
git clone https://github.com/mkrufky/libdvbpsi.git
cd libdvbpsi
touch .dont_del
fi
./bootstrap
./configure --prefix=${DVBTEE_ROOT}/usr/ --enable-static --with-pic CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
cd ..
make -C libdvbpsi -j
if [ $? != 0 ]; then
echo "make (libdvbpsi) failed"
exit 1
fi
make -C libdvbpsi install
mkdir -p m4
if [ -e aclocal.m4 ]; then
echo "configuration installed..."
else
autoreconf --install
fi
if [ -e .staticlib ]; then
LD_LIBRARY_PATH=${DVBTEE_ROOT}/usr/lib ./configure CPPFLAGS="-I${DVBTEE_ROOT}/usr/include/dvbpsi/ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" LDFLAGS="-L${DVBTEE_ROOT}/usr/lib/ -ldvbpsi" --enable-dvbpsibuild "$@" --with-pic --enable-static --disable-shared
else
LD_LIBRARY_PATH=${DVBTEE_ROOT}/usr/lib ./configure CPPFLAGS="-I${DVBTEE_ROOT}/usr/include/dvbpsi/ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" LDFLAGS="-L${DVBTEE_ROOT}/usr/lib/ -ldvbpsi" --enable-dvbpsibuild "$@" --with-pic
fi
if [ -e .clean ]; then
make clean
if [ $? != 0 ]; then
echo "make clean failed"
#exit 1 // dont exit
fi
fi
make -C . -j
if [ $? != 0 ]; then
echo "make failed"
exit 1
fi