automatic version update by autodist [release 0.9.23-1mamba;Mon Oct 28 2013]
This commit is contained in:
parent
b2928965ff
commit
eaaf3383ce
@ -1,2 +1,4 @@
|
|||||||
# upower
|
# upower
|
||||||
|
|
||||||
|
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.UPower service via the system message bus. Some operations (such as suspending the system) are restricted using PolicyKit.
|
||||||
|
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
diff -Nru upower-0.9.15.orig/src/linux/up-device-supply.c upower-0.9.15/src/linux/up-device-supply.c
|
||||||
|
--- upower-0.9.15.orig/src/linux/up-device-supply.c 2011-12-03 14:09:57.000000000 +0100
|
||||||
|
+++ upower-0.9.15/src/linux/up-device-supply.c 2012-02-28 18:23:46.392531386 +0100
|
||||||
|
@@ -694,10 +694,8 @@
|
||||||
|
percentage = 100.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* device is a peripheral and not providing power to the computer */
|
||||||
|
- if (energy < 0.01f &&
|
||||||
|
- energy_rate < 0.01f &&
|
||||||
|
- energy_full < 0.01f) {
|
||||||
|
+ /* device is not reporting charge or energy, try to read the percentage */
|
||||||
|
+ if (energy_full < 0.01f) {
|
||||||
|
percentage = sysfs_get_double (native_path, "capacity");
|
||||||
|
}
|
||||||
|
|
44
upower-0.9.6-ensure-gerror-is-init.patch
Normal file
44
upower-0.9.6-ensure-gerror-is-init.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
commit a4e099c5bff9f9fdb9067a0a6bb206d4c34745ae
|
||||||
|
Author: Richard Hughes <richard@hughsie.com>
|
||||||
|
Date: Tue Aug 10 15:52:12 2010 +0100
|
||||||
|
|
||||||
|
Ensure we've initialized errors when calling into PolicyKit
|
||||||
|
|
||||||
|
diff --git a/src/up-polkit.c b/src/up-polkit.c
|
||||||
|
index d7760dd..9b86394 100644
|
||||||
|
--- a/src/up-polkit.c
|
||||||
|
+++ b/src/up-polkit.c
|
||||||
|
@@ -69,11 +69,14 @@ up_polkit_check_auth (UpPolkit *polkit, PolkitSubject *subject, const gchar *act
|
||||||
|
{
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
GError *error;
|
||||||
|
- GError *error_local;
|
||||||
|
+ GError *error_local = NULL;
|
||||||
|
PolkitAuthorizationResult *result;
|
||||||
|
|
||||||
|
/* check auth */
|
||||||
|
- result = polkit_authority_check_authorization_sync (polkit->priv->authority, subject, action_id, NULL, POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, NULL, &error_local);
|
||||||
|
+ result = polkit_authority_check_authorization_sync (polkit->priv->authority,
|
||||||
|
+ subject, action_id, NULL,
|
||||||
|
+ POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
|
||||||
|
+ NULL, &error_local);
|
||||||
|
if (result == NULL) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
@@ -104,11 +107,14 @@ up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *act
|
||||||
|
{
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
GError *error;
|
||||||
|
- GError *error_local;
|
||||||
|
+ GError *error_local = NULL;
|
||||||
|
PolkitAuthorizationResult *result;
|
||||||
|
|
||||||
|
/* check auth */
|
||||||
|
- result = polkit_authority_check_authorization_sync (polkit->priv->authority, subject, action_id, NULL, POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE, NULL, &error_local);
|
||||||
|
+ result = polkit_authority_check_authorization_sync (polkit->priv->authority,
|
||||||
|
+ subject, action_id, NULL,
|
||||||
|
+ POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
|
||||||
|
+ NULL, &error_local);
|
||||||
|
if (result == NULL) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
|
||||||
|
dbus_g_method_return_error (context, error);
|
291
upower-dbus-fixes.patch
Normal file
291
upower-dbus-fixes.patch
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
diff --git a/src/up-daemon.c b/src/up-daemon.c
|
||||||
|
index 3fb952b..4884b64 100644
|
||||||
|
--- a/src/up-daemon.c
|
||||||
|
+++ b/src/up-daemon.c
|
||||||
|
@@ -323,6 +323,7 @@ up_daemon_about_to_sleep (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"Sleep has already been requested and is pending");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -376,6 +377,7 @@ up_daemon_deferred_sleep_cb (UpDaemonDeferredSleep *sleep)
|
||||||
|
"Failed to spawn: %s, stdout:%s, stderr:%s", error_local->message, stdout, stderr);
|
||||||
|
g_error_free (error_local);
|
||||||
|
dbus_g_method_return_error (sleep->context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -470,6 +472,7 @@ up_daemon_suspend (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"No kernel support");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -477,7 +480,7 @@ up_daemon_suspend (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
if (subject == NULL)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
- if (!up_polkit_check_auth (priv->polkit, subject, "org.freedesktop.upower.suspend", context))
|
||||||
|
+ if (!up_polkit_check_auth (priv->polkit, subject, "org.freedesktop.upower.suspend", context))
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
/* already requested */
|
||||||
|
@@ -486,6 +489,7 @@ up_daemon_suspend (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"Sleep has already been requested and is pending");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -507,13 +511,21 @@ up_daemon_suspend_allowed (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
gboolean ret;
|
||||||
|
PolkitSubject *subject = NULL;
|
||||||
|
UpDaemonPrivate *priv = daemon->priv;
|
||||||
|
+ GError *error;
|
||||||
|
|
||||||
|
subject = up_polkit_get_subject (priv->polkit, context);
|
||||||
|
if (subject == NULL)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
- ret = up_polkit_is_allowed (priv->polkit, subject, "org.freedesktop.upower.suspend", context);
|
||||||
|
- dbus_g_method_return (context, ret);
|
||||||
|
+ error = NULL;
|
||||||
|
+ ret = up_polkit_is_allowed (priv->polkit, subject, "org.freedesktop.upower.suspend", &error);
|
||||||
|
+ if (error) {
|
||||||
|
+ dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ dbus_g_method_return (context, ret);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
out:
|
||||||
|
if (subject != NULL)
|
||||||
|
@@ -563,6 +575,7 @@ up_daemon_hibernate (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"No kernel support");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -572,6 +585,7 @@ up_daemon_hibernate (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"Not enough swap space");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -582,6 +596,7 @@ up_daemon_hibernate (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"Swap space is encrypted, use AllowHibernateEncryptedSwap to override");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -598,6 +613,7 @@ up_daemon_hibernate (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"Sleep has already been requested and is pending");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -619,13 +635,21 @@ up_daemon_hibernate_allowed (UpDaemon *daemon, DBusGMethodInvocation *context)
|
||||||
|
gboolean ret;
|
||||||
|
PolkitSubject *subject = NULL;
|
||||||
|
UpDaemonPrivate *priv = daemon->priv;
|
||||||
|
+ GError *error;
|
||||||
|
|
||||||
|
subject = up_polkit_get_subject (priv->polkit, context);
|
||||||
|
if (subject == NULL)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
- ret = up_polkit_is_allowed (priv->polkit, subject, "org.freedesktop.upower.hibernate", context);
|
||||||
|
- dbus_g_method_return (context, ret);
|
||||||
|
+ error = NULL;
|
||||||
|
+ ret = up_polkit_is_allowed (priv->polkit, subject, "org.freedesktop.upower.hibernate", &error);
|
||||||
|
+ if (error) {
|
||||||
|
+ dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ dbus_g_method_return (context, ret);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
out:
|
||||||
|
if (subject != NULL)
|
||||||
|
diff --git a/src/up-polkit.c b/src/up-polkit.c
|
||||||
|
index 9b86394..bd1e5e0 100644
|
||||||
|
--- a/src/up-polkit.c
|
||||||
|
+++ b/src/up-polkit.c
|
||||||
|
@@ -52,12 +52,19 @@ static gpointer up_polkit_object = NULL;
|
||||||
|
PolkitSubject *
|
||||||
|
up_polkit_get_subject (UpPolkit *polkit, DBusGMethodInvocation *context)
|
||||||
|
{
|
||||||
|
+ GError *error;
|
||||||
|
const gchar *sender;
|
||||||
|
PolkitSubject *subject;
|
||||||
|
|
||||||
|
sender = dbus_g_method_get_sender (context);
|
||||||
|
subject = polkit_system_bus_name_new (sender);
|
||||||
|
|
||||||
|
+ if (subject == NULL) {
|
||||||
|
+ error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to get PolicyKit subject");
|
||||||
|
+ dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return subject;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -79,9 +86,9 @@ up_polkit_check_auth (UpPolkit *polkit, PolkitSubject *subject, const gchar *act
|
||||||
|
NULL, &error_local);
|
||||||
|
if (result == NULL) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
|
||||||
|
- dbus_g_method_return_error (context, error);
|
||||||
|
+ dbus_g_method_return_error (context, error);
|
||||||
|
g_error_free (error_local);
|
||||||
|
- g_error_free (error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -90,8 +97,8 @@ up_polkit_check_auth (UpPolkit *polkit, PolkitSubject *subject, const gchar *act
|
||||||
|
ret = TRUE;
|
||||||
|
} else {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "not authorized");
|
||||||
|
- dbus_g_method_return_error (context, error);
|
||||||
|
- g_error_free (error);
|
||||||
|
+ dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
}
|
||||||
|
out:
|
||||||
|
if (result != NULL)
|
||||||
|
@@ -103,10 +110,9 @@ out:
|
||||||
|
* up_polkit_is_allowed:
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
-up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *action_id, DBusGMethodInvocation *context)
|
||||||
|
+up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *action_id, GError **error)
|
||||||
|
{
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
- GError *error;
|
||||||
|
GError *error_local = NULL;
|
||||||
|
PolkitAuthorizationResult *result;
|
||||||
|
|
||||||
|
@@ -116,10 +122,8 @@ up_polkit_is_allowed (UpPolkit *polkit, PolkitSubject *subject, const gchar *act
|
||||||
|
POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
|
||||||
|
NULL, &error_local);
|
||||||
|
if (result == NULL) {
|
||||||
|
- error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
|
||||||
|
- dbus_g_method_return_error (context, error);
|
||||||
|
+ g_set_error (error, UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "failed to check authorisation: %s", error_local->message);
|
||||||
|
g_error_free (error_local);
|
||||||
|
- g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/up-polkit.h b/src/up-polkit.h
|
||||||
|
index acee70e..b9abd7e 100644
|
||||||
|
--- a/src/up-polkit.h
|
||||||
|
+++ b/src/up-polkit.h
|
||||||
|
@@ -56,11 +56,11 @@ PolkitSubject *up_polkit_get_subject (UpPolkit *polkit,
|
||||||
|
gboolean up_polkit_check_auth (UpPolkit *polkit,
|
||||||
|
PolkitSubject *subject,
|
||||||
|
const gchar *action_id,
|
||||||
|
- DBusGMethodInvocation *context);
|
||||||
|
+ DBusGMethodInvocation *context);
|
||||||
|
gboolean up_polkit_is_allowed (UpPolkit *polkit,
|
||||||
|
PolkitSubject *subject,
|
||||||
|
const gchar *action_id,
|
||||||
|
- DBusGMethodInvocation *context);
|
||||||
|
+ GError **error);
|
||||||
|
gboolean up_polkit_get_uid (UpPolkit *polkit,
|
||||||
|
PolkitSubject *subject,
|
||||||
|
uid_t *uid);
|
||||||
|
diff --git a/src/up-qos.c b/src/up-qos.c
|
||||||
|
index 0ce3eea..b36df3f 100644
|
||||||
|
--- a/src/up-qos.c
|
||||||
|
+++ b/src/up-qos.c
|
||||||
|
@@ -262,6 +262,7 @@ up_qos_request_latency (UpQos *qos, const gchar *type_text, gint value, gboolean
|
||||||
|
if (type == UP_QOS_KIND_UNKNOWN) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -270,6 +271,7 @@ up_qos_request_latency (UpQos *qos, const gchar *type_text, gint value, gboolean
|
||||||
|
if (sender == NULL) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "no DBUS sender");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -291,6 +293,7 @@ up_qos_request_latency (UpQos *qos, const gchar *type_text, gint value, gboolean
|
||||||
|
if (!retval) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "cannot get UID");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -299,6 +302,7 @@ up_qos_request_latency (UpQos *qos, const gchar *type_text, gint value, gboolean
|
||||||
|
if (!retval) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "cannot get PID");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -307,6 +311,7 @@ up_qos_request_latency (UpQos *qos, const gchar *type_text, gint value, gboolean
|
||||||
|
if (cmdline == NULL) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "cannot get cmdline");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -359,6 +364,7 @@ up_qos_cancel_request (UpQos *qos, guint cookie, DBusGMethodInvocation *context)
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL,
|
||||||
|
"Cannot find request for #%i", cookie);
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -367,6 +373,7 @@ up_qos_cancel_request (UpQos *qos, guint cookie, DBusGMethodInvocation *context)
|
||||||
|
if (sender == NULL) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "no DBUS sender");
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -388,6 +395,8 @@ up_qos_cancel_request (UpQos *qos, guint cookie, DBusGMethodInvocation *context)
|
||||||
|
/* TODO: if persistent remove from datadase */
|
||||||
|
|
||||||
|
g_signal_emit (qos, signals [REQUESTS_CHANGED], 0);
|
||||||
|
+
|
||||||
|
+ dbus_g_method_return (context, NULL);
|
||||||
|
out:
|
||||||
|
if (subject != NULL)
|
||||||
|
g_object_unref (subject);
|
||||||
|
@@ -430,6 +439,7 @@ up_qos_set_minimum_latency (UpQos *qos, const gchar *type_text, gint value, DBus
|
||||||
|
if (type == UP_QOS_KIND_UNKNOWN) {
|
||||||
|
error = g_error_new (UP_DAEMON_ERROR, UP_DAEMON_ERROR_GENERAL, "type invalid: %s", type_text);
|
||||||
|
dbus_g_method_return_error (context, error);
|
||||||
|
+ g_error_free (error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
192
upower.spec
Normal file
192
upower.spec
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
Name: upower
|
||||||
|
Version: 0.9.23
|
||||||
|
Release: 1mamba
|
||||||
|
Summary: Power Management Service
|
||||||
|
Group: System/Libraries
|
||||||
|
Vendor: openmamba
|
||||||
|
Distribution: openmamba
|
||||||
|
Packager: Automatic Build System <autodist@mambasoft.it>
|
||||||
|
URL: http://upower.freedesktop.org/
|
||||||
|
Source: http://upower.freedesktop.org/releases/upower-%{version}.tar.xz
|
||||||
|
# don't crash with new polkits
|
||||||
|
Patch0: upower-0.9.6-ensure-gerror-is-init.patch
|
||||||
|
# don't return more or less than once from a dbus call
|
||||||
|
# and don't leak errors all over the place
|
||||||
|
Patch1: upower-dbus-fixes.patch
|
||||||
|
Patch2: %{name}-0.9.15-use_percentage_when_noly_energy_full_is_unavailable.patch
|
||||||
|
License: GPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: gtk-doc
|
||||||
|
BuildRequires: libdbus-devel
|
||||||
|
BuildRequires: libdbus-glib-devel
|
||||||
|
BuildRequires: libffi-devel
|
||||||
|
BuildRequires: libglib-devel
|
||||||
|
BuildRequires: libimobiledevice-devel
|
||||||
|
BuildRequires: libplist-devel
|
||||||
|
BuildRequires: libselinux-devel
|
||||||
|
BuildRequires: libusb-devel
|
||||||
|
BuildRequires: libz-devel
|
||||||
|
BuildRequires: pkg-config
|
||||||
|
BuildRequires: polkit-devel
|
||||||
|
BuildRequires: udev-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildRequires: gobject-introspection-devel
|
||||||
|
BuildRequires: libimobiledevice-devel >= 1.1.4
|
||||||
|
BuildRequires: intltool
|
||||||
|
BuildRequires: libelf-devel
|
||||||
|
Requires: libimobiledevice >= 1.1.4
|
||||||
|
Obsoletes: DeviceKit-power
|
||||||
|
Provides: DeviceKit-power
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
|
|
||||||
|
%description
|
||||||
|
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.UPower service via the system message bus. Some operations (such as suspending the system) are restricted using PolicyKit.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Devel package for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
Obsoletes: DeviceKit-power-devel
|
||||||
|
Provides: DeviceKit-power-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
UPower (formerly DeviceKit-power) provides a daemon, API and command line tools for managing power devices attached to the system.
|
||||||
|
|
||||||
|
This package contains libraries and header files need for development.
|
||||||
|
|
||||||
|
%package static
|
||||||
|
Summary: Static package for %{name}
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release}
|
||||||
|
|
||||||
|
%description static
|
||||||
|
UPower (formerly DeviceKit-power) provides a daemon, API and command line tools for managing power devices attached to the system.
|
||||||
|
|
||||||
|
This package contains static libraries need for development.
|
||||||
|
|
||||||
|
%package apidocs
|
||||||
|
Summary: %{name} API documentation
|
||||||
|
Group: Documentation
|
||||||
|
Requires: gtk-doc
|
||||||
|
|
||||||
|
%description apidocs
|
||||||
|
UPower (formerly DeviceKit-power) provides a daemon, API and command
|
||||||
|
line tools for managing power devices attached to the system.
|
||||||
|
|
||||||
|
This package contains %{name} API documentation.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
|
||||||
|
%setup -q
|
||||||
|
#%patch0 -p1
|
||||||
|
#%patch1 -p1
|
||||||
|
#%patch2 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure \
|
||||||
|
--enable-gtk-doc \
|
||||||
|
--enable-introspection
|
||||||
|
|
||||||
|
%make
|
||||||
|
|
||||||
|
%install
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
%makeinstall
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files -f %{name}.lang
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_sysconfdir}/UPower
|
||||||
|
%config %{_sysconfdir}/UPower/UPower.conf
|
||||||
|
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.UPower.conf
|
||||||
|
%{_bindir}/upower
|
||||||
|
%dir %{_localstatedir}/lib/upower
|
||||||
|
%{_libexecdir}/upowerd
|
||||||
|
%{_libdir}/libupower-glib.so.*
|
||||||
|
#%{_libdir}/libdevkit-power-gobject.so.*
|
||||||
|
%{_libdir}/girepository-*/UPowerGlib-*.typelib
|
||||||
|
/lib/udev/rules.d/95-upower-battery-recall-*.rules
|
||||||
|
/lib/udev/rules.d/95-upower-csr.rules
|
||||||
|
/lib/udev/rules.d/95-upower-hid.rules
|
||||||
|
/lib/udev/rules.d/95-upower-wup.rules
|
||||||
|
/lib/systemd/system-sleep/notify-upower.sh
|
||||||
|
/lib/systemd/system/upower.service
|
||||||
|
%{_datadir}/dbus-1/interfaces/*.xml
|
||||||
|
%{_datadir}/dbus-1/system-services/*.service
|
||||||
|
%{_datadir}/polkit-1/actions/*.policy
|
||||||
|
%{_mandir}/man1/upower.1.gz
|
||||||
|
%{_mandir}/man7/UPower.7.gz
|
||||||
|
%{_mandir}/man8/upowerd.8.gz
|
||||||
|
%doc AUTHORS COPYING
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_includedir}/libupower-glib
|
||||||
|
%{_includedir}/libupower-glib/*.h
|
||||||
|
%{_libdir}/libupower-glib.so
|
||||||
|
%{_libdir}/pkgconfig/upower-glib.pc
|
||||||
|
%{_datadir}/gir-*/UPowerGlib-*.gir
|
||||||
|
%doc HACKING NEWS README
|
||||||
|
|
||||||
|
%files static
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/libupower-glib.*a
|
||||||
|
|
||||||
|
%files apidocs
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_datadir}/gtk-doc/html/UPower
|
||||||
|
%{_datadir}/gtk-doc/html/UPower/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Oct 28 2013 Automatic Build System <autodist@mambasoft.it> 0.9.23-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sat Jul 27 2013 Automatic Build System <autodist@mambasoft.it> 0.9.21-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Tue Mar 19 2013 Automatic Build System <autodist@mambasoft.it> 0.9.20-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Mon Jan 07 2013 Automatic Build System <autodist@mambasoft.it> 0.9.19-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Sat Aug 11 2012 Automatic Build System <autodist@mambasoft.it> 0.9.18-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Mon May 14 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.16-1mamba
|
||||||
|
- update to 0.9.16
|
||||||
|
|
||||||
|
* Tue Feb 28 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.15-2mamba
|
||||||
|
- added a patch to use percentage (capacity) when energy_full or charge_full is not provided by driver
|
||||||
|
|
||||||
|
* Tue Feb 28 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.15-1mamba
|
||||||
|
- update to 0.9.15
|
||||||
|
|
||||||
|
* Fri Oct 07 2011 Automatic Build System <autodist@mambasoft.it> 0.9.14-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Mon Oct 03 2011 Automatic Build System <autodist@mambasoft.it> 0.9.13-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
* Tue Jul 26 2011 Automatic Build System <autodist@mambasoft.it> 0.9.12-1mamba
|
||||||
|
- update to 0.9.12
|
||||||
|
|
||||||
|
* Sat Jun 25 2011 Automatic Build System <autodist@mambasoft.it> 0.9.11-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Fri Jan 28 2011 Automatic Build System <autodist@mambasoft.it> 0.9.8-1mamba
|
||||||
|
- automatic update by autodist
|
||||||
|
|
||||||
|
* Fri Oct 01 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.5-2mamba
|
||||||
|
- rebuilt in openmamba devel
|
||||||
|
|
||||||
|
* Wed Sep 22 2010 gil <puntogil@libero.it> 0.9.5-1mamba
|
||||||
|
- package created by autospec
|
Loading…
Reference in New Issue
Block a user