# Contributions from Arch: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/mpd pkgname=mpd pkgver=0.19.19 pkgrel=1 pkgdesc='Flexible, powerful, server-side application for playing music' url='http://www.musicpd.org/' license=('GPL') arch=('x86_64') depends=('audiofile' 'avahi' 'curl' 'faad2' 'ffmpeg' 'jack' 'libao' 'libid3tag' 'libmad' 'libmms' 'libmodplug' 'libpulse' 'libshout' 'sqlite3' 'wavpack' 'libmpdclient' 'yajl' 'opus' 'libbluray' 'libgme' 'icu' 'libupnp' 'libnfs' 'x264') makedepends=('boost' 'doxygen') source=("http://www.musicpd.org/download/mpd/stable/${pkgname}-${pkgver}.tar.xz" 'tmpfiles.d' 'mpd.conf') backup=('etc/mpd.conf') install=install sha256sums=('bc856cda4136403446d53d11576f86990b61d1fe4668f6008e9eae47450d4e1d' 'c1683ba35774c85e16c70e89f7e2ed1c09619512b1a273daabbd5e34d40439bd' 'f40f68205834ca53cea3372e930bfe6c2f9ecc9df3b1605df2fec63a658b2e03') build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --enable-libmpdclient \ --enable-jack \ --enable-soundcloud \ --enable-pipe-output \ --enable-pulse \ --disable-sidplay \ --with-systemdsystemunitdir=/usr/lib/systemd/system make } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install install -d -g 45 -o 45 "${pkgdir}"/var/lib/mpd/playlists install -Dm644 ../mpd.conf "${pkgdir}"/etc/mpd.conf install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/mpd.conf install -Dm644 "${pkgdir}"/usr/lib/systemd/{system,user}/mpd.service sed '/\[Service\]/a User=mpd' -i "${pkgdir}"/usr/lib/systemd/system/mpd.service sed '/WantedBy=/c WantedBy=default.target' -i "${pkgdir}"/usr/lib/systemd/{system,user}/mpd.service }