diff options
author | Mark McLoughlin <markmc@fedoraproject.org> | 2005-04-18 10:51:14 +0000 |
---|---|---|
committer | Mark McLoughlin <markmc@fedoraproject.org> | 2005-04-18 10:51:14 +0000 |
commit | dfa2410275cf66e63c2b51a38a2402e4ba67d9fe (patch) | |
tree | 64ccce8fa5902747b58ba3ca6585de91494052df | |
parent | cbf13876ddf9a4fcbf5f5643a275d7a293cc24f4 (diff) | |
download | gnome-panel-dfa2410275cf66e63c2b51a38a2402e4ba67d9fe.tar.gz gnome-panel-dfa2410275cf66e63c2b51a38a2402e4ba67d9fe.tar.xz gnome-panel-dfa2410275cf66e63c2b51a38a2402e4ba67d9fe.zip |
- Add the battery applet to the panel in %post if ACPI is available (buggnome-panel-2_10_1-2
#143828)
-rw-r--r-- | gnome-panel.spec | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/gnome-panel.spec b/gnome-panel.spec index de82ea2..bf6b8f6 100644 --- a/gnome-panel.spec +++ b/gnome-panel.spec @@ -23,7 +23,7 @@ Summary: GNOME panel Name: gnome-panel Version: 2.10.1 -Release: 1 +Release: 2 URL: http://www.gnome.org Source0: ftp://ftp.gnome.org/pub/GNOME/pre-gnome2/sources/gnome-panel/%{name}-%{version}.tar.bz2 Source1: redhat-panel-default-setup.entries @@ -150,17 +150,23 @@ touch --no-create %{_datadir}/icons/hicolor if [ -x /usr/bin/gtk-update-icon-cache ]; then gtk-update-icon-cache %{_datadir}/icons/hicolor fi + # # The applet needs apmd which is only build on ix86 -# Need to figure out what to do here with ACPI when APM is off # +pm_available=false %ifarch %{ix86} ppc -apm=false -if [ -f /proc/apm ]; then +if [ -f /proc/acpi/event ] ; then + for battery in /proc/acpi/battery/*/state; do + if grep 'present: *yes' $battery >/dev/null 2>&1; then + pm_available=true + fi + done +elif [ -f /proc/apm ]; then # Battery present if top bits are unset flag=$(cat /proc/apm | cut -d ' ' -f 6 | sed 's/0x\([0-9a-f]\)[0-9a-f]/\1/') if [ "$flag" == "0" ]; then - apm=true + pm_available=true fi fi %endif @@ -187,7 +193,7 @@ done gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup.entries > /dev/null gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup.entries /apps/panel > /dev/null -if [ "$apm" = "true" ]; then +if [ "$pm_available" = "true" ]; then gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup-battstat.entries > /dev/null gconftool-2 --direct --config-source=$GCONF_CONFIG_SOURCE --load %{_sysconfdir}/gconf/schemas/panel-default-setup-battstat.entries /apps/panel/applets/battstat_applet > /dev/null fi @@ -229,6 +235,10 @@ fi %{_datadir}/gtk-doc %changelog +* Mon Apr 18 2005 Mark McLoughlin <markmc@redhat.com> 2.10.1-2 +- Add the battery applet to the panel in %post if ACPI is + available (bug #143828) + * Mon Apr 4 2005 Mark McLoughlin <markmc@redhat.com> 2.10.1-1 - Update to 2.10.1 |