diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-02-14 03:21:35 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-02-14 03:21:35 +0800 |
commit | d8e0267a993899e6a1405f1c040b0cf093887f69 (patch) | |
tree | 436a46a14caa38b1d77b31c3717f1848457dcc19 /sysutils/upower | |
parent | b4d77090000935d6c60771bbeaa4717cbd86e9fc (diff) | |
download | marcuscom-ports-d8e0267a993899e6a1405f1c040b0cf093887f69.tar marcuscom-ports-d8e0267a993899e6a1405f1c040b0cf093887f69.tar.gz marcuscom-ports-d8e0267a993899e6a1405f1c040b0cf093887f69.tar.bz2 marcuscom-ports-d8e0267a993899e6a1405f1c040b0cf093887f69.tar.lz marcuscom-ports-d8e0267a993899e6a1405f1c040b0cf093887f69.tar.xz marcuscom-ports-d8e0267a993899e6a1405f1c040b0cf093887f69.tar.zst marcuscom-ports-d8e0267a993899e6a1405f1c040b0cf093887f69.zip |
Add UPower 0.9.0 after a repocopy from devkit-power.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@13622 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/upower')
-rw-r--r-- | sysutils/upower/Makefile | 16 | ||||
-rw-r--r-- | sysutils/upower/distinfo | 6 | ||||
-rw-r--r-- | sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info | 92 | ||||
-rw-r--r-- | sysutils/upower/pkg-descr | 2 | ||||
-rw-r--r-- | sysutils/upower/pkg-plist | 39 |
5 files changed, 91 insertions, 64 deletions
diff --git a/sysutils/upower/Makefile b/sysutils/upower/Makefile index 51f15fd26..6b3765c44 100644 --- a/sysutils/upower/Makefile +++ b/sysutils/upower/Makefile @@ -3,21 +3,24 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/devicekit-power/Makefile,v 1.6 2010/01/09 06:41:35 marcus Exp $ +# $MCom: ports/sysutils/upower/Makefile,v 1.7 2010/01/23 16:40:05 marcus Exp $ # -PORTNAME= DeviceKit-power -DISTVERSION= 014 +PORTNAME= UPower +DISTVERSION= 0.9.0 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ MAINTAINER= gnome@FreeBSD.org COMMENT= D-Bus daemon for simplifying power management tasks +BUILD_DEPENDS= g-ir-scanner:${PORTSDIR}/devel/gobject-introspection LIB_DEPENDS= polkit-gobject-1.0:${PORTSDIR}/sysutils/polkit \ dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib +RUN_DEPENDS= ${LOCALBASE}/lib/girepository-1.0/GObject-2.0.typelib:${PORTSDIR}/devel/gobject-introspection USE_GETTEXT= yes +USE_BZIP2= yes USE_GMAKE= yes USE_GNOME= gnomehack intlhack ltverhack glib20 USE_AUTOTOOLS= libtool:22 @@ -34,11 +37,12 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ CONFIGURE_ARGS+=--disable-man-pages .else BUILD_DEPENDS+= ${LOCALBASE}/share/sgml/docbook/4.1/dtd/catalog:${PORTSDIR}/textproc/docbook-410 \ + ${LOCALBASE}/share/xml/docbook/4.1.2/docbookx.dtd:${PORTSDIR}/textproc/docbook-sk \ xsltproc:${PORTSDIR}/textproc/libxslt \ ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl -MAN1= devkit-power.1 -MAN7= DeviceKit-power.7 -MAN8= devkit-power-daemon.8 +MAN1= upower.1 +MAN7= UPower.7 +MAN8= upowerd.8 .endif .include <bsd.port.mk> diff --git a/sysutils/upower/distinfo b/sysutils/upower/distinfo index 85cd66920..b16f91d77 100644 --- a/sysutils/upower/distinfo +++ b/sysutils/upower/distinfo @@ -1,3 +1,3 @@ -MD5 (DeviceKit-power-014.tar.gz) = 935d37f1e14b3c8a1d6dabcd9a38d3ca -SHA256 (DeviceKit-power-014.tar.gz) = ad3e9a8bd9525d66fadc7fa53ef99e0632aa8cca8fd5bc27483956261153b373 -SIZE (DeviceKit-power-014.tar.gz) = 545297 +MD5 (UPower-0.9.0.tar.bz2) = af958dedeb115033ff4a9f52a5cdb1f2 +SHA256 (UPower-0.9.0.tar.bz2) = 84a11e4830e16ce96ac02ca39ef6092c81a0ff5eff53f31427b855c8cb7b4ddf +SIZE (UPower-0.9.0.tar.bz2) = 468478 diff --git a/sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info b/sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info index 4e1f23282..ed96b4046 100644 --- a/sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info +++ b/sysutils/upower/files/patch-0003-add-backend-support-for-obtaining-kernel-info @@ -6,54 +6,54 @@ Subject: [PATCH 3/3] add backend support for obtaining kernel info Add FreeBSD-only support for pulling information about supported suspend states, commands, swap, etc. from the backend. --- - src/dkp-backend.h | 14 +++++++ - src/dkp-daemon.c | 99 ++++++++++++++++++++++++++++++++++++----------------- + src/up-backend.h | 14 +++++++ + src/up-daemon.c | 99 ++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 81 insertions(+), 32 deletions(-) -diff --git a/src/dkp-backend.h b/src/dkp-backend.h +diff --git a/src/up-backend.h b/src/up-backend.h index c03bac9..f4e488f 100644 ---- src/dkp-backend.h -+++ src/dkp-backend.h -@@ -68,6 +68,20 @@ void dkp_backend_test (gpointer user_data); - gboolean dkp_backend_coldplug (DkpBackend *backend, - DkpDaemon *daemon); +--- src/up-backend.h ++++ src/up-backend.h +@@ -68,6 +68,20 @@ void up_backend_test (gpointer user_data); + gboolean up_backend_coldplug (UpBackend *backend, + UpDaemon *daemon); -+gboolean dkp_backend_can_suspend (DkpBackend *backend); ++gboolean up_backend_can_suspend (UpBackend *backend); + -+gboolean dkp_backend_can_hibernate (DkpBackend *backend); ++gboolean up_backend_can_hibernate (UpBackend *backend); + -+gboolean dkp_backend_has_encrypted_swap (DkpBackend *backend); ++gboolean up_backend_has_encrypted_swap (UpBackend *backend); + -+gfloat dkp_backend_get_used_swap (DkpBackend *backend); ++gfloat up_backend_get_used_swap (UpBackend *backend); + -+gchar *dkp_backend_get_powersave_command (DkpBackend *backend, gboolean powersave); ++gchar *up_backend_get_powersave_command (UpBackend *backend, gboolean powersave); + -+gchar *dkp_backend_get_suspend_command (DkpBackend *backend); ++gchar *up_backend_get_suspend_command (UpBackend *backend); + -+gchar *dkp_backend_get_hibernate_command (DkpBackend *backend); ++gchar *up_backend_get_hibernate_command (UpBackend *backend); + G_END_DECLS - #endif /* __DKP_BACKEND_H */ -diff --git a/src/dkp-daemon.c b/src/dkp-daemon.c + #endif /* __UP_BACKEND_H */ +diff --git a/src/up-daemon.c b/src/up-daemon.c index 47d84d5..4085fb3 100644 ---- src/dkp-daemon.c -+++ src/dkp-daemon.c -@@ -109,6 +109,7 @@ G_DEFINE_TYPE (DkpDaemon, dkp_daemon, G_TYPE_OBJECT) +--- src/up-daemon.c ++++ src/up-daemon.c +@@ -109,6 +109,7 @@ G_DEFINE_TYPE (UpDaemon, up_daemon, G_TYPE_OBJECT) static gboolean - dkp_daemon_check_sleep_states (DkpDaemon *daemon) + up_daemon_check_sleep_states (UpDaemon *daemon) { +#ifndef __FreeBSD__ gchar *contents = NULL; GError *error = NULL; gboolean ret; -@@ -128,6 +129,12 @@ dkp_daemon_check_sleep_states (DkpDaemon *daemon) +@@ -128,6 +129,12 @@ up_daemon_check_sleep_states (UpDaemon *daemon) out: g_free (contents); return ret; +#else -+ daemon->priv->kernel_can_suspend = dkp_backend_can_suspend (daemon->priv->backend); -+ daemon->priv->kernel_can_hibernate = dkp_backend_can_hibernate (daemon->priv->backend); ++ daemon->priv->kernel_can_suspend = up_backend_can_suspend (daemon->priv->backend); ++ daemon->priv->kernel_can_hibernate = up_backend_can_hibernate (daemon->priv->backend); + + return TRUE; +#endif @@ -62,7 +62,7 @@ index 47d84d5..4085fb3 100644 /** @@ -146,6 +153,7 @@ out: static gboolean - dkp_daemon_check_encrypted_swap (DkpDaemon *daemon) + up_daemon_check_encrypted_swap (UpDaemon *daemon) { +#ifndef __FreeBSD__ gchar *contents_swaps = NULL; @@ -73,14 +73,14 @@ index 47d84d5..4085fb3 100644 g_strfreev (lines_crypttab); return encrypted_swap; +#else -+ return dkp_backend_has_encrypted_swap (daemon->priv->backend); ++ return up_backend_has_encrypted_swap (daemon->priv->backend); +#endif } /** @@ -243,6 +254,7 @@ out: static gfloat - dkp_daemon_check_swap_space (DkpDaemon *daemon) + up_daemon_check_swap_space (UpDaemon *daemon) { +#ifndef __FreeBSD__ gchar *contents = NULL; @@ -91,12 +91,12 @@ index 47d84d5..4085fb3 100644 g_strfreev (lines); return percentage; +#else -+ return dkp_backend_get_used_swap (daemon->priv->backend); ++ return up_backend_get_used_swap (daemon->priv->backend); +#endif } /** -@@ -423,13 +428,21 @@ dkp_daemon_set_pmutils_powersave (DkpDaemon *daemon, gboolean powersave) +@@ -423,13 +428,21 @@ up_daemon_set_pmutils_powersave (UpDaemon *daemon, gboolean powersave) GError *error = NULL; /* run script from pm-utils */ @@ -109,7 +109,7 @@ index 47d84d5..4085fb3 100644 - g_error_free (error); - goto out; +#else -+ command = dkp_backend_get_powersave_command (daemon->priv->backend, powersave); ++ command = up_backend_get_powersave_command (daemon->priv->backend, powersave); +#endif + if (command != NULL) { + egg_debug ("excuting command: %s", command); @@ -124,7 +124,7 @@ index 47d84d5..4085fb3 100644 } out: g_free (command); -@@ -501,6 +514,7 @@ dkp_daemon_suspend (DkpDaemon *daemon, DBusGMethodInvocation *context) +@@ -501,6 +514,7 @@ up_daemon_suspend (UpDaemon *daemon, DBusGMethodInvocation *context) GError *error; GError *error_local = NULL; PolkitSubject *subject = NULL; @@ -132,14 +132,14 @@ index 47d84d5..4085fb3 100644 gchar *stdout = NULL; gchar *stderr = NULL; -@@ -521,19 +535,29 @@ dkp_daemon_suspend (DkpDaemon *daemon, DBusGMethodInvocation *context) - if (!dkp_polkit_check_auth (daemon->priv->polkit, subject, "org.freedesktop.devicekit.power.suspend", context)) +@@ -521,19 +535,29 @@ up_daemon_suspend (UpDaemon *daemon, DBusGMethodInvocation *context) + if (!up_polkit_check_auth (daemon->priv->polkit, subject, "org.freedesktop.devicekit.power.suspend", context)) goto out; - ret = g_spawn_command_line_sync ("/usr/sbin/pm-suspend", &stdout, &stderr, NULL, &error_local); - if (!ret) { -- error = g_error_new (DKP_DAEMON_ERROR, -- DKP_DAEMON_ERROR_GENERAL, +- error = g_error_new (UP_DAEMON_ERROR, +- UP_DAEMON_ERROR_GENERAL, - "Failed to spawn: %s, stdout:%s, stderr:%s", error_local->message, stdout, stderr); - g_error_free (error_local); - dbus_g_method_return_error (context, error); @@ -147,13 +147,13 @@ index 47d84d5..4085fb3 100644 +#ifndef __FreeBSD__ + command = g_strdup ("/usr/sbin/pm-suspend"); +#else -+ command = dkp_backend_get_suspend_command (daemon->priv->backend); ++ command = up_backend_get_suspend_command (daemon->priv->backend); +#endif + if (command != NULL) { + ret = g_spawn_command_line_sync (command, &stdout, &stderr, NULL, &error_local); + if (!ret) { -+ error = g_error_new (DKP_DAEMON_ERROR, -+ DKP_DAEMON_ERROR_GENERAL, ++ error = g_error_new (UP_DAEMON_ERROR, ++ UP_DAEMON_ERROR_GENERAL, + "Failed to spawn: %s, stdout:%s, stderr:%s", error_local->message, stdout, stderr); + g_error_free (error_local); + dbus_g_method_return_error (context, error); @@ -170,7 +170,7 @@ index 47d84d5..4085fb3 100644 if (subject != NULL) g_object_unref (subject); return TRUE; -@@ -549,6 +573,7 @@ dkp_daemon_hibernate (DkpDaemon *daemon, DBusGMethodInvocation *context) +@@ -549,6 +573,7 @@ up_daemon_hibernate (UpDaemon *daemon, DBusGMethodInvocation *context) GError *error; GError *error_local = NULL; PolkitSubject *subject = NULL; @@ -178,14 +178,14 @@ index 47d84d5..4085fb3 100644 gchar *stdout = NULL; gchar *stderr = NULL; -@@ -589,19 +614,29 @@ dkp_daemon_hibernate (DkpDaemon *daemon, DBusGMethodInvocation *context) - if (!dkp_polkit_check_auth (daemon->priv->polkit, subject, "org.freedesktop.devicekit.power.hibernate", context)) +@@ -589,19 +614,29 @@ up_daemon_hibernate (UpDaemon *daemon, DBusGMethodInvocation *context) + if (!up_polkit_check_auth (daemon->priv->polkit, subject, "org.freedesktop.devicekit.power.hibernate", context)) goto out; - ret = g_spawn_command_line_sync ("/usr/sbin/pm-hibernate", &stdout, &stderr, NULL, &error_local); - if (!ret) { -- error = g_error_new (DKP_DAEMON_ERROR, -- DKP_DAEMON_ERROR_GENERAL, +- error = g_error_new (UP_DAEMON_ERROR, +- UP_DAEMON_ERROR_GENERAL, - "Failed to spawn: %s, stdout:%s, stderr:%s", error_local->message, stdout, stderr); - g_error_free (error_local); - dbus_g_method_return_error (context, error); @@ -193,13 +193,13 @@ index 47d84d5..4085fb3 100644 +#ifndef __FreeBSD__ + command = g_strdup ("/usr/sbin/pm-hibernate"); +#else -+ command = dkp_backend_get_hibernate_command (daemon->priv->backend); ++ command = up_backend_get_hibernate_command (daemon->priv->backend); +#endif + if (command != NULL) { + ret = g_spawn_command_line_sync (command, &stdout, &stderr, NULL, &error_local); + if (!ret) { -+ error = g_error_new (DKP_DAEMON_ERROR, -+ DKP_DAEMON_ERROR_GENERAL, ++ error = g_error_new (UP_DAEMON_ERROR, ++ UP_DAEMON_ERROR_GENERAL, + "Failed to spawn: %s, stdout:%s, stderr:%s", error_local->message, stdout, stderr); + g_error_free (error_local); + dbus_g_method_return_error (context, error); diff --git a/sysutils/upower/pkg-descr b/sysutils/upower/pkg-descr index cef53e05c..357aa3783 100644 --- a/sysutils/upower/pkg-descr +++ b/sysutils/upower/pkg-descr @@ -1,4 +1,4 @@ -DeviceKit-power is an abstraction for enumerating power devices, +UPower is an abstraction for enumerating power devices, listening to device events and querying history and statistics. Any application or service on the system can access the org.freedesktop.DeviceKit.Power service via the system message bus. diff --git a/sysutils/upower/pkg-plist b/sysutils/upower/pkg-plist index 619d0048c..95a4a3d8b 100644 --- a/sysutils/upower/pkg-plist +++ b/sysutils/upower/pkg-plist @@ -1,5 +1,6 @@ bin/devkit-power -etc/dbus-1/system.d/org.freedesktop.DeviceKit.Power.conf +bin/upower +etc/dbus-1/system.d/org.freedesktop.UPower.conf include/DeviceKit-power/devkit-power-gobject/devicekit-power.h include/DeviceKit-power/devkit-power-gobject/dkp-client.h include/DeviceKit-power/devkit-power-gobject/dkp-device.h @@ -10,19 +11,41 @@ include/DeviceKit-power/devkit-power-gobject/dkp-stats-obj.h include/DeviceKit-power/devkit-power-gobject/dkp-version.h include/DeviceKit-power/devkit-power-gobject/dkp-wakeups-obj.h include/DeviceKit-power/devkit-power-gobject/dkp-wakeups.h +include/upower-glib/up-client.h +include/upower-glib/up-device.h +include/upower-glib/up-history-item.h +include/upower-glib/up-qos-item.h +include/upower-glib/up-stats-item.h +include/upower-glib/up-types.h +include/upower-glib/up-version.h +include/upower-glib/up-wakeup-item.h +include/upower-glib/upower.h +lib/girepositry-1.0/DeviceKitPowerGlib-1.0.typelib +lib/girepositry-1.0/UPowerGlib-1.0.typelib lib/libdevkit-power-gobject.a lib/libdevkit-power-gobject.la lib/libdevkit-power-gobject.so lib/libdevkit-power-gobject.so.1 +lib/libupower-glib.a +lib/libupower-glib.la +lib/libupower-glib.so +lib/libupower-glib.so.1 libdata/pkgconfig/devkit-power-gobject.pc +libdata/pkgconfig/upower-glib.pc libexec/devkit-power-daemon -share/dbus-1/interfaces/org.freedesktop.DeviceKit.Power.Device.xml -share/dbus-1/interfaces/org.freedesktop.DeviceKit.Power.QoS.xml -share/dbus-1/interfaces/org.freedesktop.DeviceKit.Power.Wakeups.xml -share/dbus-1/interfaces/org.freedesktop.DeviceKit.Power.xml -share/dbus-1/system-services/org.freedesktop.DeviceKit.Power.service -share/polkit-1/actions/org.freedesktop.devicekit.power.policy -share/polkit-1/actions/org.freedesktop.devicekit.power.qos.policy +libexec/upowerd +share/dbus-1/interfaces/org.freedesktop.UPower.Device.xml +share/dbus-1/interfaces/org.freedesktop.UPower.QoS.xml +share/dbus-1/interfaces/org.freedesktop.UPower.Wakeups.xml +share/dbus-1/interfaces/org.freedesktop.UPower.xml +share/dbus-1/system-services/org.freedesktop.UPower.service +share/gir-1.0/DeviceKitPowerGlib-1.0.gir +share/gir-1.0/UPowerGlib-1.0.gir +share/locale/it/LC_MESSAGES/UPower.mo +share/locale/pl/LC_MESSAGES/UPower.mo +share/locale/sv/LC_MESSAGES/UPower.mo +share/polkit-1/actions/org.freedesktop.upower.policy +share/polkit-1/actions/org.freedesktop.upower.qos.policy @exec mkdir -p /var/lib/DeviceKit-power @dirrm include/DeviceKit-power/devkit-power-gobject @dirrm include/DeviceKit-power |