File sabayon.spec of Package sabayon

#
# spec file for package sabayon (Version 2.28.1)
#
# 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/
#

# norootforbuild


Name:           sabayon
Version:        2.28.1
Release:        0.<RELEASE1>
Summary:        Tool to maintain user profiles in a GNOME desktop
Group:          System/GUI/GNOME
License:        GPLv2+
Url:            http://www.gnome.org/projects/sabayon/
Source:         http://ftp.gnome.org/pub/GNOME/sources/sabayon/2.19/sabayon-%{version}.tar.bz2
BuildRequires:  fdupes
BuildRequires:  gtk2-devel
BuildRequires:  intltool
BuildRequires:  python-devel
BuildRequires:  python-gobject2-devel
BuildRequires:  python-xdg
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11
BuildRequires:  xorg-x11-devel
BuildRequires:  xorg-x11-server-extra
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       libxml2-python
Requires:       python-gtk
Requires:       python-ldap
Requires:       python-gnome
Requires:       python-xdg
Requires:       xorg-x11-server-extra
Requires:       %{name}-lang = %{version}
Patch1:         sabayon-desktop-file-name.diff
Patch2:         sabayon-desktop-file-categories.diff
%py_requires

%description
Sabayon is a tool to help system administrators and users change and
maintain the default behaviour of the GNOME desktop.

%package admin
License:        GPLv2+
Summary:        Graphical tools for Sabayon profile management
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}-%{release}
Requires:       xorg-x11-Xnest
PreReq:         pwdutils

%description admin
The sabayon-admin package contains the graphical tools which a sysadmin
should use to manage Sabayon profiles.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch1 -p1
%patch2 -p1
chmod -x doc/*

%build
%configure\
	--libexecdir=%{_prefix}/lib/%{name}\
	--enable-consolehelper=yes\
	--with-prototype-user=%{name}-admin\
	--with-distro=suse
make %{?_smp_mflags}

%install
%makeinstall PAM_PREFIX=$RPM_BUILD_ROOT%{_sysconfdir}
rm $RPM_BUILD_ROOT%{py_sitedir}/%{name}/xlib.*a
%suse_update_desktop_file -G "Desktop Profile Administration" %{name} SystemSetup
%find_lang %{name}
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%pre admin
/usr/sbin/groupadd -r %{name}-admin &>/dev/null || :
/usr/sbin/useradd  -r -s /sbin/nologin -c "Sabayon user" -g %{name}-admin -d /var/lib/%{name}-admin %{name}-admin &>/dev/null || :

%files
%defattr(-, root, root, 755)
%doc AUTHORS ChangeLog NEWS README TODO ISSUES
%config(noreplace) /etc/X11/xinit/xinitrc.d/%{name}*
%{_sbindir}/%{name}-apply
%{_sysconfdir}/desktop-profiles
%dir %{py_sitedir}/%{name}
%{py_sitedir}/%{name}/__init__.py*
%{py_sitedir}/%{name}/config.py*
%{py_sitedir}/%{name}/cache.py*
%{py_sitedir}/%{name}/debuglog.py*
%{py_sitedir}/%{name}/dirmonitor.py*
%{py_sitedir}/%{name}/errors.py*
%{py_sitedir}/%{name}/mozilla_bookmarks.py*
%{py_sitedir}/%{name}/storage.py*
%{py_sitedir}/%{name}/userdb.py*
%{py_sitedir}/%{name}/userprofile.py*
%{py_sitedir}/%{name}/util.py*
%dir %{py_sitedir}/%{name}/sources/
%{py_sitedir}/%{name}/sources/*.py*

%files lang -f %{name}.lang

%files admin
%defattr(-, root, root, 755)
%doc doc/index.html doc/testing.html doc/helping.html doc/developing.html
%doc doc/sabayon.css doc/*.jpg doc/*.gif
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/16x16/apps/%{name}.png
%{_datadir}/icons/hicolor/22x22/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/%{name}
%{_prefix}/lib/%{name}
%{py_sitedir}/%{name}/xlib.so
%{py_sitedir}/%{name}/aboutdialog.py*
%{py_sitedir}/%{name}/changeswindow.py*
%{py_sitedir}/%{name}/editorwindow.py*
%{py_sitedir}/%{name}/fileviewer.py*
%{py_sitedir}/%{name}/gconfviewer.py*
%{py_sitedir}/%{name}/profilesdialog.py*
%{py_sitedir}/%{name}/protosession.py*
%{py_sitedir}/%{name}/saveconfirm.py*
%{py_sitedir}/%{name}/sessionwidget.py*
%{py_sitedir}/%{name}/sessionwindow.py*
%{py_sitedir}/%{name}/usermod.py*
%{py_sitedir}/%{name}/usersdialog.py*
%{py_sitedir}/%{name}/lockdownappliersabayon.py*
%{py_sitedir}/%{name}/lockdown

%changelog
openSUSE Build Service is sponsored by