app-laptop/pommed: New ebuild for bug #163497
authorCédric Krier <cedk@gentoo.org>
Sun, 4 Mar 2007 19:31:03 +0000 (19:31 +0000)
committerCédric Krier <cedk@gentoo.org>
Sun, 4 Mar 2007 19:31:03 +0000 (19:31 +0000)
Package-Manager: portage-2.1.2-r9

app-laptop/pommed/ChangeLog [new file with mode: 0644]
app-laptop/pommed/Manifest [new file with mode: 0644]
app-laptop/pommed/files/digest-pommed-1.2 [new file with mode: 0644]
app-laptop/pommed/files/pommed-1.2.patch [new file with mode: 0644]
app-laptop/pommed/files/pommed.rc [new file with mode: 0755]
app-laptop/pommed/metadata.xml [new file with mode: 0644]
app-laptop/pommed/pommed-1.2.ebuild [new file with mode: 0644]

diff --git a/app-laptop/pommed/ChangeLog b/app-laptop/pommed/ChangeLog
new file mode 100644 (file)
index 0000000..c79948d
--- /dev/null
@@ -0,0 +1,11 @@
+# ChangeLog for app-laptop/pommed
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/pommed/ChangeLog,v 1.1 2007/03/04 19:31:03 cedk Exp $
+
+*pommed-1.2 (04 Mar 2007)
+
+  04 Mar 2007; Cedric Krier <cedk@gentoo.org> +files/pommed-1.2.patch,
+  +files/pommed.rc, +metadata.xml, +pommed-1.2.ebuild:
+  New ebuild for bug #163497 thanks to Daniel Vianna, Guillaume Pujol, Markus
+  Rothe
+
diff --git a/app-laptop/pommed/Manifest b/app-laptop/pommed/Manifest
new file mode 100644 (file)
index 0000000..cfba48d
--- /dev/null
@@ -0,0 +1,24 @@
+AUX pommed-1.2.patch 1205 RMD160 c1924e2878f8edf741e35aed175c7b73a1c817a0 SHA1 f8dec5f4921871b9b5491175784ad5016736ddda SHA256 0614b86c9221e377f77fa01ff91e0d90ba1f88c8b6db48b04d9d2718cd0384b6
+MD5 07a710781d74a7a5764c2f09e4dd5cd2 files/pommed-1.2.patch 1205
+RMD160 c1924e2878f8edf741e35aed175c7b73a1c817a0 files/pommed-1.2.patch 1205
+SHA256 0614b86c9221e377f77fa01ff91e0d90ba1f88c8b6db48b04d9d2718cd0384b6 files/pommed-1.2.patch 1205
+AUX pommed.rc 372 RMD160 04acb2328527483af1ebcc50ce723b90df859b32 SHA1 8c1f734a4e07c7347c6e22fdb258eebc23fa0722 SHA256 986d87fd7fd87b0fe43d1fb01d357aa70575f34e90d2e37df5d69aa5134b9d92
+MD5 1876e395575ae94ce382e769bf8ed8af files/pommed.rc 372
+RMD160 04acb2328527483af1ebcc50ce723b90df859b32 files/pommed.rc 372
+SHA256 986d87fd7fd87b0fe43d1fb01d357aa70575f34e90d2e37df5d69aa5134b9d92 files/pommed.rc 372
+DIST pommed-1.2.tar.gz 833703 RMD160 408d2423a27a41db855f6a7167b3cacc202679fe SHA1 f08ec24227a52c9f7c7218c74a5f017340fdd261 SHA256 9d902eb7d227c289fb5f888b7e518ad431228501109eb4b7c22839b7a0142268
+EBUILD pommed-1.2.ebuild 1918 RMD160 97a0ec22096574fb397e027a524e874cc96f0529 SHA1 b78c884751569c9d58aeef584333a65ffbc53a83 SHA256 09bf436c65499185ee105a4b3145511b513853dbf962d310864b75c0a0771da9
+MD5 062299666edbaec423b4e3fcf7d5d96c pommed-1.2.ebuild 1918
+RMD160 97a0ec22096574fb397e027a524e874cc96f0529 pommed-1.2.ebuild 1918
+SHA256 09bf436c65499185ee105a4b3145511b513853dbf962d310864b75c0a0771da9 pommed-1.2.ebuild 1918
+MISC ChangeLog 445 RMD160 81259087ed036a372b1ab8159f68f0dc98e42b35 SHA1 a8f86a1d726807b31f1983a55d7488721e477b57 SHA256 05851a336c78c552a4d2f87f093636682a1b66ae4a7302881faa942f837b2c85
+MD5 998bab837f615a3677cf149a1aa4cf61 ChangeLog 445
+RMD160 81259087ed036a372b1ab8159f68f0dc98e42b35 ChangeLog 445
+SHA256 05851a336c78c552a4d2f87f093636682a1b66ae4a7302881faa942f837b2c85 ChangeLog 445
+MISC metadata.xml 650 RMD160 f7daee13a933d338a74f6d96ab6cf50ca14c41fe SHA1 55e4fd4f2955d2874a1a6b01897d3ee979a9b886 SHA256 98d730e05d016004e5fe2e7de97c0b2d08ec7f6c5a3521bda0d6ab3d16c0e327
+MD5 d67d39ae1e7d303eecb7e6a896c00762 metadata.xml 650
+RMD160 f7daee13a933d338a74f6d96ab6cf50ca14c41fe metadata.xml 650
+SHA256 98d730e05d016004e5fe2e7de97c0b2d08ec7f6c5a3521bda0d6ab3d16c0e327 metadata.xml 650
+MD5 df5a9fdf9d032e01906f55c26a34aec2 files/digest-pommed-1.2 232
+RMD160 cc3e05221d218d2c2f294271d1421bb16386010a files/digest-pommed-1.2 232
+SHA256 00c00d132b45d094b1b661226106358ad194b9012a46af7fd34d7b85018f0b5d files/digest-pommed-1.2 232
diff --git a/app-laptop/pommed/files/digest-pommed-1.2 b/app-laptop/pommed/files/digest-pommed-1.2
new file mode 100644 (file)
index 0000000..a11d458
--- /dev/null
@@ -0,0 +1,3 @@
+MD5 00be2db3f5648755da2ba75d1f35f0b4 pommed-1.2.tar.gz 833703
+RMD160 408d2423a27a41db855f6a7167b3cacc202679fe pommed-1.2.tar.gz 833703
+SHA256 9d902eb7d227c289fb5f888b7e518ad431228501109eb4b7c22839b7a0142268 pommed-1.2.tar.gz 833703
diff --git a/app-laptop/pommed/files/pommed-1.2.patch b/app-laptop/pommed/files/pommed-1.2.patch
new file mode 100644 (file)
index 0000000..83281f4
--- /dev/null
@@ -0,0 +1,33 @@
+diff -ru pommed-1.2~/gpomme/conffile.c pommed-1.2/gpomme/conffile.c
+--- pommed-1.2~/gpomme/conffile.c      2007-03-04 19:12:57.000000000 +0100
++++ pommed-1.2/gpomme/conffile.c       2007-03-04 20:12:36.000000000 +0100
+@@ -32,6 +32,8 @@
+ #include "gpomme.h"
+ #include "theme.h"
++#include "conffile.h"
++
+ #define CONFFILE        "/.gpommerc"
+ static cfg_opt_t cfg_opts[] =
+diff -ru pommed-1.2~/pommed/Makefile pommed-1.2/pommed/Makefile
+--- pommed-1.2~/pommed/Makefile        2007-03-04 19:12:57.000000000 +0100
++++ pommed-1.2/pommed/Makefile 2007-03-04 20:09:49.000000000 +0100
+@@ -11,7 +11,7 @@
+ CONFUSE_CFLAGS = $(shell pkg-config libconfuse --cflags)
+ CONFUSE_LIBS = $(shell pkg-config libconfuse --libs)
+-CFLAGS = -g -O2 -Wall $(CONFUSE_CFLAGS) $(DBUS_CFLAGS) $(ALSA_CFLAGS)
++CFLAGS += -Wall $(CONFUSE_CFLAGS) $(DBUS_CFLAGS) $(ALSA_CFLAGS)
+ ifeq ($(ARCH), ppc)
+ LDFLAGS = -lz $(CONFUSE_LIBS) $(DBUS_LIBS) $(ALSA_LIBS)
+@@ -29,7 +29,7 @@
+ else
+-LDFLAGS = -lz -lsmbios $(CONFUSE_LIBS) $(DBUS_LIBS) $(ALSA_LIBS)
++LDFLAGS = -lz -lsmbios -lstdc++ $(CONFUSE_LIBS) $(DBUS_LIBS) $(ALSA_LIBS)
+ SOURCES = pommed.c cd_eject.c evdev.c conffile.c audio.c dbus.c \
+               mactel/x1600_backlight.c mactel/gma950_backlight.c \
diff --git a/app-laptop/pommed/files/pommed.rc b/app-laptop/pommed/files/pommed.rc
new file mode 100755 (executable)
index 0000000..a214c82
--- /dev/null
@@ -0,0 +1,19 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+       need dbus
+}
+
+start() {
+       ebegin "Running pommed daemon"
+       start-stop-daemon --start --quiet --exec /usr/bin/pommed
+       eend $?
+}
+
+stop() {
+       ebegin "Stopping pommed daemon"
+       start-stop-daemon --stop --pidfile /var/run/pommed.pid
+       eend $?
+}
diff --git a/app-laptop/pommed/metadata.xml b/app-laptop/pommed/metadata.xml
new file mode 100644 (file)
index 0000000..589747d
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+  <email>cedk@gentoo.org</email>
+</maintainer>
+<longdescription> pommed handles the hotkeys found on the Apple MacBook Pro,
+MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume,
+keyboard backlight or ejects the CD-ROM drive accordingly.
+pommed also monitors the ambient light sensors to automatically light up the
+keyboard backlight on the MacBook Pro and the latest PowerBook.
+Optional support for the Apple Remote control is available.</longdescription>
+</pkgmetadata>
diff --git a/app-laptop/pommed/pommed-1.2.ebuild b/app-laptop/pommed/pommed-1.2.ebuild
new file mode 100644 (file)
index 0000000..3a9f907
--- /dev/null
@@ -0,0 +1,87 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/pommed/pommed-1.2.ebuild,v 1.1 2007/03/04 19:31:03 cedk Exp $
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Daemon managing special features such as screen and keyboard \
+backlight on Apple MacBook Pro/PowerBook laptops"
+HOMEPAGE="http://technologeek.org/projects/pommed/index.html"
+SRC_URI="http://alioth.debian.org/frs/download.php/1831/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="gtk X"
+
+DEPEND="sys-apps/pciutils
+       media-libs/alsa-lib
+       sys-libs/libsmbios
+       dev-libs/confuse
+       sys-apps/dbus
+       sys-libs/zlib
+       gtk? ( x11-libs/gtk+
+               media-libs/audiofile )
+       X? ( x11-libs/libX11 )"
+RDEPEND="${DEPEND}
+       sys-apps/eject"
+
+src_unpack() {
+       unpack ${A}
+       cd "${S}"
+       epatch ${FILESDIR}/${P}.patch
+}
+
+src_compile() {
+       cd "${S}"/pommed
+       emake CC=$(tc-getCC) || die "emake pommed failed"
+
+       if use gtk; then
+               cd "${S}"/gpomme
+               local POFILES=""
+               for LANG in ${LINGUAS}; do
+                       if [ -f po/${LANG}.po ]; then
+                               POFILES="${POFILES} po/${LANG}.po"
+                       fi
+               done
+               emake CC=$(tc-getCC) POFILES="${POFILES}" || die "emake gpomme failed"
+       fi
+       if use X; then
+               cd "${S}"/wmpomme
+               emake CC=$(tc-getCC) || die "emake wmpomme failed"
+       fi
+}
+
+src_install() {
+       insinto /etc
+       doins pommed.conf.{pmac,mactel}
+
+       insinto /etc/dbus-1/system.d
+       doins dbus-policy.conf
+
+       dobin pommed/pommed
+
+       newinitd ${FILESDIR}/pommed.rc pommed
+
+       dodoc AUTHORS ChangeLog README TODO
+
+       if use gtk ; then
+               dobin gpomme/gpomme
+               for LANG in ${LINGUAS}; do
+                       if [ -f gpomme/po/${LANG}.mo ]; then
+                               einfo "Installing lang ${LANG}"
+                               insinto /usr/share/locale/${LANG}/LC_MESSAGES/
+                               doins gpomme/po/${LANG}.mo
+                       fi
+               done
+
+               insinto /usr/share/applications
+               doins gpomme/gpomme.desktop
+               insinto /usr/share/gpomme/
+               doins -r gpomme/themes
+       fi
+
+       if use X ; then
+               dobin wmpomme/wmpomme
+       fi
+}