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

#
# spec file for package gnome-power-manager (Version 2.14.0)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           gnome-power-manager
BuildRequires:  gnome-common gnome-doc-utils gnome-patch-translation gnutls-devel intltool libglade2-devel libgnomeprintui-devel libgnomeui-devel libnotify-devel libwnck-devel mDNSResponder-devel perl-XML-Parser powersave-devel scrollkeeper update-desktop-files
Version:        2.14.0
Release:        25.40
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}/0.0/%{name}-%{version}.tar.bz2
Source1:        gpm-icons.tar.bz2
Source2:        %{name}-po.tar.bz2
Patch:          gnome-power-manager-desktop.patch
Patch1:         gnome-power-manager-autostart.patch
Patch3:         gnome-power-manager-powersave-dbus.patch
Patch4:         gnome-power-manager-battery-removal.patch
Patch5:         gnome-power-manager-disable-actions.patch
Patch6:         gnome-power-manager-165471.patch
Patch7:         gnome-power-manager-prefs-layout.patch
#Patch8:         mp-zh_CN.patch
Patch9:         gnome-power-manager-terminology.patch
Patch10:        gnome-power-manager-linguas.patch
Patch11:        gnome-power-manager-info.patch
Patch12:        gnome-power-manager-364835.patch
Patch13:        gnome-power-manager-373588-dont-call-networkmanager.patch
Patch14:        gnome-power-manager-energystar.patch
AutoReqProv:    on
Requires:       hal dbus-1 gnome-screensaver notification-daemon
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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>

%prep
%setup -b 1 -a 2
rename no nb po/no.*
sed "s/\(ALL_LINGUAS.*\) no /\1 nb /" configure.in > configure.in.tmp && mv configure.in.tmp configure.in
gnome-patch-translation-prepare
%patch
%patch1
%patch3 -p1
%patch4
%patch5 -p1
%patch6 -p1
%patch7 -p1
#%patch8
%patch9 -p1
gnome-patch-translation-update
%patch10
%patch11
%patch12
%patch13 -p1
%patch14

%build
# gnome-common intltool are needed only here
aclocal
automake -f -i
autoconf
intltoolize --force
CFLAGS="$RPM_OPT_FLAGS" \
./configure\
        --disable-schemas-install\
        --prefix=/opt/gnome\
        --libexecdir=/opt/gnome/lib/%{name}\
	--mandir=/opt/gnome/share/man\
	--sysconfdir=/etc/opt/gnome\
        --with-dbus-sys=/etc/dbus-1/system.d\
        --with-dbus-services=/usr/share/dbus-1/services\
        --disable-scrollkeeper\
	--enable-libnotify \
	--enable-experimental-features
make

%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%makeinstall
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
cp -r ../gpm-icons/*.png $RPM_BUILD_ROOT/opt/gnome/share/gnome-power-manager/
%suse_update_desktop_file gnome-power-preferences System X-SuSE-ControlCenter-System
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
export GCONF_CONFIG_SOURCE=`opt/gnome/bin/gconftool-2 --get-default-source`
opt/gnome/bin/gconftool-2 --makefile-install-rule etc/opt/gnome/gconf/schemas/gnome-power-manager.schemas >/dev/null

%files -f %{name}.lang
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog HACKING NEWS README TODO
/opt/gnome/bin/*
%config /opt/gnome/share/autostart/*.desktop
/opt/gnome/share/applications/*.desktop
/opt/gnome/share/gnome-power-manager
/opt/gnome/share/omf/gnome-power-manager
/etc/opt/gnome/gconf/schemas/*.schemas
%dir /etc/dbus-1/system.d
%config /etc/dbus-1/system.d/gnome-power-manager.conf
%config /usr/share/dbus-1/services/gnome-power-manager.service

%changelog
* Fri Apr 18 2008 - mauro@suse.de
- Updated translations.
* Thu Apr 17 2008 - rodrigo@suse.de
- Added gnome-power-manager-373588-dont-call-networkmanager.patch
  to disable NetworkManager calls (bnc#373588)
* Wed Apr 09 2008 - mauro@suse.de 
- Updated translations (fixing pt_BR issues in the process).
* Fri Mar 28 2008 - mauro@suse.de
- Updated translations.
* Mon Mar 24 2008 - rodrigo@suse.de
- Added patch to disable g-p-m reacting on low battery events. It
  now just shows the notification bubble to the user (bnc#364835)
* Fri Mar 14 2008 - mauro@suse.de 
- Updated translations.
* Fri Feb 22 2008 - mauro@suse.de
- Updated translations.
* Sat Feb 16 2008 - mauro@suse.de
- Updated translations
* Thu Nov 08 2007 - cgaisford@novell.com
- Patched the info code to remove all graphs and modified
  the label to have a space and have mW instead of mWh
  Bug #334651
* Tue Oct 30 2007 - mauro@suse.de
- Added patch for zh_CN.po files. This solves bug bnc # 179552.
* Tue Oct 23 2007 - cgaisford@novell.com
- Patched the info code to handle the delete_event correctly
  Bug #334651
* Mon Oct 22 2007 - cgaisford@novell.com
- Updated configure option in spec file with
  enable-experimental-features to obtain more battery info
  Bug #334651
* Thu Apr 19 2007 - maw@suse.de
- Update translations.
* Thu Apr 05 2007 - jhargadon@suse.de
- updated translations
* Sat Mar 03 2007 - jhargadon@suse.de
- updated Polish translations
* Fri Feb 16 2007 - jhargadon@suse.de
- updated translations from forgesvn1.novell.com
* Tue Feb 13 2007 - sbrabec@suse.cz
- Use translation compendium gnome-patch-translation.
* Thu Feb 01 2007 - cgaisford@novell.com
- Updated terminlogy for Sleep and Hibernate.  Also changed the
  icons for consitency with the rest of the desktop
  Novell #187817
* 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