summaryrefslogtreecommitdiff
path: root/repo/media/mpd.xibuild
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-04-17 22:07:52 +0100
committerdavidovski <david@davidovski.xyz>2022-04-17 22:07:52 +0100
commitc35d083dc525e223b085ec00e6863ea6eafb003c (patch)
tree5bbe25b4f92cd1821c8cbbefed9c19de6e42b98e /repo/media/mpd.xibuild
parent7cc715c1249422ddf91987be64a35eef43e3e62d (diff)
updated musl
Diffstat (limited to 'repo/media/mpd.xibuild')
-rw-r--r--repo/media/mpd.xibuild47
1 files changed, 47 insertions, 0 deletions
diff --git a/repo/media/mpd.xibuild b/repo/media/mpd.xibuild
new file mode 100644
index 0000000..9229a01
--- /dev/null
+++ b/repo/media/mpd.xibuild
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+NAME="mpd"
+DESC="Music daemon that plays MP3, FLAC, Ogg Vorbis files and Audio CDs"
+
+MAKEDEPS="meson ninja boost"
+DEPS="alsa-lib sbase expat faad2 flac fmt icu lame libao bzip2 libid3tag libmad libogg pulseaudio libsamplerate libmpdclient libvorbis musl opus pipewire soxr wavpack zlib"
+
+PKG_VER=0.23.6
+SOURCE="https://www.musicpd.org/download/mpd/${PKG_VER%.*}/mpd-$PKG_VER.tar.xz"
+ADDITIONAL="libcdio-paa-version.patch libcdio-paranoia-version.patch mpd.confd mpd.initd"
+
+prepare () {
+ apply_patches
+}
+
+build () {
+ cd build
+ meson --prefix=/usr \
+ -Dopus=enabled \
+ -Ddocumentation=enabled \
+ -Dlibmpdclient=enabled \
+ -Dwavpack=enabled \
+ -Dpipewire=enabled \
+ .. &&
+
+ ninja
+}
+
+package () {
+ DESTDIR=$PKG_DEST ninja install
+ cd ..
+ install -d $PKG_DEST/etc
+ sed -e 's:\#user.*:user\t\t"mpd":' \
+ -e 's:\#log_file.*:log_file\t\t"syslog":' \
+ doc/mpdconf.example > $PKG_DEST/etc/mpd.conf
+ install -m755 -D mpd.initd \
+ "$PKG_DEST"/etc/init.d/mpd
+ install -m644 -D mpd.confd \
+ "$PKG_DEST"/etc/conf.d/mpd
+ install -d -m775 \
+ "$PKG_DEST"/var/run/mpd \
+ "$PKG_DEST"/var/log/mpd \
+ "$PKG_DEST"/var/lib/mpd \
+ "$PKG_DEST"/var/lib/mpd/playlists \
+ "$PKG_DEST"/var/lib/mpd/music
+}