File gnome-power-manager.spec of Package gnome-power-manager

#
# spec file for package gnome-power-manager (Version 2.24.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           gnome-power-manager
BuildRequires:  PolicyKit-gnome-devel docbook-utils docbook_4 fdupes
BuildRequires:  gnome-common gnome-doc-utils-devel gnome-panel-devel
BuildRequires:  gnome-patch-translation gstreamer010-devel intltool
BuildRequires:  libglade2-devel libgnomeprintui-devel libgnomeui-devel
BuildRequires:  libnotify-devel libwnck-devel notification-daemon
BuildRequires:  scrollkeeper update-desktop-files xmlto
Version:        2.24.0
Release:        1
Url:            http://gnome-power.sourceforge.net/
Group:          System/GUI/GNOME
License:        GPL v2 or later
Summary:        Power Management for GNOME
Source:         ftp://ftp.gnome.org/pub/gnome/sources/%{name}/2.16/%{name}-%{version}.tar.bz2
Source1:        gpm-icons.tar.bz2
# PATCH-FEATURE-OPENSUSE gnome-power-manager-desktop.patch
Patch:          gnome-power-manager-desktop.patch
# PATCH-FIX-OPENSUSE gpm-zh_CN-translation.patch
Patch8:         gpm-zh_CN-translation.patch
# PATCH-FEATURE-OPENSUSE gnome-power-manager-system-policy.patch -- acquire Policy Power interface
Patch9:         gnome-power-manager-system-policy.patch
Requires:       PolicyKit hal dbus-1 gnome-screensaver notification-daemon
Requires:       %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on
%gconf_schemas_prereq

%description
GNOME Power Manager is a session daemon that takes care of power
management.

GNOME Power Manager uses information provided by HAL to display icons
and handle system and user actions in a GNOME session. Authorized users
can set policy and change preferences.

GNOME Power Manager acts as a policy agent on top of the Project Utopia
stack, which includes the kernel, hotplug, udev, and HAL. GNOME Power
Manager listens for HAL events and responds with user-configurable
reactions.



Authors:
--------
    Richard Hughes <richard@hughsie.com>

%lang_package
%prep
%setup -q -b 1
#gnome-patch-translation-prepare
%patch
# FIXME: patch8 doesn't apply.  A Chinese speaker should determine whether we
# want to keep our translation from previous versons of gnome-power-manager or
# to use the one that now comes out of the box.
#%patch8
%patch9
#gnome-patch-translation-update

%build
autoreconf -f -i
%configure \
    --libexecdir=%{_prefix}/lib/gnome-power-manager \
    --disable-schemas-install \
    --disable-scrollkeeper \
    --with-dbus-sys=/etc/dbus-1/system.d \
    --with-dbus-services=/usr/share/dbus-1/services \
    --enable-libnotify \
    --disable-icon-framing \
    --disable-policykit
# We'll reenable this once upstream fixes it.
#    --enable-policykit
make htmldocdir=%{_docdir}/%{name}/spec %{?jobs:-j %jobs}

