summaryrefslogtreecommitdiff
path: root/sabayon.spec
blob: 7808b049a0f12ac838245289f8187a4ddfe326d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# TODO
# - useradd/groupadd broken (no uid/gid)
Summary:	Tool to maintain user profiles in a GNOME desktop
Summary(pl.UTF-8):	Narzędzie do zarządzania profilami użytkowników w środowisku GNOME
Name:		sabayon
Version:	2.22.0
Release:	1
License:	GPL
Group:		Applications/System
Source0:	http://ftp.gnome.org/pub/GNOME/sources/sabayon/2.22/%{name}-%{version}.tar.bz2
# Source0-md5:	39159282db60bfdfcd8569ecb5a992f5
Patch0:		%{name}-pld.patch
Patch1:		%{name}-pythonpath.patch
URL:		http://www.gnome.org/projects/sabayon
BuildRequires:	autoconf >= 2.59
BuildRequires:	automake
BuildRequires:	desktop-file-utils
BuildRequires:	gettext
BuildRequires:	gtk+2-devel >= 2:2.8.17
BuildRequires:	intltool >= 0.36.2
BuildRequires:	python-devel
BuildRequires:	python-pygtk-devel >= 2.8.6
Requires(post,postun):	gtk+2 >= 2.8.17
%pyrequires_eq  python-modules
Requires(post,postun):	desktop-file-utils
Requires(post,postun):	hicolor-icon-theme
Requires:	python-gamin
Requires:	python-gnome-gconf >= 2.12.4
Requires:	python-ldap
Requires:	python-libxml2
Requires:	python-pygtk >= 2.8.6
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Sabayon is a tool to help sysadmins and user change and maintain the
default behaviour of the GNOME desktop.

%description -l pl.UTF-8
Sabayon to narzędzie pomagające administratorom i użytkownikom
zmieniać i utrzymywać domyślne zachowanie środowiska GNOME.

%package admin
Summary:	Graphical tools for Sabayon profile management
Summary(pl.UTF-8):	Graficzne narzędzia do zarządzania profilami Sabayon
Group:		Applications/System
Requires(postun):	/usr/sbin/groupdel
Requires(postun):	/usr/sbin/userdel
Requires(pre):	/bin/id
Requires(pre):	/usr/bin/getgid
Requires(pre):	/usr/lib/rpm/user_group.sh
Requires(pre):	/usr/sbin/groupadd
Requires(pre):	/usr/sbin/useradd
Requires(pre):	/usr/sbin/usermod
Requires:	%{name} = %{version}-%{release}
Requires:	pwdutils
Requires:	xorg-xserver-Xnest

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

%description admin -l pl.UTF-8
Ten pakiet zawiera graficzne narzędzia dla administratora do
zarządzania profilami Sabayon.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
%{__intltoolize}
%{__aclocal}
%{__autoheader}
%{__autoconf}
%{__automake}
%configure \
	--with-prototype-user=sabayon

%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_sysconfdir}/gconf/2

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

echo 'include "$(HOME)/.gconf.path.defaults"'  > $RPM_BUILD_ROOT%{_sysconfdir}/gconf/2/local-defaults.path
echo 'include "$(HOME)/.gconf.path.mandatory"' > $RPM_BUILD_ROOT%{_sysconfdir}/gconf/2/local-mandatory.path

desktop-file-install --vendor gnome --delete-original \
	--dir $RPM_BUILD_ROOT%{_desktopdir} \
	$RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop

rm -f $RPM_BUILD_ROOT%{py_sitedir}/%{name}/xlib.la
rm -f $RPM_BUILD_ROOT%{py_sitedir}/%{name}/xlib.a

%py_postclean
%find_lang sabayon

%clean
rm -rf $RPM_BUILD_ROOT

%pre admin
%groupadd -g 225 sabayon
%useradd -u 225 -d %{_datadir}/empty -c "Sabayon user" -g sabayon sabayon

%post admin
%update_desktop_database_post
%update_icon_cache hicolor

%postun admin
%update_desktop_database_postun
%update_icon_cache hicolor

if [ $1 -eq 0 ]; then
	%userremove sabayon
	%groupremove sabayon
fi

%files -f sabayon.lang
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README TODO ISSUES sabayon.schema
%config(noreplace) %{_sysconfdir}/gconf/2/local-defaults.path
%config(noreplace) %{_sysconfdir}/gconf/2/local-mandatory.path
%config(noreplace) %{_sysconfdir}/X11/xinit/xinitrc.d/%{name}*
%{_sysconfdir}/desktop-profiles
%attr(755,root,root) %{_sbindir}/sabayon-apply
%dir %{py_sitedir}/%{name}
%{py_sitedir}/%{name}/*.py[co]
%dir %{py_sitedir}/%{name}/sources
%{py_sitedir}/%{name}/sources/*.py[co]
%dir %{py_sitedir}/%{name}/lockdown
%{py_sitedir}/%{name}/lockdown/*.py[co]

%files admin
%defattr(644,root,root,755)
%doc doc/index.html doc/testing.html doc/helping.html doc/developing.html
%doc doc/sabayon.css doc/*.jpg doc/*.gif
%attr(755,root,root) %{_bindir}/sabayon
%attr(755,root,root) %{_libexecdir}/sabayon-session
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/glade
%{_datadir}/%{name}/glade/*.glade
%{_desktopdir}/gnome-%{name}.desktop
%{_iconsdir}/hicolor/*/apps/*.png
%{_iconsdir}/hicolor/*/apps/*.svg
%attr(755,root,root) %{py_sitedir}/%{name}/xlib.so