summaryrefslogtreecommitdiff
path: root/extra/gnome-power-manager
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/gnome-power-manager
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/gnome-power-manager')
-rw-r--r--extra/gnome-power-manager/PKGBUILD37
-rw-r--r--extra/gnome-power-manager/gnome-power-manager-2.32.0-libnotify-0.7.patch30
-rw-r--r--extra/gnome-power-manager/gnome-power-manager.install22
3 files changed, 89 insertions, 0 deletions
diff --git a/extra/gnome-power-manager/PKGBUILD b/extra/gnome-power-manager/PKGBUILD
new file mode 100644
index 000000000..f9aa58f27
--- /dev/null
+++ b/extra/gnome-power-manager/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 112791 2011-03-06 21:31:20Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-power-manager
+pkgver=2.32.0
+pkgrel=2
+pkgdesc="Session daemon that makes it easy to manage your laptop or desktop system."
+arch=(i686 x86_64)
+url="http://www.gnome.org/projects/gnome-power-manager/"
+license=('GPL')
+depends=('libnotify>=0.7.1' 'libunique>=1.1.6' 'libcanberra>=0.25' 'hicolor-icon-theme' 'upower>=0.9.5' 'libgnome-keyring>=2.31.92')
+makedepends=('intltool' 'pkgconfig' 'gnome-doc-utils>=0.20.1' 'gnome-panel-bonobo>=2.31.92')
+optdepends=('gnome-panel-bonobo: panel applets')
+options=(!emptydirs)
+install=gnome-power-manager.install
+groups=(gnome-extra)
+source=(http://ftp.gnome.org/pub/GNOME/sources/gnome-power-manager/2.32/${pkgname}-${pkgver}.tar.bz2
+ gnome-power-manager-2.32.0-libnotify-0.7.patch)
+sha256sums=('17fa301bf7e133285c0e054ae3be2b0f690c48f59b09f67e04d6ed339b330476'
+ '50e2f726281805f2b1eb3fbce2e8aa7a4258de12a20bb09e57527235c82760d2')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np0 -i "${srcdir}/gnome-power-manager-2.32.0-libnotify-0.7.patch"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/gnome-power-manager \
+ --disable-scrollkeeper \
+ --with-dbus-services=/usr/share/dbus-1/services \
+ --enable-applets
+ make
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnome-power-manager ${pkgdir}/etc/gconf/schemas/*.schemas
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/extra/gnome-power-manager/gnome-power-manager-2.32.0-libnotify-0.7.patch b/extra/gnome-power-manager/gnome-power-manager-2.32.0-libnotify-0.7.patch
new file mode 100644
index 000000000..d021f2930
--- /dev/null
+++ b/extra/gnome-power-manager/gnome-power-manager-2.32.0-libnotify-0.7.patch
@@ -0,0 +1,30 @@
+--- src/gpm-manager.c
++++ src/gpm-manager.c
+@@ -43,6 +43,10 @@
+ #include <libupower-glib/upower.h>
+ #include <libnotify/notify.h>
+
++#ifndef NOTIFY_CHECK_VERSION
++#define NOTIFY_CHECK_VERSION(x,y,z) 0
++#endif
++
+ #include "egg-debug.h"
+ #include "egg-console-kit.h"
+
+@@ -480,12 +484,16 @@
+ /* close any existing notification of this class */
+ gpm_manager_notify_close (manager, *notification_class);
+
++#if NOTIFY_CHECK_VERSION (0, 7, 0)
++ notification = notify_notification_new (title, message, icon);
++#else
+ /* if the status icon is hidden, don't point at it */
+ if (manager->priv->status_icon != NULL &&
+ gtk_status_icon_is_embedded (manager->priv->status_icon))
+ notification = notify_notification_new_with_status_icon (title, message, icon, manager->priv->status_icon);
+ else
+ notification = notify_notification_new (title, message, icon, NULL);
++#endif
+ notify_notification_set_timeout (notification, timeout);
+ notify_notification_set_urgency (notification, urgency);
+ g_signal_connect (notification, "closed", G_CALLBACK (gpm_manager_notification_closed_cb), notification_class);
diff --git a/extra/gnome-power-manager/gnome-power-manager.install b/extra/gnome-power-manager/gnome-power-manager.install
new file mode 100644
index 000000000..ee19ac94d
--- /dev/null
+++ b/extra/gnome-power-manager/gnome-power-manager.install
@@ -0,0 +1,22 @@
+pkgname=gnome-power-manager
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+pre_upgrade() {
+pre_remove $1
+}
+
+post_upgrade() {
+post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}