aboutsummaryrefslogtreecommitdiffstats
path: root/main/mpd/APKBUILD
blob: 481d12c85cca00e5b41120410be851966f36f51a (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
82
83
84
85
86
87
88
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Sebastian Wicki <gandro@gmx.net>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpd
pkgver=0.19.9
case $pkgver in
*.*.*) _branch=${pkgver%.*};;
*.*) _branch=$pkgver;;
esac

pkgrel=3
pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files"
url="http://musicpd.org"
pkgusers="mpd"
pkggroups="mpd audio"
arch="all"
license="GPL2"
depends=
makedepends="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
	autoconf automake libtool"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-dbg"
source="http://www.musicpd.org/download/mpd/$_branch/mpd-$pkgver.tar.xz
	underlinking.patch
	mpd.initd
	mpd.confd"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	libtoolize --force && aclocal && autoconf && automake --add-missing \
		|| return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-shout \
		--enable-modplug \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" 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/playlists \
		"$pkgdir"/var/lib/mpd/music
}
md5sums="1a66f7b4db1fa61b87e04e666c94088d  mpd-0.19.9.tar.xz
a84cce5fdb848c7d282e38698432df51  underlinking.patch
69f9df7ba92ac3f6c46a4a30a2a5c025  mpd.initd
dbd301041953a5cf9c2b9de8f23eb6bb  mpd.confd"
sha256sums="47851423053cd38cfad65be5985b41b7cd5bdbe8d0d13378e11748a28b19f26f  mpd-0.19.9.tar.xz
b3a0499cbd3f759612ad94fce00588d97e5e82af0b2bcc560869eb977067a426  underlinking.patch
9d842c202c010b7254dc89971649139b81bfec49f11c19bcba8be8712279ba7b  mpd.initd
32c072f77c23c2cc2dd7c93b65b73015e0587caaf2740856132af32cee623206  mpd.confd"
sha512sums="7d74254e009008ed142ce0b69e75fe6f255ec2c814b246f570225af715ec5c3a5c75276f4720bc1ad351d48be5b20f9797843c03aae9380a6062796539507bf4  mpd-0.19.9.tar.xz
d6a98c5f60a60ddd5fa94b25864f800a6a6fb6ffe114793293d0ccc71bb5d1cdb847ca39fde4128446b55a38be85634106d5d6f2c77ee450f33631b30140781a  underlinking.patch
8b13530fbfb2bded3cb82202261d57ff824521e5682f07c8f3d0562348aeb303e6c3d72a457043c4d4909d7106d723fe701a12ab66b45b016d3b940acbeb205b  mpd.initd
41b2467f5b03f5c4dd7003cd5f56f6cfc1f67af7a9aa2538d70360f839625222bdd0c4b04c33e8cd52eeecfc354da3ca22f5aaab8aee357a5774aaf3503594e7  mpd.confd"