summaryrefslogtreecommitdiff
path: root/community/mpdscribble
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
committerroot <root@rshg054.dnsready.net>2013-07-19 01:10:32 -0700
commit8fbc0076a4827ddc6af92e0b9daa4c4c31450808 (patch)
tree03fd0e2921ebd53228d9a93e32ed3976b636cbea /community/mpdscribble
parente445a313723389ba9ee1fded025c567dae5b21ea (diff)
Fri Jul 19 01:09:18 PDT 2013
Diffstat (limited to 'community/mpdscribble')
-rw-r--r--community/mpdscribble/PKGBUILD47
-rw-r--r--community/mpdscribble/mpdscribble.install22
-rw-r--r--community/mpdscribble/service9
3 files changed, 78 insertions, 0 deletions
diff --git a/community/mpdscribble/PKGBUILD b/community/mpdscribble/PKGBUILD
new file mode 100644
index 000000000..f7198378c
--- /dev/null
+++ b/community/mpdscribble/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 82753 2013-01-23 20:52:45Z bpiotrowski $
+# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowwski.pl>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: evr <evanroman at gmail>
+# Contributor: Luiz Ribeiro <luizribeiro@gmail.com>
+
+pkgname=mpdscribble
+pkgver=0.22
+pkgrel=6
+pkgdesc='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
+ service)
+sha256sums=('1cde2b5f8c70f0e3e6f059d01bf0b0f2eac2b29fbcd14b01a8a5103e603feb41'
+ '8a6568235e8b2ac7535a6f99f4401450a4162bac0cacb938af2ec39a808e1132')
+
+build() {
+ cd mpdscribble-$pkgver
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-http-client=soup
+
+ make
+}
+
+package() {
+ cd mpdscribble-$pkgver
+
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm644 "${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
+ 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.install b/community/mpdscribble/mpdscribble.install
new file mode 100644
index 000000000..e7038d5d8
--- /dev/null
+++ b/community/mpdscribble/mpdscribble.install
@@ -0,0 +1,22 @@
+post_install() {
+ echo 'An example config is provided in /usr/share/mpdscribble/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'
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+pre_upgrade() {
+ # removed /etc/mpdscribble.conf on FEB 19 2011
+ # only display warning for people with mpdscribble older then 0.21
+ if (( "$(vercmp 0.21-1 $2)" > 0 )) && [[ -f /etc/mpdscribble.conf ]]
+ then
+ echo "$1 is new $2 is old"
+ 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
+}
diff --git a/community/mpdscribble/service b/community/mpdscribble/service
new file mode 100644
index 000000000..25f64d7d5
--- /dev/null
+++ b/community/mpdscribble/service
@@ -0,0 +1,9 @@
+[Unit]
+Description=last.fm updater for MPD
+After=mpd.service
+
+[Service]
+ExecStart=/usr/bin/mpdscribble --no-daemon
+
+[Install]
+WantedBy=multi-user.target