diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-08-05 21:03:31 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-08-11 15:07:50 -0300 |
commit | 47730895e850f474bde94c3f684544d0baf11848 (patch) | |
tree | bcb6235ef0358610d3a869b6fcf1756025cc35d7 /community | |
parent | 4cae84bdb997e3e5d36bef2ffbec509ebf794268 (diff) | |
download | aports-47730895e850f474bde94c3f684544d0baf11848.tar.bz2 aports-47730895e850f474bde94c3f684544d0baf11848.tar.xz |
community/mpd: upgrade to 0.21.13
- make daemon run with supervise-daemon
Diffstat (limited to 'community')
-rw-r--r-- | community/mpd/APKBUILD | 12 | ||||
-rw-r--r-- | community/mpd/mpd.initd | 46 |
2 files changed, 17 insertions, 41 deletions
diff --git a/community/mpd/APKBUILD b/community/mpd/APKBUILD index d7a159c444..4a56e69329 100644 --- a/community/mpd/APKBUILD +++ b/community/mpd/APKBUILD @@ -4,7 +4,7 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org> pkgname=mpd -pkgver=0.21.12 +pkgver=0.21.13 case $pkgver in *.*.*) _branch=${pkgver%.*};; *.*) _branch=$pkgver;; @@ -19,7 +19,8 @@ license="GPL-2.0-or-later" makedepends="py3-sphinx 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 boost-dev icu-dev - libnfs-dev samba-dev opus-dev ffmpeg-dev meson libmpdclient-dev" + libnfs-dev samba-dev opus-dev ffmpeg-dev meson libmpdclient-dev + py3-attrs" checkdepends="gtest-dev gtest" install="$pkgname.pre-install" subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc" @@ -58,8 +59,7 @@ package() { # 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":' \ + sed -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 \ @@ -74,8 +74,8 @@ package() { "$pkgdir"/var/lib/mpd/music } -sha512sums="d35eb7162cfb50c10d57d1d4b035f6c4f7088fb930add97c2159c7b29ab9d7ed33a8b4d22640af78527387305b9f5d380c7c03b98cf957dc1519f772d842e7e3 mpd-0.21.12.tar.xz +sha512sums="626e658b4d53408be5419ce3a93a19005da5c5386119b241c1572eaaba96a628f941d5f46977de08e1de736eeab6cd6ba274d5df8f1df3e3f4b0df064a6ec43d mpd-0.21.13.tar.xz f60f6f3e921d20732c1a4c31a97f28660b43fd649e767d6c39661b6a90145231a79ad3f740ae0d706380b245ad040e98b661a513463c54cea161d1f64fc261e0 stacksize.patch 6cecfa7fd40cf92ac05f3bc22192e2a739dac37118ea65d05becf0f62a1b065ad4d391ebf10563952024965bc439f31804b6d7a9e964056b99a87c8574d656e5 py3-doc.patch -3725a528a45edf60e6a9ebd75c880aa63d0e71ab40c20dbc538af2d7c83ca657833b6853d9b488d635883fb7871bb76fada129b3bf8acff4bb060f98a5ad8774 mpd.initd +0ed45938052097497c98aec2678554747839a7e155884a57108322ead581453c10ce2ed4ffcf0e37a9e9ca9177432ecd7d59a5180c8910bfdd23470dc4a05ff7 mpd.initd 41b2467f5b03f5c4dd7003cd5f56f6cfc1f67af7a9aa2538d70360f839625222bdd0c4b04c33e8cd52eeecfc354da3ca22f5aaab8aee357a5774aaf3503594e7 mpd.confd" diff --git a/community/mpd/mpd.initd b/community/mpd/mpd.initd index c92bb982a6..8cb2c6aa17 100644 --- a/community/mpd/mpd.initd +++ b/community/mpd/mpd.initd @@ -2,9 +2,16 @@ # init.d file for music player daemon -NAME=mpd -DAEMON=/usr/bin/$NAME -CONF=/etc/mpd.conf +supervisor=supervise-daemon + +name="Music Player Daemon" +description="A daemon for playing music" + +commmand=/usr/bin/mpd +command_args="$MPD_OPTS" +command_args_foreground="--no-daemon" + +command_user="${M_USER:-mpd}:${M_GROUP:-audio}" depend() { need localmount @@ -12,37 +19,6 @@ depend() { after firewall } -checkconfig() { - [ -f "$CONF" ] && return 0 - eerror "configuration file $CONF is missing" - return 1 -} - -get_pidfile() { - pidfile=$(awk '$1 == "pid_file" { print $2 }' "$CONF" | sed 's/"//') - pidfile=${pidfile:-/var/run/mpd/$NAME.pid} -} - -start() { - checkconfig || return 1 - get_pidfile - checkpath --owner ${M_USER:-mpd}:${M_GROUP:-audio} \ - --directory ${pidfile%/*} - - ebegin "Starting ${NAME}" - start-stop-daemon --start --quiet \ - --exec ${DAEMON} -- ${MPD_OPTS} - eend $? -} - -stop() { - get_pidfile - ebegin "Stopping ${NAME}" - mpd --kill - eend $? -} - start_pre() { - checkpath --directory --owner ${M_USER:-mpd} \ - --mode 0775 /var/run/$NAME + checkpath --directory --owner "${M_USER:-mpd}" --mode 0775 /var/run/mpd } |