# Contributor: Leo # Contributor: Łukasz Jendrysik # Contributor: Sebastian Wicki # Contributor: Sören Tempel # Maintainer: Carlo Landmeter pkgname=mpd pkgver=0.21.10 case $pkgver in *.*.*) _branch=${pkgver%.*};; *.*) _branch=$pkgver;; esac pkgrel=0 pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files" url="https://musicpd.org" pkgusers="mpd" pkggroups="mpd audio" arch="all" license="GPL-2.0-or-later" makedepends="py-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" checkdepends="gtest-dev gtest" install="$pkgname.pre-install" subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc" source="https://www.musicpd.org/download/$pkgname/$_branch/$pkgname-$pkgver.tar.xz stacksize.patch mpd.initd mpd.confd" build() { meson \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --buildtype=release \ -Dshout=enabled \ -Dopus=enabled \ -Dmodplug=enabled \ -Dnfs=enabled \ -Dsmbclient=enabled \ -Dffmpeg=enabled \ -Dlibmpdclient=enabled \ -Dtest=true \ -Ddocumentation=true \ . output ninja -C output } check() { ninja -C output -v test } package() { DESTDIR="$pkgdir" ninja -C output install # provide a config that works by default install -d "$pkgdir"/etc sed -e 's:\#pid_file.*:pid_file\t\t"/var/run/mpd/mpd.pid":' \ -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="42272ab5f767c5a6b907f5dd922ca35abc759dfbb4769a235261fdf0433a0f70494f503255403d41dfd34902bd6aff21f48291b24fd5bc260a5fdef53800c991 mpd-0.21.10.tar.xz f60f6f3e921d20732c1a4c31a97f28660b43fd649e767d6c39661b6a90145231a79ad3f740ae0d706380b245ad040e98b661a513463c54cea161d1f64fc261e0 stacksize.patch 3725a528a45edf60e6a9ebd75c880aa63d0e71ab40c20dbc538af2d7c83ca657833b6853d9b488d635883fb7871bb76fada129b3bf8acff4bb060f98a5ad8774 mpd.initd 41b2467f5b03f5c4dd7003cd5f56f6cfc1f67af7a9aa2538d70360f839625222bdd0c4b04c33e8cd52eeecfc354da3ca22f5aaab8aee357a5774aaf3503594e7 mpd.confd"