aboutsummaryrefslogtreecommitdiff
path: root/system/pommed
diff options
context:
space:
mode:
authorAlan Hicks <alan@lizella.net>2010-05-13 00:41:25 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 00:41:25 +0200
commit07d0fb52720afaf343b9e0824527e3d970af13e3 (patch)
tree3548a423a4e6958872df66ed6a8bc127b2412966 /system/pommed
parent43a0944f0e0d7b377cb3c31ff173f0fed91f1c7b (diff)
system/pommed: Updated for version 1.26
Diffstat (limited to 'system/pommed')
-rw-r--r--system/pommed/README22
-rw-r--r--system/pommed/README.SLACKWARE20
-rw-r--r--system/pommed/doinst.sh14
-rw-r--r--system/pommed/patches/pommed-1.26-link_libpci_a.diff12
-rw-r--r--system/pommed/patches/pommed-1.26-use_custom_cflags.diff55
-rw-r--r--system/pommed/pommed.SlackBuild85
-rw-r--r--system/pommed/pommed.info12
-rw-r--r--system/pommed/rc.pommed3
-rw-r--r--system/pommed/slack-desc9
9 files changed, 184 insertions, 48 deletions
diff --git a/system/pommed/README b/system/pommed/README
index 81021a176025..02b152922418 100644
--- a/system/pommed/README
+++ b/system/pommed/README
@@ -1,24 +1,8 @@
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.
+others.
-This package installs an rc.pommed script that should be called from
-rc.local (and optionally rc.local_shutdown) like so:
+This requires libsmbios and confuse.
- 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
+See README.SLACKWARE for configuration information.
diff --git a/system/pommed/README.SLACKWARE b/system/pommed/README.SLACKWARE
new file mode 100644
index 000000000000..80a923e46b37
--- /dev/null
+++ b/system/pommed/README.SLACKWARE
@@ -0,0 +1,20 @@
+README.SLACKWARE for pommed
+
+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 reload the messagebus service:
+ /etc/rc.d/rc.messagebus reload
+
diff --git a/system/pommed/doinst.sh b/system/pommed/doinst.sh
index ee1cdba8d911..027fa22129f1 100644
--- a/system/pommed/doinst.sh
+++ b/system/pommed/doinst.sh
@@ -1,5 +1,3 @@
-#!/bin/sh
-
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
@@ -20,6 +18,16 @@ if [ -e etc/rc.d/rc.pommed ]; then
fi
config etc/rc.d/rc.pommed.new
-config etc/pommed.conf.new
config etc/dbus-1/system.d/pommed.conf.new
+config etc/pommed.conf.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/system/pommed/patches/pommed-1.26-link_libpci_a.diff b/system/pommed/patches/pommed-1.26-link_libpci_a.diff
new file mode 100644
index 000000000000..fe813f8299bf
--- /dev/null
+++ b/system/pommed/patches/pommed-1.26-link_libpci_a.diff
@@ -0,0 +1,12 @@
+diff -Nur pommed-1.26.orig/pommed/Makefile pommed-1.26/pommed/Makefile
+--- pommed-1.26.orig/pommed/Makefile 2009-03-14 08:13:17.000000000 -0500
++++ pommed-1.26/pommed/Makefile 2009-07-29 11:12:08.162491222 -0500
+@@ -53,7 +53,7 @@
+ CFLAGS += $(LIBPCI_CFLAGS)
+ LDFLAGS += $(LIBPCI_LIBS)
+ else
+- LIBS = /usr/lib/libpci.a
++ LIBS = /usr/lib64/libpci.a
+ LDFLAGS += -lz
+ endif
+
diff --git a/system/pommed/patches/pommed-1.26-use_custom_cflags.diff b/system/pommed/patches/pommed-1.26-use_custom_cflags.diff
new file mode 100644
index 000000000000..2473d41d6111
--- /dev/null
+++ b/system/pommed/patches/pommed-1.26-use_custom_cflags.diff
@@ -0,0 +1,55 @@
+diff -Nur pommed-1.26.orig/gpomme/Makefile pommed-1.26/gpomme/Makefile
+--- pommed-1.26.orig/gpomme/Makefile 2009-03-14 08:13:17.000000000 -0500
++++ pommed-1.26/gpomme/Makefile 2009-07-29 11:13:21.054859107 -0500
+@@ -1,4 +1,5 @@
+ CC = gcc
++OPT ?= -O2
+
+ GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
+ GTK_LIBS = $(shell pkg-config --libs gtk+-2.0)
+@@ -17,7 +18,7 @@
+
+ INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H)
+
+-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS)
++CFLAGS = -g $(OPT) -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS) $(INOTIFY_CFLAGS)
+ LDFLAGS = -lpthread $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS)
+
+ SOURCES = gpomme.c theme.c conffile.c \
+diff -Nur pommed-1.26.orig/pommed/Makefile pommed-1.26/pommed/Makefile
+--- pommed-1.26.orig/pommed/Makefile 2009-03-14 08:13:17.000000000 -0500
++++ pommed-1.26/pommed/Makefile 2009-07-29 11:13:34.453703569 -0500
+@@ -1,6 +1,7 @@
+ ARCH ?= $(shell uname -m)
+
+ CC = gcc
++OPT ?= -O2
+
+ DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE
+ DBUS_LIBS = $(shell pkg-config dbus-1 --libs)
+@@ -18,7 +19,7 @@
+
+ TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H)
+
+-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS)
++CFLAGS = -g $(OPT) -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS)
+
+ LDFLAGS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS)
+
+diff -Nur pommed-1.26.orig/wmpomme/Makefile pommed-1.26/wmpomme/Makefile
+--- pommed-1.26.orig/wmpomme/Makefile 2009-03-14 08:13:17.000000000 -0500
++++ pommed-1.26/wmpomme/Makefile 2009-07-29 11:13:46.671562196 -0500
+@@ -1,11 +1,12 @@
+ CC = gcc
++OPT ?= -O2
+
+ DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE
+ DBUS_LIBS = $(shell pkg-config dbus-1 --libs)
+
+ TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H)
+
+-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS)
++CFLAGS = -g $(OPT) -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS)
+ LDFLAGS = -lrt -lXpm -lXext -lX11 $(DBUS_LIBS)
+
+ SOURCES = wmgeneral.c wmpomme.c \
diff --git a/system/pommed/pommed.SlackBuild b/system/pommed/pommed.SlackBuild
index e6e58844abcd..1391f8307371 100644
--- a/system/pommed/pommed.SlackBuild
+++ b/system/pommed/pommed.SlackBuild
@@ -23,9 +23,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pommed
-VERSION=1.16
+VERSION=1.26
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -33,6 +33,17 @@ TMP=${TMP:-/tmp/SBo}
PKG=${TMP}/package-${PRGNAM}
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -e
rm -rf $PKG
@@ -44,32 +55,68 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-make pommed
+# Fix a bad assumption in the pommed Makefile
+# If pciutils is rebuilt to include the pkgconfig file, this can be omitted,
+# but at the time of this edit (20090729), it's not present in 13.0rc1
+sed "s%@LIBDIR@%/usr/lib${LIBDIRSUFFIX}%" \
+ $CWD/patches/pommed-1.26-link_libpci_a.diff | patch -p1
+
+# Use our CFLAGS instead of assuming -O2 only
+patch -p1 < $CWD/patches/pommed-1.26-use_custom_cflags.diff
+
+make OPT="$SLKCFLAGS"
+
+# The Makefile doesn't have an "install" target, so we'll do it manually
+
+# Install pommed (system daemon)
+mkdir -p $PKG/usr/sbin $PKG/usr/share/pommed $PKG/etc
+cp -a pommed/pommed $PKG/usr/sbin
+cp -a pommed/data/* $PKG/usr/share/pommed
+cat pommed.conf.mactel > $PKG/etc/pommed.conf.new
-# 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
+# Install gpomme (gtk client)
+mkdir -p $PKG/usr/bin $PKG/usr/share/gpomme/themes $PKG/usr/share/applications
+cp -a gpomme/gpomme $PKG/usr/bin
+cp -a gpomme/themes/* $PKG/usr/share/gpomme/themes
+cat gpomme/gpomme.desktop > $PKG/usr/share/applications/gpomme.desktop
+mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps
+cp -a icons/gpomme.svg $PKG/usr/share/icons/hicolor/scalable/apps
+for i in 16 22 24 32 36 48 64 72 96 128 192 ; do
+ mkdir -p $PKG/usr/share/icons/hicolor/${i}x${i}/apps
+ cp -a icons/gpomme_${i}x${i}.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/gpomme.png
+done
+# Install wmpomme (windowmaker client)
+mkdir -p $PKG/usr/bin
+cp -a wmpomme/wmpomme $PKG/usr/bin
+mkdir -p $PKG/usr/share/pixmaps
+cat icons/gpomme_192x192.xpm > $PKG/usr/share/pixmaps/gpomme.xpm
+
+# Install dbus config file
+mkdir -p $PKG/etc/dbus-1/system.d
+cat dbus-policy.conf > $PKG/etc/dbus-1/system.d/pommed.conf.new
+
+# Install init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.pommed > $PKG/etc/rc.d/rc.pommed.new
+chmod 0755 $PKG/etc/rc.d/rc.pommed.new
+
+# Install manpages
+mkdir -p $PKG/usr/man/man1
+cat pommed.1 > $PKG/usr/man/man1/pommed.1
+gzip -9 $PKG/usr/man/man1/pommed.1
+
+# Install docs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING ChangeLog INSTALL README TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
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
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/pommed/pommed.info b/system/pommed/pommed.info
index 781fa515c98a..293b111ac85b 100644
--- a/system/pommed/pommed.info
+++ b/system/pommed/pommed.info
@@ -1,8 +1,10 @@
PRGNAM="pommed"
-VERSION="1.16"
-HOMEPAGE="http://technologeek.org/projects/pommed/"
-DOWNLOAD="http://alioth.debian.org/frs/download.php/2350/pommed-1.16.tar.gz"
-MD5SUM="e401211600158072d29ec9a957180123"
+VERSION="1.26"
+HOMEPAGE="http://alioth.debian.org/projects/pommed/"
+DOWNLOAD="https://alioth.debian.org/frs/download.php/2975/pommed-1.26.tar.gz"
+MD5SUM="481d58a99fc0eeefad156e5d329e0a82"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
MAINTAINER="Alan Hicks"
EMAIL="alan@lizella.net"
-APPROVED="Alan Hicks"
+APPROVED="rworkman"
diff --git a/system/pommed/rc.pommed b/system/pommed/rc.pommed
index def1086f30d5..7bac4af53629 100644
--- a/system/pommed/rc.pommed
+++ b/system/pommed/rc.pommed
@@ -7,7 +7,8 @@ pommed_start() {
}
pommed_stop() {
- killall pommed
+ kill $(cat /var/run/pommed.pid) || killall pommed
+ rm -f /var/run/pommed.pid
}
pommed_restart() {
diff --git a/system/pommed/slack-desc b/system/pommed/slack-desc
index 6e83a899dbd4..c8e3376fb506 100644
--- a/system/pommed/slack-desc
+++ b/system/pommed/slack-desc
@@ -1,4 +1,11 @@
- |--------handy-ruler---------------------------------------------------|
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----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,