-
Notifications
You must be signed in to change notification settings - Fork 51
/
make_e2_sh4_qboxhd.sh
51 lines (39 loc) · 1.34 KB
/
make_e2_sh4_qboxhd.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
#!/bin/sh
[ -d ./tmp ] && rm -rf ./tmp
DEVKIT_ROOT=/opt/STM/STLinux-2.3/devkit/sh4
CROSS=${DEVKIT_ROOT}/bin/sh4-linux-
export CFLAGS+="-I${DEVKIT_ROOT}/target/usr/include \
-I${DEVKIT_ROOT}/target/usr/include/libxml2 \
-I${DEVKIT_ROOT}/target/usr/include/python2.5"
export CC=${CROSS}gcc
export STRIP=${CROSS}strip
export SWIG=swig
export D=./tmp/qboxhd_update
export TARGET_ARCH=sh4
make && make install-var-qboxhd
if [ $? != 0 ]; then
echo compile error
exit 1
fi
VERSION=`cat src/version.h | grep RELEASE | sed "s/.*RELEASE \"//" | sed "s/\"//" | sed "s/\ /-/" | sed "s/\ /-/" | sed "s/(//" | sed "s/)//"`
[ ! -d out ] && mkdir out
# make qboxhd_update
cp contrib/qboxhd_update.sh tmp/qboxhd_update/update.sh
chmod 755 tmp/qboxhd_update/update.sh
chown -R root:root tmp/*
cd tmp
tar zcf ../out/crossepg-${VERSION}-qboxhd_update.tar.gz *
cd ..
# make addon
rm -f tmp/qboxhd_update/update.sh
mkdir -p tmp/qboxhd_update/var/addons/uninstall
cp contrib/qboxhd_uninstall.sh tmp/qboxhd_update/var/addons/uninstall/crossepg_delfile.sh
chmod 755 tmp/qboxhd_update/var/addons/uninstall/crossepg_delfile.sh
mkdir tmp/qboxhd_update/usr/bin
mkdir tmp/qboxhd_update/usr/local/bin
cd tmp/qboxhd_update/usr/bin
ln -sf ../local/bin/python python
cd ../..
tar zcf ../../out/crossepg-${VERSION}-qboxhd_addon.tar.gz *
cd ../..
echo "Package moved in `pwd`/out folder"