From 7a65a910b77ad191d69881098c47f9b0c852d92e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Aug 2013 01:33:19 -0700 Subject: Tue Aug 13 01:31:08 PDT 2013 --- community/mpdscribble/PKGBUILD | 47 +++++++++++++++++++++++++++++++ community/mpdscribble/mpdscribble.install | 22 +++++++++++++++ community/mpdscribble/service | 9 ++++++ 3 files changed, 78 insertions(+) create mode 100644 community/mpdscribble/PKGBUILD create mode 100644 community/mpdscribble/mpdscribble.install create mode 100644 community/mpdscribble/service (limited to 'community/mpdscribble') 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 +# Contributor: Thomas Dziedzic < gostrc at gmail > +# Contributor: evr +# Contributor: Luiz Ribeiro + +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 -- cgit v1.2.3-54-g00ecf