2017-09-02 22:26:22 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
TARGET=${1:-hyperion}
|
|
|
|
CFG="${2:-Release}"
|
|
|
|
INST="$( [ "${3:-}" = "install" ] && echo true || echo false )"
|
|
|
|
|
|
|
|
sudo apt-get update
|
2020-07-12 09:23:13 +02:00
|
|
|
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev libturbojpeg0-dev python3-dev libxcb-util0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libssl-dev libjpeg-dev libqt5sql5-sqlite zlib1g-dev || exit 1
|
2017-09-02 22:26:22 +02:00
|
|
|
|
|
|
|
if [ -e /dev/vc-cma -a -e /dev/vc-mem ]
|
|
|
|
then
|
|
|
|
sudo apt-get install libraspberrypi-dev || exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
git clone --recursive https://github.com/hyperion-project/hyperion.ng.git ${TARGET} || exit 1
|
|
|
|
|
|
|
|
rm -rf $TARGET/build
|
|
|
|
mkdir -p $TARGET/build || exit 1
|
|
|
|
cd $TARGET/build || exit 1
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=$CFG .. || exit 1
|
|
|
|
make -j $(nproc) || exit 1
|
|
|
|
|
|
|
|
# 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"
|