summaryrefslogtreecommitdiff
path: root/testing/mpd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-06 23:15:07 +0000
committerroot <root@rshg054.dnsready.net>2011-11-06 23:15:07 +0000
commita4d309341dbcd3c28ee68e818c1d5ef54114adf8 (patch)
treed8b088a03f5cb2b56b2b7508933b4efcfd67f0b2 /testing/mpd
parent82fd7f658509afe9737e14e8d1ee9fefe13c9d1f (diff)
Sun Nov 6 23:15:07 UTC 2011
Diffstat (limited to 'testing/mpd')
-rw-r--r--testing/mpd/ChangeLog9
-rw-r--r--testing/mpd/PKGBUILD61
-rwxr-xr-xtesting/mpd/mpd36
-rw-r--r--testing/mpd/mpd.install18
4 files changed, 124 insertions, 0 deletions
diff --git a/testing/mpd/ChangeLog b/testing/mpd/ChangeLog
new file mode 100644
index 000000000..40ba5e4e7
--- /dev/null
+++ b/testing/mpd/ChangeLog
@@ -0,0 +1,9 @@
+2011-09-03 Angel Velasquez <angvp@archlinux.org>
+ * Version bump to 0.16.4
+ * Removed the patch mpd-0.16.3_ffmpeg_sigsegv.patch since is included upstream
+
+2011-06-25 Angel Velasquez <angvp@archlinux.org>
+ * Added a patch for bug with ffmpeg FS#24839
+
+
+# vim: set ft=changelog ts=4 sw=4 et:
diff --git a/testing/mpd/PKGBUILD b/testing/mpd/PKGBUILD
new file mode 100644
index 000000000..5621f15db
--- /dev/null
+++ b/testing/mpd/PKGBUILD
@@ -0,0 +1,61 @@
+# $Id: PKGBUILD 142157 2011-11-05 11:38:08Z ibiru $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
+# Contributor: Ben <ben@benmazer.net>
+
+pkgname=mpd
+pkgver=0.16.5
+pkgrel=2
+pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://mpd.wikia.com/wiki/Server"
+depends=('libao' 'ffmpeg' 'libmodplug' 'audiofile' 'libshout' 'libmad' 'curl' 'faad2'
+ 'sqlite3' 'jack' 'libmms' 'wavpack' 'libmpcdec' 'avahi' 'libid3tag'
+ 'libpulse')
+makedepends=('pkgconfig' 'doxygen')
+install=${pkgname}.install
+changelog=ChangeLog
+source=("http://downloads.sourceforge.net/musicpd/$pkgname-$pkgver.tar.bz2"
+'mpd')
+md5sums=('f7564cff12035f6a1112cce770655df7'
+ 'e5669c2bff4031928531e52475addeb1')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --enable-lastfm \
+ --enable-jack \
+ --enable-pulse \
+ --enable-documentation \
+ --disable-libwrap \
+ --disable-cue \
+ --disable-sidplay \
+ --with-systemdsystemunitdir=/lib/systemd/system
+
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ # set our dirs in mpd.conf file
+ sed -i 's|^music_directory.*$|#music_directory "path_to_your_music_collection"|1' doc/mpdconf.example
+ sed -i 's|playlist_directory.*$|playlist_directory "/var/lib/mpd/playlists"|1' doc/mpdconf.example
+ sed -i 's|db_file.*$|db_file "/var/lib/mpd/mpd.db"|1' doc/mpdconf.example
+ sed -i 's|log_file.*$|log_file "/var/log/mpd/mpd.log"|1' doc/mpdconf.example
+ sed -i 's|error_file.*$|error_file "/var/log/mpd/mpd.error"|1' doc/mpdconf.example
+ sed -i 's|#pid_file.*$|pid_file "/var/run/mpd/mpd.pid"|1' doc/mpdconf.example
+ sed -i 's|#state_file.*$|state_file "/var/lib/mpd/mpdstate"|1' doc/mpdconf.example
+ sed -i 's|#user.*$|user "mpd"|1' doc/mpdconf.example
+
+ install -Dm644 "doc/mpdconf.example" "$pkgdir/usr/share/mpd/mpd.conf.example"
+
+ install -Dm755 "$srcdir/mpd" "$pkgdir/etc/rc.d/mpd"
+ install -d "$pkgdir"/var/{lib/mpd/playlists,log/mpd}
+}
diff --git a/testing/mpd/mpd b/testing/mpd/mpd
new file mode 100755
index 000000000..6134e2ed4
--- /dev/null
+++ b/testing/mpd/mpd
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting Music Player Daemon"
+ [ ! -d /var/run/mpd ] && install -d -g 45 -o 45 /var/run/mpd
+ /usr/bin/mpd /etc/mpd.conf &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon mpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Music Player Daemon"
+ /usr/bin/mpd --kill /etc/mpd.conf &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon mpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/mpd/mpd.install b/testing/mpd/mpd.install
new file mode 100644
index 000000000..885505a07
--- /dev/null
+++ b/testing/mpd/mpd.install
@@ -0,0 +1,18 @@
+post_install() {
+ post_upgrade
+ echo "==> Create a configuration file /etc/mpd.conf before using MPD (example: /usr/share/mpd/mpd.conf.example)"
+}
+
+post_upgrade() {
+ getent group "mpd" &>/dev/null || groupadd -r -g 45 mpd 1>/dev/null
+ getent passwd "mpd" &>/dev/null || useradd -r -u 45 -g mpd -d "/var/lib/mpd" -s "/bin/true" -G "audio" mpd 1>/dev/null
+ for dir in /var/{lib,log}/mpd; do
+ chown -R mpd:mpd "$dir" 1>/dev/null
+ done
+}
+
+post_remove() {
+ getent passwd "mpd" &>/dev/null && userdel mpd 1>/dev/null
+ getent group "mpd" &>/dev/null && groupdel mpd 1>/dev/null
+ [ -f etc/mpd.conf ] && mv etc/mpd.conf etc/mpd.conf.pacsave 1>/dev/null
+}