forked from E2OpenPlugins/e2openplugin-CrossEPG
-
Notifications
You must be signed in to change notification settings - Fork 19
/
make_e2_oealliance.sh
34 lines (26 loc) · 1.03 KB
/
make_e2_oealliance.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
#!/bin/sh
[ -d ./tmp ] && rm -rf ./tmp
DEVKIT_ROOT=/sifteam/jackal/builds/opensif/gbquad/tmp/
CROSS=${DEVKIT_ROOT}/sysroots/x86_64-linux/usr/bin/mips32el-oe-linux/mipsel-oe-linux-
export CFLAGS+="-I${DEVKIT_ROOT}/sysroots/gbquad/usr/include \
-I${DEVKIT_ROOT}/sysroots/gbquad/usr/include/libxml2 \
-I${DEVKIT_ROOT}/sysroots/gbquad/usr/include/python3.8"
export CC=${CROSS}gcc
export STRIP=${CROSS}strip
export SWIG=${DEVKIT_ROOT}/sysroots/x86_64-linux/usr/bin/swig
export D=./tmp
make && make install
if [ $? != 0 ]; then
echo compile error
exit 1
fi
mkdir -p tmp/CONTROL
cp contrib/control tmp/CONTROL/
VERSION=`cat src/version.h | grep RELEASE | sed "s/.*RELEASE \"//" | sed "s/\"//" | sed "s/\ /-/" | sed "s/\ /-/" | sed "s/(//" | sed "s/)//"`
echo "Package: enigma2-plugin-systemplugins-crossepg" >> tmp/CONTROL/control
echo "Version: $VERSION-r0" >> tmp/CONTROL/control
echo "Architecture: mipsel" >> tmp/CONTROL/control
sh ipkg-build -o root -g root tmp/
[ ! -d out ] && mkdir out
mv *.ipk out
echo "Package moved in `pwd`/out folder"