aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-10-25 08:07:56 +0000
committerLeonardo Arena <rnalrd@gmail.com>2010-10-25 08:07:56 +0000
commit408c2aa7f4108e1b9ede47cebf182f3597290db8 (patch)
treec998b36842f360c8fa0fe95926432a20e76946d4 /testing
parent337c08c5e57c1cccc7ed2bf1f793f34c5468032f (diff)
downloadaports-408c2aa7f4108e1b9ede47cebf182f3597290db8.tar.bz2
aports-408c2aa7f4108e1b9ede47cebf182f3597290db8.tar.xz
testing/mpd: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/mpd/0.15.1-mpdconf.patch74
-rw-r--r--testing/mpd/APKBUILD47
-rw-r--r--testing/mpd/mpd.initd32
3 files changed, 153 insertions, 0 deletions
diff --git a/testing/mpd/0.15.1-mpdconf.patch b/testing/mpd/0.15.1-mpdconf.patch
new file mode 100644
index 0000000000..3a71af927e
--- /dev/null
+++ b/testing/mpd/0.15.1-mpdconf.patch
@@ -0,0 +1,74 @@
+diff -ur mpd-0.15.1.orig/doc/mpdconf.example mpd-0.15.1/doc/mpdconf.example
+--- mpd-0.15.1.orig/doc/mpdconf.example 2009-07-15 23:34:47.000000000 +0300
++++ mpd-0.15.1/doc/mpdconf.example 2009-07-22 15:21:28.000000000 +0300
+@@ -10,14 +10,14 @@
+ # be disabled and audio files will only be accepted over ipc socket (using
+ # file:// protocol) or streaming files over an accepted protocol.
+ #
+-#music_directory "~/music"
++music_directory "/var/lib/mpd/music"
+ #
+ # This setting sets the MPD internal playlist directory. The purpose of this
+ # directory is storage for playlists created by MPD. The server will use
+ # playlist files not created by the server but only if they are in the MPD
+ # format. This setting defaults to playlist saving being disabled.
+ #
+-#playlist_directory "~/.mpd/playlists"
++playlist_directory "/var/lib/mpd/playlists"
+ #
+ # This setting sets the location of the MPD database. This file is used to
+ # load the database at server start up and store the database while the
+@@ -25,7 +25,7 @@
+ # MPD to accept files over ipc socket (using file:// protocol) or streaming
+ # files over an accepted protocol.
+ #
+-#db_file "~/.mpd/database"
++db_file "/var/lib/mpd/database"
+ #
+ # These settings are the locations for the daemon log files for the daemon.
+ # These logs are great for troubleshooting, depending on your log_level
+@@ -34,20 +34,20 @@
+ # The special value "syslog" makes MPD use the local syslog daemon. This
+ # setting defaults to logging to syslog, otherwise logging is disabled.
+ #
+-#log_file "~/.mpd/log"
++log_file "/var/log/mpd/mpd.log"
+ #
+ # This setting sets the location of the file which stores the process ID
+ # for use of mpd --kill and some init scripts. This setting is disabled by
+ # default and the pid file will not be stored.
+ #
+-#pid_file "~/.mpd/pid"
++pid_file "/var/run/mpd/mpd.pid"
+ #
+ # This setting sets the location of the file which contains information about
+ # most variables to get MPD back into the same general shape it was in before
+ # it was brought down. This setting is disabled by default and the server
+ # state will be reset on server start up.
+ #
+-#state_file "~/.mpd/state"
++state_file "/var/lib/mpd/state"
+ #
+ ###############################################################################
+
+@@ -59,17 +59,17 @@
+ # initialization. This setting is disabled by default and MPD is run as the
+ # current user.
+ #
+-#user "nobody"
++user "mpd"
+ #
+ # This setting sets the address for the daemon to listen on. Careful attention
+ # should be paid if this is assigned to anything other then the default, any.
+ # This setting can deny access to control of the daemon.
+ #
+ # For network
+-#bind_to_address "any"
++bind_to_address "localhost"
+ #
+ # And for Unix Socket
+-#bind_to_address "~/.mpd/socket"
++bind_to_address "/var/lib/mpd/socket"
+ #
+ # This setting is the TCP port that is desired for the daemon to get assigned
+ # to.
diff --git a/testing/mpd/APKBUILD b/testing/mpd/APKBUILD
new file mode 100644
index 0000000000..d4893c317a
--- /dev/null
+++ b/testing/mpd/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Leonardo Arena <rnalrd@gmail.com>
+pkgname=mpd
+pkgver=0.15.13
+pkgrel=0
+pkgdesc="Music Player Daemon"
+url="http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki"
+license="GPL"
+depends=
+makedepends="alsa-lib-dev bzip2-dev curl-dev ffmpeg-dev flac-dev glib-dev
+ lame-dev libid3tag-dev libogg-dev libvorbis-dev"
+install=
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/project/musicpd/$pkgname/$pkgver/$pkgname-$pkgver.tar.bz2
+ mpd.initd
+ 0.15.1-mpdconf.patch"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ patch -p1 < ../0.15.1-mpdconf.patch || return 1
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-libOggFLACtest \
+ --enable-alsa \
+ --enable-bzip2 \
+ --enable-lame-encoder
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="d4b6fbc87541a37825c8f25e3ecd5283 mpd-0.15.13.tar.bz2
+56a6eacafe64bcf1ffb4d5eb8c99f67b mpd.initd
+356155576dc0ee8d3f40fdb17bc56e45 0.15.1-mpdconf.patch"
diff --git a/testing/mpd/mpd.initd b/testing/mpd/mpd.initd
new file mode 100644
index 0000000000..2a75f7d14d
--- /dev/null
+++ b/testing/mpd/mpd.initd
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd.init,v 1.1 2010/09/10 07:55:07 angelos Exp $
+
+depend() {
+ need localmount
+ use net netmount nfsmount alsa esound pulseaudio
+}
+
+checkconfig() {
+ if ! [ -f /etc/mpd.conf ]; then
+ eerror "Configuration file /etc/mpd.conf does not exist."
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting Music Player Daemon"
+ start-stop-daemon --start --quiet --background --exec /usr/bin/mpd --pidfile /var/run/mpd.pid --make-pidfile -- --no-daemon /etc/mpd.conf 2>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Music Player Daemon"
+ start-stop-daemon --stop --exec /usr/bin/mpd --pidfile /var/run/mpd.pid
+ eend $?
+}