summaryrefslogtreecommitdiff
path: root/mpd/APKBUILD
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-03-17 15:31:05 +0100
committerKarel Kočí <cynerd@email.cz>2020-03-17 15:31:05 +0100
commitb631d0548ed2512c33989f7b5c73ee6dd1753eaa (patch)
tree41f79f682c19ea720c9fa7671f0f6fcfc0ab78b1 /mpd/APKBUILD
parentfed03e6840348b38fe3164381b9fce8b317c2fda (diff)
downloadalpine-personal-pkgs-b631d0548ed2512c33989f7b5c73ee6dd1753eaa.tar.gz
alpine-personal-pkgs-b631d0548ed2512c33989f7b5c73ee6dd1753eaa.tar.bz2
alpine-personal-pkgs-b631d0548ed2512c33989f7b5c73ee6dd1753eaa.zip
mpd: add and compile against pulseaudio
Diffstat (limited to 'mpd/APKBUILD')
-rw-r--r--mpd/APKBUILD94
1 files changed, 94 insertions, 0 deletions
diff --git a/mpd/APKBUILD b/mpd/APKBUILD
new file mode 100644
index 0000000..cff7d3b
--- /dev/null
+++ b/mpd/APKBUILD
@@ -0,0 +1,94 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
+# Contributor: Łukasz Jendrysik <scadu@yandex.com>
+# Contributor: Sebastian Wicki <gandro@gmx.net>
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
+pkgname=mpd
+pkgver=0.21.20
+case $pkgver in
+*.*.*) _branch=${pkgver%.*};;
+*.*) _branch=$pkgver;;
+esac
+pkgrel=42
+pkgdesc="Music daemon that plays MP3, FLAC, Ogg Vorbis files and Audio CDs"
+url="https://musicpd.org"
+pkgusers="mpd"
+pkggroups="mpd audio"
+arch="all"
+license="GPL-2.0-or-later"
+makedepends="py3-sphinx lame-dev glib-dev curl-dev libao-dev libmad-dev flac-dev
+ libogg-dev faad2-dev libid3tag-dev libvorbis-dev alsa-lib-dev
+ libsamplerate-dev libshout-dev libmodplug-dev boost-dev icu-dev
+ libnfs-dev samba-dev opus-dev ffmpeg-dev meson libmpdclient-dev
+ libcdio-paranoia-dev avahi-dev py3-attrs libcap pulseaudio-dev"
+checkdepends="gtest-dev gtest"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc"
+source="https://www.musicpd.org/download/mpd/$_branch/mpd-$pkgver.tar.xz
+ stacksize.patch
+ mpd.initd
+ mpd.confd
+ disable-iso-test.patch
+ libcdio-paranoia-version.patch
+ remove-avahi-test.patch
+ "
+
+build() {
+ meson \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --buildtype=plain \
+ -Dshout=enabled \
+ -Dopus=enabled \
+ -Dmodplug=enabled \
+ -Dnfs=enabled \
+ -Dsmbclient=enabled \
+ -Dffmpeg=enabled \
+ -Dlibmpdclient=enabled \
+ -Dcdio_paranoia=enabled \
+ -Dzeroconf=avahi \
+ -Dpulse=enabled \
+ -Dtest=true \
+ -Ddocumentation=true \
+ . output
+ ninja -C output
+}
+
+check() {
+ ninja -C output -v test
+}
+
+package() {
+ DESTDIR="$pkgdir" ninja -C output install
+
+ # mpd attempts to configure real-time scheduling on linux
+ # add the capability which allows doing that
+ # see: https://www.musicpd.org/doc/html/user.html#real-time-scheduling
+ setcap cap_sys_nice+ep "$pkgdir"/usr/bin/mpd
+
+ # provide a config that works by default
+ install -d "$pkgdir"/etc
+ sed -e 's:\#user.*:user\t\t"mpd":' \
+ -e 's:\#log_file.*:log_file\t\t"syslog":' \
+ doc/mpdconf.example > "$pkgdir"/etc/mpd.conf
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname
+ install -d -g audio -o mpd -m775 \
+ "$pkgdir"/var/run/mpd \
+ "$pkgdir"/var/log/mpd \
+ "$pkgdir"/var/lib/mpd \
+ "$pkgdir"/var/lib/mpd/playlists \
+ "$pkgdir"/var/lib/mpd/music
+}
+
+sha512sums="9dd49190ba4c85014d24e88cdb02a4649e8fb687a49fc9ea019f23725eda483980008e9abebf0ad3960bd310b693c56999699d7c7ddee3ca18e9b2aa6d5a2176 mpd-0.21.20.tar.xz
+f60f6f3e921d20732c1a4c31a97f28660b43fd649e767d6c39661b6a90145231a79ad3f740ae0d706380b245ad040e98b661a513463c54cea161d1f64fc261e0 stacksize.patch
+8547f685adf3cdc7b2aab7bedeed8c72242011c6f1e01750415ac21eba5ecf6b416239f527adbc904f72439c5d476249148cfb89965e33de1be69421e02c18e0 mpd.initd
+41b2467f5b03f5c4dd7003cd5f56f6cfc1f67af7a9aa2538d70360f839625222bdd0c4b04c33e8cd52eeecfc354da3ca22f5aaab8aee357a5774aaf3503594e7 mpd.confd
+94de2fb5e984e3246f79c2c7ab2f3123bba6c7d34e0f9b075ba3946d65912fd7f5e9d37bdb0bdee769fa6f6f8abb8ca5f2788b7976e2e5490b848800b31539fb disable-iso-test.patch
+1e0e59247a22944435ca6052767ea1359d46362083de40ce36276327e4974315862a9f995f0047811e122bf4ce871f0b3965d15580f6a752d95c3617aa83136c libcdio-paranoia-version.patch
+1c3da85437a9d89decd2ee692f9f9b64c6d990537a715e2e6d0f771e56593463e174ba22cfdeed6c3b49b9e490259cd693b746f0b33e8732795cf79f82a8d8c0 remove-avahi-test.patch"