blob: 5c47441e3be3a919865f5fe41a1809aaa132be69 (
plain)
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
72
73
74
|
#!/bin/sh -xe
# check build environment
prepare()
{
if [ "${TARGET_OS}" != "windows-32" ] && [ "${TARGET_OS}" != "windows-64" ] \
&& ["${TARGET_OS}" != "ubuntu-32" ] && ["${TARGET_OS}" != "ubuntu-64" ]
then
exit 1
fi
if [ "${TARGET_OS}" = "windows-32" ] || [ "${TARGET_OS}" = "windows-64" ]
then
# for Windows target (cross compiling)
# we should use cross compiler from mingw-x package
if [ "${TARGET_OS}" = "windows-32" ]
then
export PATH=/opt/mingw32/bin:$PATH
export CROSS_PREFIX=i686-w64-mingw32
else
export PATH=/opt/mingw64/bin:$PATH
export CROSS_PREFIX=x86_64-w64-mingw32
fi
# correct pc's prefix since windows install script is not run
# on linux
cd ${ROOTDIR}/lib/pkgconfig
${ROOTDIR}/correct_pc_prefix.sh
cd ${ROOTDIR}
# mingw-x doesn't have zlib, so we use our own.
export EXTRA_CFLAGS=-I${ROOTDIR}/include
export EXTRA_LDFLAGS=-L${ROOTDIR}/lib
else
# for linux target
REQUIRED_PKG="ant python zlib1g-dev libglib2.0-dev libsdl1.2-dev \
libasound2-dev libx11-dev libv4l-dev libxcomposite-dev \
libpixman-1-dev libcurl4-gnutls-dev libcap-dev libattr1-dev"
echo "Checking required packages before compling!!"
for pkg in ${REQUIRED_PKG}
do
dpkg -s ${pkg} > /dev/null
if [ "x$?" = "x0" ]
then
echo "checking ${pkg} ... OK"
else
echo "checking ${pkg} ... failure"
exit 1
fi
done
fi
}
# clean
clean()
{
echo "nothing to do"
}
# build
build()
{
. $SRCDIR/package/build.common
build_common
}
# install
install()
{
. $SRCDIR/package/build.common
install_common
}
|