aboutsummaryrefslogtreecommitdiffstats
path: root/main/mpd/APKBUILD
blob: 7965c486d23beafe3584b0d728ddac4f4f96f008 (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
# Contributor: Sebastian Wicki <gandro@gmx.net>
# Maintainer: Natanael Copa <natanael.copa@gmail.com>
pkgname=mpd
pkgver=0.16.3
pkgrel=1
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="pkgconfig 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"
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/project/musicpd/mpd/${pkgver}/mpd-${pkgver}.tar.bz2
	mpd.initd
	mpd.confd
	"

build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-shout \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	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="6e708c02b0e8c288aec855eecf441a5a  mpd-0.16.3.tar.bz2
2ccbb38edc6dff5b5740760837f3005a  mpd.initd
dbd301041953a5cf9c2b9de8f23eb6bb  mpd.confd"