[tint2] Adding tint2-add-power-now-support.patch (BZ#709821)
Germán A. Racca
skytux at fedoraproject.org
Wed Jul 20 18:40:16 UTC 2011
commit 5acecea16bafe7bdcb9dabc847000b78d39f0941
Author: Lukas Zapletal <lzap+git at redhat.com>
Date: Wed Jun 1 20:08:59 2011 +0200
Adding tint2-add-power-now-support.patch (BZ#709821)
tint2-add-power-now-support.patch | 25 +++++++++++++++++++++++++
tint2.spec | 8 +++++++-
2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/tint2-add-power-now-support.patch b/tint2-add-power-now-support.patch
new file mode 100644
index 0000000..42bd659
--- /dev/null
+++ b/tint2-add-power-now-support.patch
@@ -0,0 +1,25 @@
+Description: add support for power_now battery attribute
+ starting from linux 2.6.36 my thinkpad does only offer
+ a power_now attribute in the sysfs.
+Author: Sebastian Reichel <elektranox at gmail.com>
+
+diff --git a/src/battery/battery.c b/src/battery/battery.c
+index 4bbde3c..2051c68 100644
+--- a/src/battery/battery.c
++++ b/src/battery/battery.c
+@@ -184,8 +184,14 @@ void init_battery()
+ }
+ g_free(path2);
+ }
+- if (path_energy_now && path_energy_full) {
++
++ path_current_now = g_build_filename(battery_dir, "power_now", NULL);
++ if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
++ g_free(path_current_now);
+ path_current_now = g_build_filename(battery_dir, "current_now", NULL);
++ }
++
++ if (path_energy_now && path_energy_full) {
+ path_status = g_build_filename(battery_dir, "status", NULL);
+
+ // check file
diff --git a/tint2.spec b/tint2.spec
index 08c9ab9..893e4cb 100644
--- a/tint2.spec
+++ b/tint2.spec
@@ -1,6 +1,6 @@
Name: tint2
Version: 0.11
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A lightweight X11 desktop panel and task manager
Group: User Interface/Desktops
@@ -15,6 +15,8 @@ BuildRequires: libXinerama-devel imlib2-devel
BuildRequires: libXdamage-devel libXcomposite-devel
BuildRequires: libXrender-devel libXrandr-devel
+Patch0: %{name}-add-power-now-support.patch
+
%description
tint2 is a simple panel/taskbar made for modern X window managers. It was
specifically made for Openbox3 but should also work with other window managers
@@ -22,6 +24,7 @@ specifically made for Openbox3 but should also work with other window managers
%prep
%setup -q
+%patch0 -p1
%build
mkdir -p build
@@ -54,6 +57,9 @@ rm -rf %{buildroot}
%{_mandir}/man1/%{name}.*
%changelog
+* Wed Jun 01 2011 Lukas Zapletal <lzap+rpm[@]redhat.com> - 0.11-4
+- Adding tint2-add-power-now-support.patch (BZ#709821)
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list