2017-09-02 22:26:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-08-02 22:37:52 +02:00
|
|
|
# exit on error
|
|
|
|
set -e
|
|
|
|
|
2017-09-02 22:26:22 +02:00
|
|
|
TARGET=${1:-hyperion}
|
|
|
|
CFG="${2:-Release}"
|
|
|
|
INST="$( [ "${3:-}" = "install" ] && echo true || echo false )"
|
|
|
|
|
|
|
|
sudo apt-get update
|
2020-08-02 22:37:52 +02:00
|
|
|
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 \
|
|
|
|
libqt5sql5-sqlite \
|
2020-10-20 17:41:20 +02:00
|
|
|
libqt5svg5-dev \
|
2020-08-02 22:37:52 +02:00
|
|
|
zlib1g-dev \
|
2017-09-02 22:26:22 +02:00
|
|
|
|
|
|
|
if [ -e /dev/vc-cma -a -e /dev/vc-mem ]
|
|
|
|
then
|
2020-08-02 22:37:52 +02:00
|
|
|
sudo apt-get install libraspberrypi-dev
|
2017-09-02 22:26:22 +02:00
|
|
|
fi
|
|
|
|
|
2020-08-02 22:37:52 +02:00
|
|
|
git clone --recursive https://github.com/hyperion-project/hyperion.ng.git ${TARGET}
|
2017-09-02 22:26:22 +02:00
|
|
|
|
2020-08-02 22:37:52 +02:00
|
|
|
rm -rf $TARGET/build
|
|
|
|
mkdir -p $TARGET/build
|
|
|
|
cd $TARGET/build
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=$CFG ..
|
|
|
|
make -j $(nproc)
|
2017-09-02 22:26:22 +02:00
|
|
|
|
|
|
|
# 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"
|