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

#
# spec file for package gnome-power-manager
#
# Copyright (c) 2014 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:        3.10.1
Release:        0
Summary:        Power Management for GNOME
License:        GPL-2.0+
Group:          System/GUI/GNOME
Url:            http://gnome-power.sourceforge.net/
Source:         http://download.gnome.org/sources/gnome-power-manager/3.10/%{name}-%{version}.tar.xz
# 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-new-upower-api.patch mgorse@suse.com -- Port to upower 0.99.
Patch11:        gnome-power-manager-new-upower-api.patch
BuildRequires:  docbook-utils-minimal
BuildRequires:  fdupes
# For directory ownership
BuildRequires:  gnome-icon-theme
BuildRequires:  gnome-patch-translation
BuildRequires:  intltool
BuildRequires:  libupower-glib-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gdk-3.0) >= 2.91.7
BuildRequires:  pkgconfig(glib-2.0) >= 2.36.0
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.3.8
%if 0%{?BUILD_FROM_VCS}
BuildRequires:  gnome-common
%endif
Requires:       gnome-session-core
Requires:       upower
Recommends:     %{name}-lang
# The -brightness and -inhibit-powersave applets are no longer provided in 2.91+
Obsoletes:      gnome-applets-brightness < %{version}
Obsoletes:      gnome-applets-inhibit-powersave < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

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

%lang_package
%prep
%setup -q
translation-update-upstream
#gnome-patch-translation-prepare
# Needs rebase:
#patch10 -p1
%patch11 -p1
#gnome-patch-translation-update

%if 0%{?BUILD_FROM_VCS}
[ -x ./autogen.sh ]  && NOCONFIGURE=1 ./autogen.sh
%endif

%build
%configure \
    --disable-scrollkeeper
%{__make} %{?jobs:-j %jobs} V=1

%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%suse_update_desktop_file gnome-power-statistics
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}

%clean
rm -rf %{buildroot}

%post
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post
%icon_theme_cache_post HighContrast

%postun
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun
%icon_theme_cache_postun HighContrast

%files
%defattr (-, root, root)
%doc AUTHORS COPYING NEWS README
%{_bindir}/gnome-power-statistics
%{_datadir}/applications/gnome-power-statistics.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.power-manager.gschema.xml
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/HighContrast/
%doc %{_mandir}/man1/gnome-power-statistics.*
%dir %{_datadir}/appdata/
%{_datadir}/appdata/gnome-power-statistics.appdata.xml

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by