summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Warner <pc_warner@yahoo.com>2010-12-13 19:30:58 -0200
committerErik Hanson <erik@slackbuilds.org>2010-12-17 07:56:46 -0600
commitfc74e6371c2cc7f80104e05c98d64e9cb2c8316b (patch)
tree52e43c07416ff21f9f4ba17083b5db53a528b192
parent445b34cf3647da628347b15ea8b1bddbc22866c7 (diff)
downloadslackbuilds-fc74e6371c2cc7f80104e05c98d64e9cb2c8316b.tar.gz
audio/pianobar: Updated for version 2010.11.06.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
-rw-r--r--audio/pianobar/README7
-rw-r--r--audio/pianobar/pianobar.SlackBuild20
-rw-r--r--audio/pianobar/pianobar.info8
-rw-r--r--audio/pianobar/pianobarctl71
-rw-r--r--audio/pianobar/slack-desc2
5 files changed, 97 insertions, 11 deletions
diff --git a/audio/pianobar/README b/audio/pianobar/README
index 49a895b1cd..d8f34e1b16 100644
--- a/audio/pianobar/README
+++ b/audio/pianobar/README
@@ -7,3 +7,10 @@ pianobar is a console client for the personalized web radio pandora
- configure keybindings
- last.fm scrobbling support (external application)
- proxy support for listeners outside the USA
+
+Included with this SlackBuild is a helper script called pianobarctl that
+allows the user to remotely control some pianobar functions. To use
+this a FIFO must first be created by the user:
+ mkfifo ~/.config/pianobar/ctl
+
+Please see man pianobar and pianobarctl --help for more information.
diff --git a/audio/pianobar/pianobar.SlackBuild b/audio/pianobar/pianobar.SlackBuild
index a45fd9b547..6f284d1a72 100644
--- a/audio/pianobar/pianobar.SlackBuild
+++ b/audio/pianobar/pianobar.SlackBuild
@@ -4,16 +4,14 @@
# Written by Phillip Warner <pc_warner@yahoo.com>
PRGNAM=pianobar
-VERSION=${VERSION:-2010.10.07}
+VERSION=${VERSION:-2010.11.06}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -52,11 +50,17 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Make sure the CFLAGS is respected
+sed -i "s/CFLAGS:=/CFLAGS+=/" Makefile
+
CFLAGS="$SLKCFLAGS" \
force_arch="$ARCH" \
-make DISABLE_FAAD=1
+gmake DISABLE_FAAD=1
+
+gmake install DESTDIR=$PKG PREFIX="/usr" MANDIR="/usr/man"
-make install DESTDIR=$PKG PREFIX="/usr" MANDIR="/usr/man"
+# Install helper script
+install -m 0755 $CWD/pianobarctl $PKG/usr/bin/pianobarctl
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -64,7 +68,11 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING README ChangeLog $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING README ChangeLog contrib/config-example \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/example-scripts
+cp contrib/*.{sh,rb} $PKG/usr/doc/$PRGNAM-$VERSION/example-scripts
+chmod -x $PKG/usr/doc/$PRGNAM-$VERSION/example-scripts/*
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/audio/pianobar/pianobar.info b/audio/pianobar/pianobar.info
index 7b70354cdc..002bd48aaf 100644
--- a/audio/pianobar/pianobar.info
+++ b/audio/pianobar/pianobar.info
@@ -1,10 +1,10 @@
PRGNAM="pianobar"
-VERSION="2010.10.07"
+VERSION="2010.11.06"
HOMEPAGE="http://6xq.net/html/00/17.html"
-DOWNLOAD="http://6xq.net/media/00/16/pianobar-2010.10.07.tar.bz2"
-MD5SUM="826c2dadeadd7e2ae341914273a5183d"
+DOWNLOAD="http://6xq.net/media/00/16/pianobar-2010.11.06.tar.bz2"
+MD5SUM="9b2ed2828e5b90d40bfda235f350fc65"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Phillip Warner"
EMAIL="pc_warner@yahoo.com"
-APPROVED="dsomero"
+APPROVED="dsomero,Niels Horn"
diff --git a/audio/pianobar/pianobarctl b/audio/pianobar/pianobarctl
new file mode 100644
index 0000000000..ccc99d07a5
--- /dev/null
+++ b/audio/pianobar/pianobarctl
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# pianobarctl
+# This script uses a specified named pipe (FIFO) to control pianobar.
+# Written by Phillip Warner
+
+VERSION=0.1
+
+# This is the FIFO that is used to control pianobar
+# It must exist before running pianobar in order for remote control to work
+PIANOBARCTL=~/.config/pianobar/ctl
+
+# Control Functions
+NEXT="n"
+PLAYPAUSE="p"
+LOVE="+"
+BAN="-"
+
+set -e
+
+usage() {
+ echo "$(basename $0) $VERSION - by Phillip Warner"
+ echo "Usage:"
+ echo " $0 [OPTION]"
+ echo "Only one parameter can be used at a time."
+ echo "The script's parameters are:"
+ echo " -h, --help Help"
+ echo " -n, --next Play Next"
+ echo " -p, --pause Play / Pause"
+ echo " -x, --play Play / Pause"
+ echo " -l, --love Love Song"
+ echo " -b, --ban Ban Song"
+ echo
+ echo "Current pianobar PIDs (euid=$(id -u)):"
+ pgrep -u $(id -u) pianobar$
+}
+
+# Make sure the FIFO exists
+if ! [ -p $PIANOBARCTL ]
+then
+ echo "ERROR. FIFO $PIANOBARCTL does not exist. Try running mkfifo $PIANOBARCTL and then restarting pianobar first. Aborting..."
+ exit 1
+fi
+
+# Make sure pianobar is running and that there is no more than one arg
+if ! (pgrep -u $(id -u) pianobar$ &> /dev/null) || [ $2 ]
+then
+ usage
+elif [ $1 ]
+then
+ case $1 in
+ -h|--help ) usage
+ ;;
+ -n|--next ) echo -n $NEXT > $PIANOBARCTL
+ ;;
+ -p|--pause ) echo -n $PLAYPAUSE > $PIANOBARCTL
+ ;;
+ -x|--play ) echo -n $PLAYPAUSE > $PIANOBARCTL
+ ;;
+ -l|--love ) echo -n $LOVE > $PIANOBARCTL
+ ;;
+ -b|--ban ) echo -n $BAN > $PIANOBARCTL
+ ;;
+ * ) usage
+ ;;
+ esac
+else
+ usage
+fi
+
+exit
diff --git a/audio/pianobar/slack-desc b/audio/pianobar/slack-desc
index 3d9f8a5c15..513ecefbf0 100644
--- a/audio/pianobar/slack-desc
+++ b/audio/pianobar/slack-desc
@@ -5,7 +5,7 @@
# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
+ |-----handy-ruler------------------------------------------------------|
pianobar: pianobar (console Pandora client)
pianobar:
pianobar: pianobar is a console client for the personalized web radio pandora