#!/bin/bash
# Aufruf mit: ./build-dpf-lcd4linux.sh ../dpflib/
# Modifiziert (Verzeichnischeck) von MegaV0lt @ DEB
# Prüfen, ob das Verzeichnis existeiert
[[ ! -d "$1" ]] && { echo "Verzeichnis \"$1\" nicht gefunden!" ; exit 1 ;}
# Set $DPFLIB_LOCATION to the location of your dpflib directory!
DPFLIB_LOCATION=$(readlink "$1") #$1
# Check out source from SVN
svn co -r1142 https://ssl.bulix.org/svn/lcd4linux/trunk lcd4linux
cd lcd4linux
# Apply patch
patch -p1 < ../lcd4linux-svn1142-dpf.patch
export CPPFLAGS=-I${DPFLIB_LOCATION}
export LDFLAGS=-L${DPFLIB_LOCATION}
./bootstrap
./configure --with-drivers='DPF' --with-plugins='all,!dbus,!mpris_dbus'
make