termux-packages/packages/mpd/build.sh

37 lines
1.1 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://www.musicpd.org
TERMUX_PKG_DESCRIPTION="Music player daemon"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=0.21.8
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=452d56016dc5a70ab07258175f768320266b8548c61eed31475604b039abfc44
TERMUX_PKG_SRCURL=https://github.com/MusicPlayerDaemon/MPD/archive/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_DEPENDS="libcurl, libid3tag, libopus, libpulseaudio, libmpdclient, openal-soft, libvorbis, libsqlite, ffmpeg, libmp3lame, libbz2, libogg, libnfs, zlib"
TERMUX_PKG_BUILD_DEPENDS="boost"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Dalsa=disabled
-Dao=disabled
-Depoll=false
-Dexpat=disabled
-Diconv=disabled
-Dicu=disabled
-Dmad=disabled
-Dpcre=disabled
-Dsndio=disabled
"
TERMUX_PKG_CONFFILES="$TERMUX_PREFIX/etc/mpd.conf"
termux_step_pre_configure() {
CXXFLAGS+=" -DTERMUX -UANDROID"
LDFLAGS+=" -llog -lOpenSLES"
rm -f $TERMUX_PREFIX/etc/mpd.conf
}
termux_step_post_make_install() {
install -Dm600 $TERMUX_PKG_SRCDIR/doc/mpdconf.example $TERMUX_PREFIX/etc/mpd.conf
}
termux_step_create_debscripts() {
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
echo 'mkdir -p $HOME/.mpd/playlists' >> postinst
}