%install
%makeinstall htmldocdir=%{_docdir}/%{name}/spec
cp -a AUTHORS COPYING ChangeLog HACKING NEWS README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/
cp -r ../gpm-icons/*.png $RPM_BUILD_ROOT%{_datadir}/gnome-power-manager/
%suse_update_desktop_file gnome-power-preferences System X-SuSE-ControlCenter-System
%find_lang %{name}
%find_gconf_schemas
cat %{name}.schemas_list >%{name}.lst
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre
%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%files -f %{name}.lst
%defattr (-, root, root)
%{_prefix}/%{_lib}/bonobo/servers/GNOME_BrightnessApplet.server
%{_prefix}/%{_lib}/bonobo/servers/GNOME_InhibitApplet.server
%{_datadir}/gnome-2.0/ui/GNOME_BrightnessApplet.xml
%{_datadir}/gnome-2.0/ui/GNOME_InhibitApplet.xml
%doc %{_docdir}/%{name}
%{_bindir}/*
%{_datadir}/applications/*.desktop
%config %{_datadir}/gnome/autostart/*.desktop
%{_datadir}/gnome-power-manager
%{_datadir}/omf/gnome-power-manager
%{_datadir}/icons/hicolor/*/apps/*
%doc %{_mandir}/man?/*.*
%config /usr/share/dbus-1/services/gnome-power-manager.service
# FIXME: Directory ownership.
%dir %{_datadir}/gnome/autostart
%{_prefix}/lib/gnome-power-manager

%files lang -f %{name}.lang

%changelog
* Thu Sep 25 2008 rodrigo@novell.com
- Update to version 2.24.0:
  + Fixed bgo#547502, gnome-power-manager won't configure
  + Fixed bgo#547766, Crash in gpm_cell_array_update gpm-cell-array.c:273
  + Fixed bgo#549789, "unknown" battery type untranslated
  + Fixed bgo#549844, DBUS times out after longer suspends
  + Fixed bgo#549854, gpm-cell.c not translator friendly
  + Updated translations
- Updated gnome-power-manager-system-policy.patch to use egg_debug
* Thu Sep 18 2008 rodrigo@suse.de
- Moved schemas-only gnome-power-manager-energy-star.patch to
  gconf2-branding-openSUSE package
* Fri Sep 12 2008 hmacht@suse.de
- gnome-power-manager-energy-star.patch: Enable Energy Star
  compliant default configuration (fate#304708)
* Tue Sep 02 2008 mboman@novell.com
- Update to version 2.23.91:
  + Fixed bgo#547502, gnome-power-manager won't configure
  + Fixed bgo#547766, Crash in gpm_cell_array_update gpm-cell-array.c:273
  + Fixed bgo#549789, "unknown" battery type untranslated
  + Fixed bgo#549854, gpm-cell.c not translator friendly
  + Translation updates
* Fri Aug 08 2008 captain.magnus@opensuse.org
- Update to version 2.23.6:
  - Fixed bgo#544298, gpm 2.23.3 fails to compile (Richard Hughes)
  - Fixed bgo#546556, g-p-m unable to startup on Solaris Sparc because of
  missing XRandr (Simon Zheng)
  - Supress low battery warning on Eee as it's reported as non-rechargeable
  (Matthew Garrett)
  - Use polkit-simple to simplify the optional PolicyKit bits
  Richard Hughes)
  - Completely remove all traces of the skipping suppressed action warning
  (Richard Hughes)
  - Don't use a libnotify window for the battery information, use a
  GtkDialog instead (Richard Hughes)
* Sat Jul 26 2008 captain.magnus@opensuse.org
- Update to version 2.23.3:
  + Fixed bgo#483144, Gconf key for battery brightness labeled incorrectly... (Richard Hughes)
  + Fixed bgo#492132, policy timeout prevents computer from suspend (Richard Hughes)
  + Fixed bgo#517914, Inconsistent colors of graphs (Richard Hughes)
  + Fixed bgo#521686, Removing gnome_program_init removes session management (Richard Hughes)
  + Fixed bgo#522078, aborts when suspend is chosen when running under GDM (Richard Hughes)
  + Fixed bgo#522236, g-p-m should set a window type hint for the brightness feedback window (Richard Hughes)
  + Fixed bgo#522336, Change Playbin state back to NULL on error and EOS : fix potential memory leak when using pulsaudio (Richard Hughes)
  + Fixed bgo#523152, GetBrightness returns a INT not a UINT (Richard Hughes)
  + Fixed bgo#524449, gnome-power-preferences gives a critical warning (Richard Hughes)
  + Fixed bgo#526178, Should check user capability "CanShutdown" before providing shutdown option in combo box (simon.zheng)
  + Fixed bgo#526349, gnome-power-bugreport.sh doesn't work on Solairs (simon.zheng)
  + Fixed bgo#534335, cpu load calculation doesn't work on Solaris (simon.zheng)
  + Fixed bgo#535271, XBACKLIGHT is very slow (Richard Hughes)
  + Fixed bgo#536956, Should remove cpufreq_show gconf key (simon.zheng)
* Tue Jun 17 2008 maw@suse.de
- Update to version 2.23.1:
  + Fix a bunch of build warnings with glib trunk
  + Use Unique to make g-p-p and g-p-s single instance
  + Add a default button for GConf settings
  + Remove all the hidden cpufreq code
  + Use the same logic for xrandr as hal when we have a large
  number of brightness steps
  + Clear the brightness applet background properly so we can draw
  on it later
  + Remove the lid sounds. Everbody hates them
  + Add new functionality allowing us to change the backlight
  brightness using XRANDR
  + Make the backlight do what the user expects rather than what
  the policy says
  + Bugs fixed: bgo#526178, bgo#526349, bgo#522236, bgo#522078,
  bgo#517914, bgo#524449, bgo#108075, brc#444026, and brc#443069
  + Updated translations
- Respin gnome-power-manager-system-policy.patch
- Drop obsolete patch: gnome-power-manager-initialize-vars.patch.
* Mon May 19 2008 rodrigo@suse.de
- Tag patches
* Wed Apr 02 2008 maw@suse.de
- Update to version 2.22.1:
  + Bugs fixed: bgo#517914, bgo#521686, bgo#522078, bgo#522236,
  bgo#522336, bgo#523152, and bgo#524449
  + Updated translations.
* Wed Mar 19 2008 maw@suse.de
- Disable policykit support pending upstream fixes.
* Fri Mar 14 2008 maw@suse.de
- Update to version 2.22.0:
  + Bugs fixed: bgi#514590 and bgo#520411
  + Add some missing finaliser calls
  + Updated translations.
* Thu Mar 13 2008 sbrabec@suse.cz
- Custom look'n'feel gconf keys moved to gconf2-branding-openSUSE.
- Removed outdated translations.
* Wed Mar 05 2008 maw@suse.de
- Update to version 2.21.92:
  + Bugs fixed: bgo#507789, bgo#510068, bgo#512267, and bgo#514077
  + Updated translations
- Build with PolicyKit enabled.
* Wed Jan 30 2008 rodrigo@suse.de
- Update to version 2.21.1:
  * Fixed bgo#13360, After loading gnome gpm starts but shows
  nothing in tray icon despite option
  * Fixed bgo#474973, Lack of context to translate
  * Fixed bgo#497298, The +/- buttons on the brightness applet
  sometimes get stuck
  * Fixed bgo#497298, Avoid float computation error
  * Fixed bgo#497328, Incorrect documentation for --enable-checkfg
  * Fixed bgo#496367, Work out the size of the label text to avoid
  truncating numbers in other locales
  * Correct much of the documentation in many different ways
  * Use _NEVER for sleep problems notification, so that the user
  can always see it
  * Pass make distcheck on a desktop machine without a battery
  * Fix the keyboard brightness up button
  * Use the correct DBUS return types now HAL enforces the return type
  * Rip out GpmWebcam
  * Updated translations
- Removed upstreamed patches
* Thu Nov 29 2007 rodrigo@suse.de
- Added upstreamed patch to leave the sleep error notification up
  until dismissed by the user (#241440)
* Thu Nov 08 2007 rodrigo@suse.de
- Enable cpufreq settings by default (#222021)
* Tue Oct 02 2007 sreeves@suse.de
- Fix for 310273 - brightness problems
* Tue Sep 18 2007 maw@suse.de
- Update to version 2.20.0:
  + Fix for bugzilla.gnome.org #470481
  + Updated translations.
* Wed Sep 12 2007 rodrigo@suse.de
- Disable PolicyKit, upstream is not ported to last release (#302413)
* Mon Sep 10 2007 cthiel@suse.de
- update to version 2.19.92
  * Bugs (bugzilla.gnome.org)
  [#449274], Application specific icons are installed in the wrong directory
  [#462109], make distcheck fails on my laptop
  [#462347], Use new tooltip API of GTK 2.12
  [#467094], Typo 'the the' in two messages
  [#468509], Some grammar issues
  [#468825], Possible error in GUI text strings
  * Updated translations
* Mon Sep 10 2007 rodrigo@suse.de
- Remove patch that calls Yast2 PM module (#302413)
* Wed Aug 08 2007 maw@suse.de
- Use %%fdupes
- Split off a -lang subpackage.
* Thu Aug 02 2007 maw@suse.de
- Update to version 2.19.6:
  + Bugs (bugzilla.gnome.org) fixed: #405421, #436717, #445173,
  [#448570], #450154, #453853, #455148, #455499, #457414, #458609,
  [#458613], #459099, #459747, #406144, #411932, #413642, #422124,
  [#423289], #433367, #442425, #448570, #450154, #450362, #451241,
  [#452244], and #453721
  + Updated translations
- Add gnome-power-manager-initialize-vars.patch
- Use %%fdupes.
* Mon Jul 09 2007 maw@suse.de
- Update to version 2.19.3
- Fixes for bugzilla.gnome.org #359089, #393388, #414032, #418605,
  [#419403], #437042, #437920, #428401, #438838,  #440409,
  and #445173
- Updated translations
* Thu Jun 07 2007 sbrabec@suse.cz
- Removed invalid desktop Category "Application" (#254654).
* Mon May 14 2007 pgajdos@suse.cz
- removed gnome-icon-theme from Requires and BuildRequires
  [#247450]
* Wed Apr 11 2007 maw@suse.de
- Update to version 2.18.2
- Fixes for b.g.o #422345 and #425000
- Updated translations for various locales.
* Fri Mar 30 2007 maw@suse.de
- Update to version 2.18.0
- b.g.o 414311, 412345, 414010, 411592, 407613, 408705, 383653,
  and 407613.
* Fri Mar 09 2007 maw@suse.de
- Update to version 2.17.91, which brings us:
- General fixes:
 - Fixed #402823, crash in Power Manager: It had crashed when I re...
 - Fixed #406529, Crashed at login
 - Fixed #400006, Brightness applet doesn't indicate whether it's working
 - Fixed #400654, segfault on ppc architecture since upgrade to 2.17.90
 - Fixed #402230, [Typo] Case after the string 'Status:'
 - Fixed #403156, leak reported by valgrind
 - Fixed #404929, Multiple mouse battery entries after suspend/resume cycle
 - Fixed #405013, should provide the ability to halt/suspend/hibernate..
- New translations:
 - Updated fr: Stéphane Raimbault
 - Updated zh_HK: Woodman Tuen
 - Updated pt_BR: Leonardo Ferreira Fontenelle
 - Updated ca: Jordi Mas
 - Updated zh_TW: Woodman Tuen
 - Updated sv: Daniel Nylander
 - Updated ar: Djihed Afifi
 - Updated th: Theppitak Karoonboonyanan
 - Updated en_GB: David Lodge
* Wed Mar 07 2007 sbrabec@suse.cz
- Updated BuildRequires: PolicyKit -> PolicyKit-devel.
* Mon Jan 22 2007 sbrabec@suse.cz
- Prefix changed to /usr.
- Spec file cleanup.
- Enabled PolicyKit support.
* Tue Nov 14 2006 sbrabec@suse.cz
- Use translation compendium gnome-patch-translation (#220304).
* Tue Oct 31 2006 rodrigo@suse.de
- Removed custom autostart installation directory patch.
* Tue Oct 24 2006 rodrigo@suse.de
- Removed unneeded gnome-power-manager-disable-actions.patch.
- Fixed gnome-power-manager-yast-settings.patch to match variable
  names changes.
* Mon Oct 16 2006 danw@suse.de
- Remove dead patches
- Update and re-enable gnome-power-manager-yast-settings.patch and
  gnome-power-manager-disable-actions.patch
* Fri Oct 13 2006 ro@suse.de
- added gnome-doc-utils-devel to buildreq
* Mon Oct 09 2006 hmacht@suse.de
- add temporary patch to grab org.freedesktop.Policy.Power system
  interface on startup
* Wed Oct 04 2006 jhargadon@suse.de
- update to version 2.16.1
- Use the step value we computed (rather than one) to fix pressing
  brightness-down on the Macbook Pro
- Remove the FIXME to fix #334212. It's breaking more laptops that it
  was intended to fix and also breaks my (already broken) iBook
- Also ignore DBUS_GERROR_REMOTE_EXCEPTION as this prevents the
  'HAL failed to suspend' when actually it suspended fine but the bus
  timed out.
- Fix a couple of small memory leaks where we don't free an icon name.
 - Don't rescan buttons every minute. #356170.
 - Fix hotplug add and remove of wireless mice.
 - Add the new battery types so we don't print a warning with
  newer than HAL 0.5.8.1
 - Increase dep of libgnome to 2.14.0 because we are using
  GNOME_PARAM_GOPTION_CONTEXT, which was introduced in 2-14
- translation updates
* Fri Sep 29 2006 rodrigo@suse.de
- Removed gnome-power-manager-powersave-dbus.patch, we don't connect
  to the powersave daemon anymore.
- Move the part of the patch to add the YAST button to its own file.
* Thu Sep 14 2006 jhargadon@suse.de
- update to version 2.16.0
- Turn off Werror in configure. #352448
- Be more specific for our device checks in the expanded device information
  to fix the display of CSR properties. rh:203849
- Fix some small memory leaks. (Paolo Borelli) #352858.
- translation updates
* Thu Aug 31 2006 jhargadon@suse.de
- update to version 2.15.92
- Fix a double free in the new smartcard code
- Work round a compiler bug which caused compilation to fail when using a
  high optimising setting
- Beep to warn if the suspend or hibernate failed
- Fix up the desktop files with the version number
- Change the spelling of loose to lose throughout the project
- Add a copy of the 24x24 icons instead of generating them at install time.
  Doing clever tricks with imagemagick didn't work very well
- Add a timed exit option to the daemon
- translation updates
* Wed Aug 23 2006 jhargadon@suse.de
- update to version 2.15.91
- Turn on the monitor unconditionally, as we may be using a smart-card to
  authenticate and DPMS might still be on
- Hide the 'Device Information' window if we have no devices
- Add in an extra battery charged check to avoid repetition in the battery
  charged notification under some circumstances
- Make gnome-screensaver connection more resilient to bus failures.
- Poll all the buttons every minute to detect a silent lid close event.
- Reset the action timer after an ac_adapter event has been received.
- Add support for different DPMS sleep modes to support broken monitors
- Make the precision of the power supply and power rate more reasonable.
- Install the 24x24 icons to get rid of the fuzzyness of the tray icon in some
  circumstances.
- Fix a crasher where the g-s timeout was larger than the max range for
  gnome-power-preferences.
* Mon Jun 26 2006 gekker@suse.de
- Update translations for cs de es fr it ja pt_BR zh_CN zh_TW
* Sat Jun 17 2006 gekker@suse.de
- Update translations for hu
* Thu Jun 08 2006 gekker@suse.de
- Update translations for zh_CN for zsu (#179552)
* Tue Jun 06 2006 rodrigo@suse.de
- Fixed layout of baterry preferences page (#179110)
* Fri Apr 21 2006 rodrigo@suse.de
- Added patch that makes gpm respond correctly to systray crashes
  (#165471)
* Thu Apr 13 2006 sbrabec@suse.cz
- Call %%suse_update_desktop_file.
- Use new control-center Categories instead of old ones.
- File list fix.
* Mon Apr 03 2006 rodrigo@suse.de
- Return NOT_YET_HANDLED for dbus messages we don't handle in the
  powersave_filter_function (#162807).
* Fri Mar 31 2006 rodrigo@suse.de
- Added code to query the powersave daemon for suspend/hibernate
  availability. And added a button to open yast power management
  applet (#158105)
* Fri Mar 31 2006 rodrigo@suse.de
- Added gnome-power-manager-disable-actions.patch to disable
  handling of powersave button events (#157477).
* Wed Mar 29 2006 dobey@suse.de
- Update icons tarball with 24x24 icons instead of 22x22, this
  changed upstream for the 2.14 release to 24x24, so we need to
  use this size to avoid blurry icons
* Tue Mar 28 2006 rodrigo@suse.de
- Updated gnome-power-manager-powersave-dbus.patch to handle
  apropriate signals from powersave dbus interface (#157477)
- Updated icons tarball with new art from UI team.
* Mon Mar 20 2006 rodrigo@suse.de
- Added gnome-power-manager-battery-removal.patch, fixes #158682.
* Tue Mar 14 2006 rodrigo@suse.de
- Updated to latest upstream release, which fixes the HAL part of
  [#150042].
- Updated gnome-screensaver-autostart.patch.
* Fri Mar 03 2006 rodrigo@suse.de
- Updated to 2.13.92, which fixes several bugs (#140871, #153594)
- Removed upstreamed patch.
* Mon Feb 27 2006 rodrigo@suse.de
- Establish connection to D-BUS powersave interface (#6196)
* Tue Feb 21 2006 dobey@suse.de
- Update new artwork
- Fixes missing new artwork for a couple of status icons and about
  box logo image
* Tue Feb 21 2006 dobey@suse.de
- Add in new icon artwork
* Thu Feb 09 2006 jpr@suse.de
- Pass extra param to prevent crash (#144346)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006 rodrigo@suse.de
- Reenable libnotify support.
* Mon Jan 23 2006 rodrigo@suse.de
- Use --sm-disable when running autostarted daemon.
* Wed Jan 18 2006 gekker@suse.de
- Disable scrollkeeper update during build
* Wed Jan 18 2006 mls@suse.de
- xsltproc -> libxslt
* Tue Jan 17 2006 rodrigo@suse.de
- Added xsltproc to neededforbuild.
* Tue Jan 17 2006 rodrigo@suse.de
- Updated to 0.3.4 releases.
- Removed obsolete patch.
- Fixed package dependencies and build problems.
* Mon Dec 12 2005 jpr@suse.de
- Update to cvs snapshot to work with latest hal
- Temporarily disable libnotify support
* Wed Nov 09 2005 rodrigo@suse.de
- Added X-GNOME-Autostart-enabled flag to autostart .desktop file.
- Made autostart .desktop file %%config.
* Wed Nov 09 2005 rodrigo@suse.de
- Added gnome-session-autostart.patch to include needed files for
  autostart implementation.
* Mon Oct 24 2005 ro@suse.de
- added hal to nfb
* Tue Oct 04 2005 rodrigo@suse.de
- Added gnome-power-manager-desktop.patch, to show the icon in the
  GNOME control center.
* Mon Oct 03 2005 rodrigo@suse.de
- Update to version 0.2.6.
- Removed upstreamed patches.
* Fri Sep 23 2005 gekker@suse.de
- Use RPM_OPT_FLAGS
- Fix uninitialized variables
- Fix strict aliasing
* Thu Sep 22 2005 rodrigo@suse.de
- Update to version 0.2.4.
- Added 64bit patch.
* Wed Sep 21 2005 rodrigo@suse.de
- Created template.
openSUSE Build Service is sponsored by