File sabayon.spec of Package sabayon
#
# spec file for package sabayon
#
# 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/
#
Name: sabayon
Version: 2.30.1
Release: 3
License: GPL-2.0+
Summary: Tool to maintain user profiles in a GNOME desktop
Url: http://www.gnome.org/projects/sabayon/
Group: System/GUI/GNOME
Source: http://ftp.gnome.org/pub/GNOME/sources/sabayon/2.19/sabayon-%{version}.tar.bz2
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch1: sabayon-desktop-file-name.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
Patch2: sabayon-desktop-file-categories.diff
BuildRequires: fdupes
BuildRequires: gnome-doc-utils-devel
BuildRequires: gtk2-devel
BuildRequires: intltool
BuildRequires: pessulus
BuildRequires: python-devel
BuildRequires: python-gobject2-devel
BuildRequires: python-gtk-devel
BuildRequires: python-xdg
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: xorg-x11
BuildRequires: xorg-x11-devel
BuildRequires: xorg-x11-server-extra
Requires: libxml2-python
Requires: python-gnome
Requires: python-gtk
Requires: python-ldap
Requires: python-xdg
Requires: xorg-x11-server-extra
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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: GPL-2.0+
Summary: Graphical tools for Sabayon profile management
Group: System/GUI/GNOME
PreReq: pwdutils
Requires: %{name} = %{version}
Requires: pessulus
Requires: xorg-x11-Xnest
%py_requires
%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
%build
%configure\
--libexecdir=%{_prefix}/lib/%{name}\
--enable-consolehelper=yes\
--with-prototype-user=%{name}-admin\
--disable-scrollkeeper\
--with-distro=suse
make %{?jobs:-j%jobs}
%install
%makeinstall PAM_PREFIX=%{buildroot}%{_sysconfdir}
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
rm %{buildroot}%{py_sitedir}/%{name}/xlib.*a
%suse_update_desktop_file %{name} SystemSetup
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%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 || :
%post admin
%desktop_database_post
%icon_theme_cache_post
%postun admin
%desktop_database_postun
%icon_theme_cache_postun
%post
# Migrate old configuration (since 2.29.5, in 11.3)
# Can be removed for openSUSE 12.2
for file in %{_sysconfdir}/desktop-profiles/*.xml %{_sysconfdir}/desktop-profiles/*.zip; do
# do nothing if the file doesn't exist (no file in directory matching the *)
test -f "$file" || continue
# do nothing if the file was already migrated
test ! -f "$file".migrated || continue
# do nothing if the file is already present in new directory
test ! -f "%{_sysconfdir}/%{name}/`basename \"$file\"`" || continue
# migrate files based on extension
if test "${file##*.}" == "xml"; then
cp -a "$file" %{_sysconfdir}/%{name}/
touch "$file".migrated
fi
if test "${file##*.}" == "zip"; then
cp -a "$file" %{_sysconfdir}/%{name}/profiles/
touch "$file".migrated
fi
done
%files
%defattr(-, root, root, 755)
%doc AUTHORS ChangeLog NEWS README TODO ISSUES
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%config(noreplace) %{_sysconfdir}/X11/xinit/xinitrc.d/%{name}*
%{_sbindir}/%{name}-apply
%doc %{_mandir}/man?/%{name}-apply.*
%{_sysconfdir}/%{name}/
%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}/systemdb.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)
%{_bindir}/%{name}
%doc %{_mandir}/man?/%{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}/groupsdialog.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*
%changelog