diff options
author | Alan Hicks <alan@lizella.net> | 2010-05-11 20:02:05 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 20:02:05 +0200 |
commit | 96025eb035a7f510c30a01b923d644ae56479bc7 (patch) | |
tree | 376901f451d6f51611d7a543228323f817812bd1 /system/pommed | |
parent | 371a877069a62cab6ea2aabab8a22d3fea0a2b3a (diff) |
system/pommed: Added to 12.0 repository
Diffstat (limited to 'system/pommed')
-rw-r--r-- | system/pommed/README | 24 | ||||
-rw-r--r-- | system/pommed/doinst.sh | 25 | ||||
-rw-r--r-- | system/pommed/pommed.SlackBuild | 75 | ||||
-rw-r--r-- | system/pommed/pommed.info | 8 | ||||
-rw-r--r-- | system/pommed/rc.pommed | 32 | ||||
-rw-r--r-- | system/pommed/slack-desc | 12 |
6 files changed, 176 insertions, 0 deletions
diff --git a/system/pommed/README b/system/pommed/README new file mode 100644 index 0000000000000..81021a1760251 --- /dev/null +++ b/system/pommed/README @@ -0,0 +1,24 @@ +pommed enables the use of the brightness and volume keys on Apple +laptops including the MacBook and MacBook Pro (the only Apple laptops +that Slackware currently runs on) and is likely of little or not use to +others. pommed requires libsmbios and libconfuse, both of which can be +found at SlackBuilds.org. + +This package installs an rc.pommed script that should be called from +rc.local (and optionally rc.local_shutdown) like so: + + In rc.local: + # Start pommed + if [ -x /etc/rc.d/rc.pommed ]; then + /etc/rc.d/rc.pommed start + fi + + In rc.local_shutdown: + # Stop pommed + if [ -x /etc/rc.d/rc.pommed ]; then + /etc/rc.d/rc.pommed stop + fi + +It is also necessary to restart dbus after installing this package, either by +a reboot or a quick restart of just the service: + /etc/rc.d/rc.messagebus restart diff --git a/system/pommed/doinst.sh b/system/pommed/doinst.sh new file mode 100644 index 0000000000000..ee1cdba8d911f --- /dev/null +++ b/system/pommed/doinst.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.pommed.new: +if [ -e etc/rc.d/rc.pommed ]; then + cp -a etc/rc.d/rc.pommed etc/rc.d/rc.pommed.new.incoming + cat etc/rc.d/rc.pommed.new > etc/rc.d/rc.pommed.new.incoming + mv etc/rc.d/rc.pommed.new.incoming etc/rc.d/rc.pommed.new +fi + +config etc/rc.d/rc.pommed.new +config etc/pommed.conf.new +config etc/dbus-1/system.d/pommed.conf.new + diff --git a/system/pommed/pommed.SlackBuild b/system/pommed/pommed.SlackBuild new file mode 100644 index 0000000000000..1806567e950f7 --- /dev/null +++ b/system/pommed/pommed.SlackBuild @@ -0,0 +1,75 @@ +#!/bin/sh + +# Slackware build script for pommed + +# Copyright 2007 Alan Hicks (alan@lizella.net) +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=pommed +VERSION=1.9 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-2} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=${TMP}/package-${PRGNAM} +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +make pommed + +# The Makefile doesn't have an "install" option, +# so we have to do this the hard way. +strip --strip-unneeded pommed/pommed 2>/dev/null || true +install -D -m 0755 pommed/pommed $PKG/usr/sbin/pommed +install -D -m 0644 pommed.1 $PKG/usr/man/man1/pommed.1 +install -D -m 0755 $CWD/rc.pommed $PKG/etc/rc.d/rc.pommed.new +install -D -m 0644 pommed.conf.mactel $PKG/etc/pommed.conf.new +install -D -m 0644 dbus-policy.conf $PKG/etc/dbus-1/system.d/pommed.conf.new + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog INSTALL README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +mkdir $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +# Make sure everything is owned by root and then build the package +chown -R root:root $PKG +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/system/pommed/pommed.info b/system/pommed/pommed.info new file mode 100644 index 0000000000000..4c77755469d25 --- /dev/null +++ b/system/pommed/pommed.info @@ -0,0 +1,8 @@ +PRGNAM="pommed" +VERSION="1.9" +HOMEPAGE="http://technologeek.org/projects/pommed/" +DOWNLOAD="http://alioth.debian.org/frs/download.php/2140/pommed-1.9.tar.gz" +MD5SUM="750f51a9b40f6d3c5a8b303fb56b416c" +MAINTAINER="Alan Hicks" +EMAIL="alan@lizella.net" +APPROVED="rworkman" diff --git a/system/pommed/rc.pommed b/system/pommed/rc.pommed new file mode 100644 index 0000000000000..def1086f30d5b --- /dev/null +++ b/system/pommed/rc.pommed @@ -0,0 +1,32 @@ +#!/bin/sh + +# Start/stop/restart the pommed service: + +pommed_start() { + /usr/sbin/pommed +} + +pommed_stop() { + killall pommed +} + +pommed_restart() { + pommed_stop + sleep 1 + pommed_start +} + +case "$1" in +'start') + pommed_start + ;; +'stop') + pommed_stop + ;; +'restart') + pommed_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac + diff --git a/system/pommed/slack-desc b/system/pommed/slack-desc new file mode 100644 index 0000000000000..6e83a899dbd41 --- /dev/null +++ b/system/pommed/slack-desc @@ -0,0 +1,12 @@ + |--------handy-ruler---------------------------------------------------| +pommed: pommed (handles the hotkeys found on some Apple laptops) +pommed: +pommed: pommed handles the hotkeys found on the Apple MacBook Pro, MacBook, +pommed: and PowerBook laptops and adjusts the LCD backlight, sound volume, +pommed: keyboard backlight, or ejects the CD-ROM drive accordingly. +pommed: pommed also monitors the ambient light sensors to automatically light +pommed: up the keyboard backlight on the MacBook Pro and the latest PowerBook. +pommed: +pommed: Optional support for the Apple Remote control is available. +pommed: +pommed: |