File gnome-reset.spec of Package gnome-reset

#
# spec file for package gnome-reset
#
# Copyright (c) 2011 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-reset
License:        GPLv2+
Group:          System/GUI/GNOME
AutoReqProv:    on
Version:        0.1.2
Release:        81
Summary:        Back Up and Reset GNOME Settings
Url:            http://www.gnome.org
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gnome-reset-bnc545980.patch bnc#545980 dimstar@opensuse.org -- Taken from upstream git.
Patch0:         gnome-reset-bnc545980.patch
BuildRequires:  fdupes glib2-devel intltool python update-desktop-files
Requires:       python-gnome python-xml
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%py_requires
%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%define python_sitearch %{py_sitedir}
%endif

%description
Allows users to back up or reset their GNOME settings. The settings are
saved to a single file so users can send their settings.

%lang_package
%prep
%setup
%patch0 -p1

%build
autoreconf -fi
intltoolize --force
%configure \
    --libexecdir=/usr/%_lib/gnome-reset \
    --localstatedir=/var/%_lib
make %{?jobs:-j %jobs}

%install
%makeinstall
%suse_update_desktop_file gnome-reset
%suse_update_desktop_file gnome-reset-restore
%find_lang %{name} %{?no_lang_C}
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post
%desktop_database_post

%postun
%desktop_database_postun

%files
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/*
# the split between arch and noarch seems a bit strange
%{python_sitelib}/gnome-reset*
%{python_sitearch}/gnome_reset_*
%{_datadir}/gnome-reset
%{_datadir}/applications/*.desktop

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by