diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-08-04 10:41:31 +0200 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-08-04 10:41:31 +0200 |
commit | b796bed39624486a348d1cb2881c5a1e88f84954 (patch) | |
tree | 74f89104c89a9440733cc08bfde1c17efe2bd3db /community/mpdscribble | |
parent | 589a2311981a3552f48d4c9001be0cb5a06563a9 (diff) | |
parent | f8ac5d4703080cc87ba2fe36f68df745d3a5f62f (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community-testing/kphotoalbum/PKGBUILD
community-testing/libextractor/PKGBUILD
community/mplayer2/PKGBUILD
community/preload/PKGBUILD
community/python2-pymongo/PKGBUILD
extra/virtuoso/PKGBUILD
testing/calligra/PKGBUILD
testing/hugin/PKGBUILD
testing/kdebase-runtime/PKGBUILD
testing/kdegraphics-gwenview/PKGBUILD
testing/kdepim-runtime/PKGBUILD
testing/libkexiv2/PKGBUILD
Diffstat (limited to 'community/mpdscribble')
-rw-r--r-- | community/mpdscribble/PKGBUILD | 15 | ||||
-rw-r--r-- | community/mpdscribble/rc.d | 37 | ||||
-rw-r--r-- | community/mpdscribble/service | 12 |
3 files changed, 59 insertions, 5 deletions
diff --git a/community/mpdscribble/PKGBUILD b/community/mpdscribble/PKGBUILD index dff74e354..d92c936a3 100644 --- a/community/mpdscribble/PKGBUILD +++ b/community/mpdscribble/PKGBUILD @@ -1,3 +1,4 @@ +# $Id: PKGBUILD 74713 2012-08-02 09:37:39Z bpiotrowski $ # Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowwski.pl> # Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: evr <evanroman at gmail> @@ -5,17 +6,18 @@ pkgname=mpdscribble pkgver=0.22 -pkgrel=3 +pkgrel=4 pkgdesc='An mpd client which submits track info to last.fm' url='http://mpd.wikia.com/wiki/Client:Mpdscribble' arch=('i686' 'x86_64' 'mips64el') license=('GPL') depends=('libsoup' 'glib2' 'libmpdclient') install='mpdscribble.install' -source=("http://downloads.sourceforge.net/musicpd/mpdscribble-${pkgver}.tar.bz2" - 'mpdscribble') +source=(http://downloads.sourceforge.net/musicpd/mpdscribble-${pkgver}.tar.bz2 + rc.d service) md5sums=('652ee927b797e9a4cef45494e77047db' - 'f54c937c7b3ab8e4d39e4b903c2993fc') + 'f54c937c7b3ab8e4d39e4b903c2993fc' + '7e0a80c12225b0fe7be9c993f0079e95') build() { cd mpdscribble-${pkgver} @@ -33,9 +35,12 @@ package() { make DESTDIR="${pkgdir}" install - install -D "${srcdir}"/mpdscribble \ + install -D "${srcdir}"/rc.d \ "${pkgdir}"/etc/rc.d/mpdscribble + install -D "${srcdir}"/service \ + "${pkgdir}"/usr/lib/systemd/system/mpdscribble.service + # default config is really an example install -D -m644 "${pkgdir}"/etc/mpdscribble.conf \ "${pkgdir}"/usr/share/mpdscribble/mpdscribble.conf.example diff --git a/community/mpdscribble/rc.d b/community/mpdscribble/rc.d new file mode 100644 index 000000000..8071c0dbe --- /dev/null +++ b/community/mpdscribble/rc.d @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/bin/mpdscribble` +case "$1" in + start) + stat_busy "Starting mpdscribble" + [ -z "$PID" ] && /usr/bin/mpdscribble & + if [ $? -gt 0 ]; then + stat_fail + else + echo $PID > /var/run/mpdscribble.pid + add_daemon mpdscribble + stat_done + fi + ;; + stop) + stat_busy "Stopping mpdscribble" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm /var/run/mpdscribble.pid + rm_daemon mpdscribble + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac diff --git a/community/mpdscribble/service b/community/mpdscribble/service new file mode 100644 index 000000000..1475866ce --- /dev/null +++ b/community/mpdscribble/service @@ -0,0 +1,12 @@ +[Unit] +Description=last.fm updater for MPD +Wants=mpd.service +After=mpd.service + +[Service] +Type=forking +PIDFile=/run/mpdscribble.pid +ExecStart=/usr/bin/mpdscribble --pidfile /run/mpdscribble.pid + +[Install] +WantedBy=multi-user.target |