aboutsummaryrefslogtreecommitdiffstats
path: root/community/mpd/APKBUILD
blob: d4ba6282570ac06cef2a454984dcb49235e449eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# 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.15
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="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
	py3-attrs"
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
	py3-doc.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:\#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="c67ebdb7609b36b4b8504ce0751ca2dcc38a2fba03a5b8419185e8be64bce7e19560347a600773b65f55ba0a3cedeff051117071db8e7fe0a90c9771de8bd37e  mpd-0.21.15.tar.xz
f60f6f3e921d20732c1a4c31a97f28660b43fd649e767d6c39661b6a90145231a79ad3f740ae0d706380b245ad040e98b661a513463c54cea161d1f64fc261e0  stacksize.patch
6cecfa7fd40cf92ac05f3bc22192e2a739dac37118ea65d05becf0f62a1b065ad4d391ebf10563952024965bc439f31804b6d7a9e964056b99a87c8574d656e5  py3-doc.patch
1fcb7bcd90bd9bc5b4f502c56d1b0d3a3b794f5c3c1b26a2286a5936bc4e1f94f6317d52e54c958c23e40d69aa3e440535aec0fcbaaa73544ecd0c65ff6774a5  mpd.initd
41b2467f5b03f5c4dd7003cd5f56f6cfc1f67af7a9aa2538d70360f839625222bdd0c4b04c33e8cd52eeecfc354da3ca22f5aaab8aee357a5774aaf3503594e7  mpd.confd"