File gnome-power-manager.spec of Package gnome-power-manager
#
# spec file for package gnome-power-manager (Version 2.31.91)
#
# Copyright (c) 2010 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/
#
Name: gnome-power-manager
Version: 2.31.91
Release: 1
# FIXME: verify if sed hack to enable deprecated symbols can be removed with next update.
License: GPLv2+
Summary: Power Management for GNOME
Url: http://gnome-power.sourceforge.net/
Group: System/GUI/GNOME
Source: ftp://ftp.gnome.org/pub/gnome/sources/%{name}/2.16/%{name}-%{version}.tar.bz2
# PATCH-NEEDS-REBASE gnome-power-manager-schedule-wakeups.patch gburt fate302448 -- add tab to prefs to schedule rtcwake (was PATCH-FEATURE-OPENSUSE)
Patch10: gnome-power-manager-schedule-wakeups.patch
# PATCH-FEATURE-UPSTREAM gnome-power-manager-notify-idle-sleep.patch hmacht bnc#439018 bgo575467 -- notify user about auto suspend when returning from sleep
Patch12: gnome-power-manager-notify-idle-sleep.patch
# PATCH-FIX-OPENSUSE gnome-power-manager-no-fallback-to-hibernate.patch hmacht@suse.de bnc#440410
Patch14: gnome-power-manager-no-fallback-to-hibernate.patch
BuildRequires: docbook-utils
BuildRequires: fdupes
BuildRequires: gnome-doc-utils-devel
BuildRequires: gnome-panel-devel
BuildRequires: gnome-patch-translation
BuildRequires: intltool
BuildRequires: libcanberra-devel
BuildRequires: libgnome-keyring-devel
BuildRequires: libnotify-devel
BuildRequires: libunique-devel
BuildRequires: libupower-glib-devel
BuildRequires: libwnck-devel
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: xmlto
Requires: %{name}-lang = %{version}
Requires: gnome-session
Requires: upower
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%gconf_schemas_prereq
%description
GNOME Power Manager is a GNOME session daemon that acts as a policy
agent. It listens for system events and responds with
user-configurable actions.
%package -n gnome-applets-brightness
License: GPLv2+
Summary: A GNOME panel applet to control brightness on laptop screens
Group: System/GUI/GNOME
Requires: %{name} = %{version}
%description -n gnome-applets-brightness
GNOME Power Manager is a GNOME session daemon that acts as a policy
agent. It listens for system events and responds with
user-configurable actions.
This package provides an applet to control brightness on your laptop
screen.
%package -n gnome-applets-inhibit-powersave
License: GPLv2+
Summary: A GNOME panel applet to disable and reenable power saving
Group: System/GUI/GNOME
Requires: %{name} = %{version}
%description -n gnome-applets-inhibit-powersave
GNOME Power Manager is a GNOME session daemon that acts as a policy
agent. It listens for system events and responds with
user-configurable actions.
This package provides an applet to disable and reenable powersaving on
the fly.
%lang_package
%prep
%setup -q
translation-update-upstream
gnome-patch-translation-prepare
# Needs rebase:
#%patch10 -p1
%patch12 -p1
%patch14 -p1
gnome-patch-translation-update
%build
# Hack to support gtk 2.21.6 building. We need some deprecated symbols.
sed -i "s/-DGDK_DISABLE_DEPRECATED//" configure
%configure \
--libexecdir=%{_libexecdir}/gnome-power-manager \
--disable-schemas-install \
--disable-scrollkeeper
%{__make} %{?jobs:-j %jobs}
%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%suse_update_desktop_file gnome-power-preferences
%suse_update_desktop_file gnome-power-manager
%suse_update_desktop_file gnome-power-statistics
%find_lang %{name}
%find_gconf_schemas
cat %{name}.schemas_list >%{name}.lst
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%pre -f %{name}.schemas_pre
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%files -f %{name}.lst
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog HACKING NEWS README TODO
%{_bindir}/*
%{_sbindir}/gnome-power-backlight-helper
%{_sysconfdir}/xdg/autostart/*.desktop
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/gnome-power-manager.service
%{_datadir}/gnome-power-manager
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/polkit-1/actions/org.gnome.power.policy
%doc %{_mandir}/man?/*.*
%dir %{_libexecdir}/gnome-power-manager
%files -n gnome-applets-brightness
%defattr(-, root, root)
%{_libdir}/bonobo/servers/GNOME_BrightnessApplet.server
%{_libexecdir}/gnome-power-manager/gnome-brightness-applet
%{_datadir}/gnome-2.0/ui/GNOME_BrightnessApplet.xml
%files -n gnome-applets-inhibit-powersave
%defattr(-, root, root)
%{_libdir}/bonobo/servers/GNOME_InhibitApplet.server
%{_libexecdir}/gnome-power-manager/gnome-inhibit-applet
%{_datadir}/gnome-2.0/ui/GNOME_InhibitApplet.xml
%files lang -f %{name}.lang
%changelog