forked from hyperion-project/hyperion.ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
executable file
·49 lines (42 loc) · 1.27 KB
/
compile.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
#!/bin/sh
# exit on error
set -e
TARGET=${1:-hyperion}
CFG="${2:-Release}"
INST="$( [ "${3:-}" = "install" ] && echo true || echo false )"
sudo apt-get update
sudo apt-get install \
git \
cmake \
build-essential \
qtbase5-dev \
libqt5serialport5-dev \
libusb-1.0-0-dev \
libturbojpeg0-dev \
python3-dev \
libcec-dev \
libxcb-util0-dev \
libxcb-randr0-dev \
libxrandr-dev \
libxrender-dev \
libavahi-core-dev \
libavahi-compat-libdnssd-dev \
libssl-dev \
libjpeg-dev \
libqt5sql5-sqlite \
libqt5svg5-dev \
zlib1g-dev \
if [ -e /dev/vc-cma -a -e /dev/vc-mem ]
then
sudo apt-get install libraspberrypi-dev
fi
git clone --recursive https://github.com/hyperion-project/hyperion.ng.git ${TARGET}
rm -rf $TARGET/build
mkdir -p $TARGET/build
cd $TARGET/build
cmake -DCMAKE_BUILD_TYPE=$CFG ..
make -j $(nproc)
# optional: install into your system
$INST && sudo make install/strip
echo "to uninstall (not very well tested, please keep that in mind):"
echo " sudo make uninstall"