summaryrefslogtreecommitdiff
path: root/community/mpdscribble
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/mpdscribble
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/mpdscribble')
-rw-r--r--community/mpdscribble/PKGBUILD45
-rw-r--r--community/mpdscribble/mpdscribble37
-rw-r--r--community/mpdscribble/mpdscribble.install17
3 files changed, 99 insertions, 0 deletions
diff --git a/community/mpdscribble/PKGBUILD b/community/mpdscribble/PKGBUILD
new file mode 100644
index 000000000..254c0ac05
--- /dev/null
+++ b/community/mpdscribble/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Thomas Dziedzic < gostrc at gmail >
+# Contributor: evr <evanroman at gmail>
+# Contributor: Luiz Ribeiro <luizribeiro@gmail.com>
+
+pkgname=mpdscribble
+pkgver=0.21
+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')
+license=('GPL')
+depends=('libsoup' 'glib2' 'libmpdclient')
+install="${pkgname}.install"
+source=("http://downloads.sourceforge.net/musicpd/mpdscribble-${pkgver}.tar.bz2"
+ 'mpdscribble')
+md5sums=('3dc96f9179b8d7efd02cbbceb345e529'
+ 'f54c937c7b3ab8e4d39e4b903c2993fc')
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-http-client=soup
+
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ install -D ${srcdir}/mpdscribble \
+ ${pkgdir}/etc/rc.d/mpdscribble
+
+ # default config is really an example
+ install -m644 ${pkgdir}/etc/mpdscribble.conf \
+ ${pkgdir}/etc/mpdscribble.conf.example
+ rm -f ${pkgdir}/etc/mpdscribble.conf
+
+ install -d ${pkgdir}/var/cache/mpdscribble
+ touch ${pkgdir}/var/cache/mpdscribble/mpdscribble.cache
+}
diff --git a/community/mpdscribble/mpdscribble b/community/mpdscribble/mpdscribble
new file mode 100644
index 000000000..8071c0dbe
--- /dev/null
+++ b/community/mpdscribble/mpdscribble
@@ -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/mpdscribble.install b/community/mpdscribble/mpdscribble.install
new file mode 100644
index 000000000..3447b50d6
--- /dev/null
+++ b/community/mpdscribble/mpdscribble.install
@@ -0,0 +1,17 @@
+post_install() {
+ echo 'An example config is provided in /etc/mpdscribble.conf.example'
+ echo
+ echo 'For system-wide config copy this file to /etc/mpdscribble.conf'
+ echo 'For per-user config copy this file to ~/.mpdscribble/mpdscribble.conf'
+}
+
+pre_upgrade() {
+ # removed /etc/mpdscribble.conf on FEB 19 2011
+ if [ -f /etc/mpdscribble.conf ]; then
+ cp /etc/mpdscribble.conf /etc/mpdscribble.conf.oldbackup
+ echo 'The package does not provide /etc/mpdscribble.conf anymore.'
+ echo 'Copied /etc/mpdscribble.conf to /etc/mpdscribble.conf.oldbackup'
+ echo
+ echo 'The example file is now located at /etc/mpdscribble.conf.example'
+ fi
+}