2014-12-18 08:01:42 +08:00
|
|
|
# Maintainer: Jeff Huang <s8321414[at]gmail[dot]com>
|
2014-04-13 18:32:51 +08:00
|
|
|
# Maintainer: UtG <utg[dot]chakra.linux[at]gmail[dot]com>
|
2013-12-14 00:51:55 +08:00
|
|
|
# Contributions from Arch: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/mpd
|
|
|
|
|
|
|
|
pkgname=mpd
|
2015-02-08 20:48:34 +08:00
|
|
|
pkgver=0.19.9
|
2013-12-14 00:51:55 +08:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc='Flexible, powerful, server-side application for playing music'
|
2014-12-03 08:01:57 +08:00
|
|
|
url='http://www.musicpd.org/'
|
2013-12-14 00:51:55 +08:00
|
|
|
license=('GPL')
|
|
|
|
arch=('x86_64')
|
|
|
|
depends=('audiofile' 'avahi' 'curl' 'faad2' 'ffmpeg' 'jack' 'libao' 'libid3tag' 'libmad' 'libmms' 'libmodplug'
|
2014-12-18 08:01:42 +08:00
|
|
|
'libpulse' 'libshout' 'sqlite3' 'wavpack' 'libmpdclient' 'yajl' 'opus' 'libbluray' 'libgme' 'icu' 'libupnp' 'libnfs' 'x264')
|
2014-12-03 08:01:57 +08:00
|
|
|
makedepends=('boost' 'doxygen')
|
2013-12-14 00:51:55 +08:00
|
|
|
source=("http://www.musicpd.org/download/mpd/stable/${pkgname}-${pkgver}.tar.xz"
|
|
|
|
'mpd.conf')
|
|
|
|
backup=('etc/mpd.conf')
|
|
|
|
install=install
|
2015-02-08 20:48:34 +08:00
|
|
|
sha1sums=('6683bee5f132eda318c5a61ec14b2df8d9164d60'
|
2014-04-13 18:32:51 +08:00
|
|
|
'f4d5922abb69abb739542d8e93f4dfd748acdad7')
|
2013-12-14 00:51:55 +08:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--enable-jack \
|
|
|
|
--enable-soundcloud \
|
|
|
|
--enable-pulse \
|
|
|
|
--enable-libmpdclient \
|
2014-12-03 08:01:57 +08:00
|
|
|
--enable-pipe-output \
|
2013-12-14 00:51:55 +08:00
|
|
|
--disable-sidplay \
|
|
|
|
--with-systemdsystemunitdir=/usr/lib/systemd/system
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
sed \
|
|
|
|
-e '/^#playlist_directory/c playlist_directory "/var/lib/mpd/playlists"' \
|
|
|
|
-e '/^#db_file/c db_file "/var/lib/mpd/mpd.db"' \
|
|
|
|
-e '/^#pid_file/c pid_file "/run/mpd/mpd.pid"' \
|
|
|
|
-e '/^#state_file/c state_file "/var/lib/mpd/mpdstate"' \
|
|
|
|
-e '/^#user/c user "mpd"' \
|
|
|
|
-i doc/mpdconf.example
|
|
|
|
install -d -g 45 -o 45 "${pkgdir}"/var/lib/mpd/playlists
|
|
|
|
install -Dm644 doc/mpdconf.example "${pkgdir}"/etc/mpd.conf
|
|
|
|
install -Dm644 ../mpd.conf "${pkgdir}"/usr/lib/tmpfiles.d/mpd.conf
|
2014-04-13 18:32:51 +08:00
|
|
|
|
2013-12-14 00:51:55 +08:00
|
|
|
install -d "${pkgdir}"/usr/lib/systemd/user
|
2014-04-13 18:32:51 +08:00
|
|
|
install -Dm644 "${pkgdir}"/usr/lib/systemd/{system,user}/mpd.service
|
2015-01-26 05:25:43 +08:00
|
|
|
sed '/\[Service\]/a User=mpd' -i "${pkgdir}"/usr/lib/systemd/system/mpd.service
|
2014-04-13 18:32:51 +08:00
|
|
|
sed '/WantedBy=/c WantedBy=default.target' -i "${pkgdir}"/usr/lib/systemd/user/mpd.service
|
2013-12-14 00:51:55 +08:00
|
|
|
|
|
|
|
}
|