aboutsummaryrefslogtreecommitdiffstats
path: root/main/mpd/APKBUILD
blob: dd8d8f5352fce1c32e2dfbd9ab48c0c8cb38e864 (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
# 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.20.6
case $pkgver in
*.*.*) _branch=${pkgver%.*};;
*.*) _branch=$pkgver;;
esac
pkgrel=1
pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files"
url="https://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
	libnfs-dev samba-dev opus-dev ffmpeg-dev
	autoconf automake libtool"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-dbg"
source="https://www.musicpd.org/download/mpd/$_branch/mpd-$pkgver.tar.xz
	underlinking.patch
	stacksize.patch
	mpd.initd
	mpd.confd"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare || return 1
	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-opus \
		--enable-modplug \
		--enable-nfs \
		--enable-smbclient \
		--enable-ffmpeg \
		|| return 1
	make || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1

	# 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 || return 1
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname || return 1
	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 || return 1
}

sha512sums="3377e095eaf8cd3ae14e4218fd85d1bcd79d29899ad4c61f5cd2a0b714c5e8aa22aa3b8bd54477195b93ddd44b8e82f8c6428c8f36174c98cba631554224dcfe  mpd-0.20.6.tar.xz
d6a98c5f60a60ddd5fa94b25864f800a6a6fb6ffe114793293d0ccc71bb5d1cdb847ca39fde4128446b55a38be85634106d5d6f2c77ee450f33631b30140781a  underlinking.patch
f425c20e18207a406f84a6a664f02625fca9d42977b1289f4ba8595406b26f6aa73b4f1cb5a1115858cb75fa7844f42d7174adba3f6af1af216c44901a1ccaa0  stacksize.patch
3725a528a45edf60e6a9ebd75c880aa63d0e71ab40c20dbc538af2d7c83ca657833b6853d9b488d635883fb7871bb76fada129b3bf8acff4bb060f98a5ad8774  mpd.initd
41b2467f5b03f5c4dd7003cd5f56f6cfc1f67af7a9aa2538d70360f839625222bdd0c4b04c33e8cd52eeecfc354da3ca22f5aaab8aee357a5774aaf3503594e7  mpd.confd"