# Contributor: Sebastian Wicki # Maintainer: Natanael Copa pkgname=mpd pkgver=0.18.12 pkgrel=0 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 autoconf automake libtool" install="$pkgname.pre-install" subpackages="$pkgname-doc" source="http://www.musicpd.org/download/mpd/${pkgver%.*}/mpd-$pkgver.tar.xz fix-musl.patch 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 update_config_sub } 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="d42be8d5cf66e8d5345704c3456206ac mpd-0.18.12.tar.xz efa521234a16b5f4ffbde40ef645eab2 fix-musl.patch 66d79f107766fcbb80530a2e3eda8d62 underlinking.patch 2ccbb38edc6dff5b5740760837f3005a mpd.initd dbd301041953a5cf9c2b9de8f23eb6bb mpd.confd" sha256sums="30cd1f6f396a6433f7f27a6c0ec0de5e061cec6ad1bd2f7de9095c16aac0d86c mpd-0.18.12.tar.xz cf3cb6c2e1b93baabbe0375e75b8909f80589c568c28c1e301c9ad960550d5d8 fix-musl.patch 2350d1e82d5271dd1d2eb205ffa517dca4fc3f65eedc9f6841db74a29f1380b2 underlinking.patch 5f9d066a044d6cb1a9990a59f63dd4a07e78e5179ad90b22374db09b7c62cafd mpd.initd 32c072f77c23c2cc2dd7c93b65b73015e0587caaf2740856132af32cee623206 mpd.confd" sha512sums="36cb295a8c14aff7956b0f12d6dbdd5f2d5cf0502a347ed55b5eed9738fc58eaf849546a20ff522eaee4730376cdd0a03d3a6febadaee6b31290cd43c00ec80c mpd-0.18.12.tar.xz ea3efdf7baaaabdfbbc8c4571b30c666e0a96465fc05e4c84629304af21d8f26d339c49e9f8de458e6320b1a6334457cd2b8fb633f318e525a261ca8016d2974 fix-musl.patch f8fdec6999036dc49dd954f7df211adf853aed8f5e0cf8538c251017593d4448d569fa8abf6d536de2ff05a7abb4dd4daa604b9dd5a9a7ddbcfe9b2fda591290 underlinking.patch 80ad8c2fa59c1bd52d3db50e46208f64d027fbecd753b6d688a1095627c8a8b84bd337a682a192bde0b2155edc0eafbe59ed47bae3b3c26c4b1c0a8090d77f6d mpd.initd 41b2467f5b03f5c4dd7003cd5f56f6cfc1f67af7a9aa2538d70360f839625222bdd0c4b04c33e8cd52eeecfc354da3ca22f5aaab8aee357a5774aaf3503594e7 mpd.confd"