-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_steamlink.sh
45 lines (42 loc) · 1.11 KB
/
build_steamlink.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
#!/bin/bash
#
STEAMLINK_IP="192.168.10.109"
VERSION="2.3.0"
PROGNAME="openjpeg"
TARGET_DIR="/home/steam/opt"
DOWNLOAD_URL="https://github.com/uclouvain/${PROGNAME}/archive/v${VERSION}.tar.gz"
TOP=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
if [ "${MARVELL_SDK_PATH}" = "" ]; then
MARVELL_SDK_PATH="$(cd "${TOP}/../.." && pwd)"
fi
if [ "${MARVELL_ROOTFS}" = "" ]; then
source "${MARVELL_SDK_PATH}/setenv.sh" || exit 1
fi
BUILD="${TOP}/${PROGNAME}-build"
mkdir ${BUILD}
SRC="${TOP}/${PROGNAME}-${VERSION}"
#
# Download the source
#
if [ ! -d "${SRC}" ]; then
wget $DOWNLOAD_URL -O- | tar xzS || exit 1
fi
#
# Build it
#
pushd "${SRC}"
"${SRC}"/configure $STEAMLINK_CONFIGURE_OPTS ; pwd || exit 1
cmake $STEAMLINK_CONFIGURE_OPTS -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr . ; pwd || exit 1
make || exit 1
"${CROSS}"strip -s ${PROGNAME}
make DESTDIR=${BUILD} install
make DESTDIR=${BUILD} clean
popd
tar -cf ${PROGNAME}-build.tar ${PROGNAME}-build
#
# All done!
#
echo "Build complete!"
echo
echo "To copy ${PROGNAME} to the Steam Link, run:"
echo "scp \"${PROGNAME}-build.tar\" root@${STEAMLINK_IP}:/home/steam/opt/"