/[packages]/updates/3/pykolab/current/SPECS/pykolab.spec
ViewVC logotype

Contents of /updates/3/pykolab/current/SPECS/pykolab.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 337378 - (show annotations) (download)
Tue Jan 1 18:35:53 2013 UTC (11 years, 3 months ago) by spuhler
Original Path: cauldron/pykolab/current/SPECS/pykolab.spec
File size: 9974 byte(s)
changed UID and GID to low 410 range as upstream
same numbers as the kolab-webadmin
1 %{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
2
3 %global kolab_user kolab
4 %global kolab_user_id 412
5 %global kolab_group kolab
6 %global kolab_group_id 412
7
8 %global kolabn_user kolab-n
9 %global kolabn_user_id 413
10 %global kolabn_group kolab-n
11 %global kolabn_group_id 413
12
13 %global kolabr_user kolab-r
14 %global kolabr_user_id 414
15 %global kolabr_group kolab-r
16 %global kolabr_group_id 414
17
18 Summary: Kolab Groupware Solution
19 Name: pykolab
20 Version: 0.5.10
21 Release: %mkrel 6
22 License: GPLv3+
23 Group: System/Servers
24 URL: http://git.kolab.org/pykolab
25 Source0: http://git.kolab.org/pykolab//%{name}-%{version}.tar.gz
26 Source1: kolab-saslauthd-tmpfiles.conf
27 Source2: kolab-server-tmpfiles.conf
28 Source3: wallace-tmpfiles.conf
29 Patch0: mga-schema-loc.patch
30 BuildRequires: gettext-devel
31 BuildArch: noarch
32 Requires: python-ldap >= 2.4
33 Requires(pre): %{_sbindir}/useradd
34 Requires(pre): %{_sbindir}/usermod
35 Requires(pre): %{_sbindir}/groupadd
36
37 %description
38 Kolab enables you to easily build a groupware server as part of a
39 collaborative environment.
40
41 ##
42 ## Kolab Telemetry Logging
43 ##
44 %package telemetry
45 Summary: Kolab Telemetry Logging Capabilities
46 Group: System/Servers
47 Requires: kolab-cli = %{version}-%{release}
48
49 %description telemetry
50 Cyrus IMAP Telemetry logging handling capabilities for Kolab Groupware
51
52 ##
53 ## Kolab XML
54 ##
55 %package xml
56 Summary: Kolab XML format wrapper for %{name}
57 Group: System/Servers
58 Requires: %{name} = %{version}-%{release}
59 Requires: python-kolabformat >= 0.5
60
61 %description xml
62 Kolab Format XML bindings wrapper for %{name}
63
64 ##
65 ## Kolab CLI
66 ##
67 %package -n kolab-cli
68 Summary: Kolab CLI components
69 Group: System/Servers
70 BuildRequires: intltool
71 BuildRequires: gettext
72 BuildRequires: python
73 Requires: %{name} = %{version}-%{release}
74 Requires: python-augeas
75 Requires: python-cheetah
76
77 %description -n kolab-cli
78 Kolab CLI utilities
79
80 ##
81 ## Kolab SASL Authentication Daemon
82 ##
83 %package -n kolab-saslauthd
84 Summary: Kolab SASL Authentication Daemon
85 Group: System/Servers
86 BuildRequires: intltool
87 BuildRequires: gettext
88 BuildRequires: python
89 Requires: %{name} = %{version}-%{release}
90 Requires: cyrus-sasl
91 Requires: sasl-plug-plain
92
93 %description -n kolab-saslauthd
94 Kolab SASL Authentication Daemon for multi-domain, multi-authn database deployments
95
96 ##
97 ## Kolab Server implemented in Python
98 ##
99 %package -n kolab-server
100 Summary: Kolab Server implemented in Python
101 Group: System/Servers
102 BuildRequires: intltool
103 BuildRequires: gettext
104 BuildRequires: python
105 Requires: %{name} = %{version}-%{release}
106 Obsoletes: perl-kolab
107
108 %description -n kolab-server
109 Kolab Server implemented in Python
110
111 ##
112 ## Kolab SMTP Access Policy for Postfix
113 ##
114 %package -n postfix-kolab
115 Summary: Kolab SMTP Access Policy for Postfix
116 Group: System/Servers
117 BuildRequires: intltool
118 BuildRequires: gettext
119 BuildRequires: python
120 Requires: postfix
121 Requires: %{name} = %{version}-%{release}
122 Requires: python-sqlalchemy
123 Requires: MySQL-python
124
125 %description -n postfix-kolab
126 Kolab SMTP Access Policy for Postfix
127
128 ##
129 ## Wallace
130 ##
131 %package -n wallace
132 Summary: Kolab Content-Filter
133 Group: System/Servers
134 Requires: %{name} = %{version}-%{release}
135 Requires: python-sqlalchemy
136 Requires: MySQL-python
137
138 %description -n wallace
139 This is the Kolab Content Filter, with plugins
140
141 %prep
142 %setup -q
143 %patch0 -p1 -b .mga-schema-loc
144
145 %build
146 autoreconf -fi
147
148 %configure2_5x
149
150 %install
151 rm -rf %{buildroot}
152 make install DESTDIR=%{buildroot}
153
154 mkdir -p %{buildroot}/%{_unitdir}
155 %{__install} -p -m 644 kolabd/kolabd.systemd %{buildroot}/%{_unitdir}/kolabd.service
156 %{__install} -p -m 644 saslauthd/kolab-saslauthd.systemd %{buildroot}/%{_unitdir}/kolab-saslauthd.service
157 %{__install} -p -m 644 wallace/wallace.systemd %{buildroot}/%{_unitdir}/wallace.service
158
159
160 mkdir -p %{buildroot}/%{_sysconfdir}/sysconfig
161 %{__install} -p -m 644 kolabd/kolabd.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/kolabd
162 %{__install} -p -m 644 saslauthd/kolab-saslauthd.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/kolab-saslauthd
163 %{__install} -p -m 644 wallace/wallace.sysconfig %{buildroot}/%{_sysconfdir}/sysconfig/wallace
164
165 # install tmpfiles for the systemd/user move
166 %{__install} -D -p -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/kolab-saslauthd.conf
167 %{__install} -D -p -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/kolab-server.conf
168 %{__install} -D -p -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/wallace.conf
169
170 %find_lang pykolab
171
172 %pre
173 # Add the kolab user and group accounts
174 getent group %{kolab_group} &>/dev/null || groupadd -r %{kolab_group} -g %{kolab_group_id} &>/dev/null
175 getent passwd %{kolab_user} &>/dev/null || \
176 useradd -r -u %{kolab_user_id} -g %{kolab_group} -d %{_localstatedir}/lib/%{kolab_user} -s /sbin/nologin \
177 -c "Kolab System Account" %{kolab_user} &>/dev/null || :
178
179 gpasswd -a apache kolab >/dev/null 2>&1 || :
180
181 getent group %{kolabn_group} &>/dev/null || groupadd -r %{kolabn_group} -g %{kolabn_group_id} &>/dev/null
182 getent passwd %{kolabn_user} &>/dev/null || \
183 useradd -r -u %{kolabn_user_id} -g %{kolabn_group} -d %{_localstatedir}/lib/%{kolabn_user} -s /sbin/nologin \
184 -c "Kolab System Account (N)" %{kolabn_user} &>/dev/null || :
185 gpasswd -a %{kolabn_user} %{kolab_group} &>/dev/null || :
186
187 getent group %{kolabr_group} &>/dev/null || groupadd -r %{kolabr_group} -g %{kolabr_group_id} &>/dev/null
188 getent passwd %{kolabr_user} &>/dev/null || \
189 useradd -r -u %{kolabr_user_id} -g %{kolabr_group} -d %{_localstatedir}/lib/%{kolabr_user} -s /sbin/nologin \
190 -c "Kolab System Account (R)" %{kolabr_user} &>/dev/null || :
191
192 # Make sure the kolab user and group is added
193 getent passwd %{cyrus_admin} &>/dev/null || \
194 useradd -r -d %{_localstatedir}/lib/%{cyrus_admin} -s /sbin/nologin \
195 -c "Kolab Cyrus Administrator Account" %{cyrus_admin} &>/dev/null || :
196
197 # Make sure our user has the correct home directory
198 if [ $1 -gt 1 ] ; then
199 usermod -d %{_localstatedir}/lib/%{kolab_user} %{kolab_user} &>/dev/null || :
200 usermod -d %{_localstatedir}/lib/%{kolab_user} %{kolabn_user} &>/dev/null || :
201 usermod -d %{_localstatedir}/lib/%{kolab_user} %{kolabr_user} &>/dev/null || :
202 fi
203
204 %post -n kolab-saslauthd
205 if [ $1 -eq 1 ]; then
206 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
207 else
208 /sbin/service kolab-saslauthd condrestart
209 fi
210
211 %preun -n kolab-saslauthd
212 if [ $1 = 0 ]; then
213 /bin/systemctl --no-reload disable kolab-saslauthd.service >/dev/null 2>&1 || :
214 /bin/systemctl stop kolab-saslauthd.service >/dev/null 2>&1 || :
215 fi
216
217 %post -n kolab-server
218 if [ $1 -eq 1 ] ; then
219 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
220 fi
221
222 %preun -n kolab-server
223 if [ $1 = 0 ]; then
224 /bin/systemctl --no-reload disable kolabd.service >/dev/null 2>&1 || :
225 /bin/systemctl stop kolabd.service >/dev/null 2>&1 || :
226 fi
227
228 %post -n wallace
229 if [ $1 -eq 1 ] ; then
230 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
231 else
232 /bin/systemctl condrestart wallaced
233 fi
234
235 %preun -n wallace
236 if [ $1 = 0 ]; then
237 /bin/systemctl --no-reload disable wallace.service
238 /bin/systemctl stop wallaced.service
239 fi
240
241
242 %files -f pykolab.lang
243 %doc AUTHORS COPYING README README.tests
244 %doc conf/kolab.conf
245 %attr(0640,kolab-n,kolab) %config(noreplace) %{_sysconfdir}/kolab/kolab.conf
246 %dir %{python_sitelib}/pykolab/
247 %exclude %{python_sitelib}/pykolab/telemetry.*
248 %{python_sitelib}/pykolab/*.py
249 %{python_sitelib}/pykolab/*.pyc
250 %{python_sitelib}/pykolab/*.pyo
251 %{python_sitelib}/pykolab/auth/
252 %{python_sitelib}/pykolab/conf/
253 %{python_sitelib}/pykolab/imap/
254 %dir %{python_sitelib}/pykolab/plugins/
255 %{python_sitelib}/pykolab/plugins/*.py
256 %{python_sitelib}/pykolab/plugins/*.pyc
257 %{python_sitelib}/pykolab/plugins/*.pyo
258 %{python_sitelib}/pykolab/plugins/defaultfolders
259 %{python_sitelib}/pykolab/plugins/dynamicquota
260 %{python_sitelib}/pykolab/plugins/recipientpolicy
261 %{python_sitelib}/kolab/
262 %{python_sitelib}/cyruslib.py*
263 %attr(0775,kolab,kolab-n) %dir %{_localstatedir}/lib/kolab/
264 %attr(0775,kolab,kolab-n) %dir %{_localstatedir}/log/kolab/
265
266 %files telemetry
267 %doc AUTHORS COPYING
268 %{_sbindir}/kolab_parse_telemetry
269 %{python_sitelib}/pykolab/telemetry.*
270 %{python_sitelib}/pykolab/cli/telemetry/
271
272 %files xml
273 %dir %{python_sitelib}/pykolab/xml
274 %{python_sitelib}/pykolab/xml/*.py
275 %{python_sitelib}/pykolab/xml/*.pyc
276 %{python_sitelib}/pykolab/xml/*.pyo
277
278 %files -n kolab-cli
279 %{_sbindir}/kolab
280 %{_sbindir}/kolab-conf
281 %{_sbindir}/setup-kolab
282 %dir %{_sysconfdir}/kolab/templates
283 %{_datadir}/kolab/templates
284 %dir %{python_sitelib}/pykolab/cli/
285 %{python_sitelib}/pykolab/cli/*.py
286 %{python_sitelib}/pykolab/cli/*.pyc
287 %{python_sitelib}/pykolab/cli/*.pyo
288 %dir %{python_sitelib}/pykolab/setup/
289 %{python_sitelib}/pykolab/setup/*.py
290 %{python_sitelib}/pykolab/setup/*.pyc
291 %{python_sitelib}/pykolab/setup/*.pyo
292 %dir %{python_sitelib}/pykolab/wap_client/
293 %{python_sitelib}/pykolab/wap_client/*.py
294 %{python_sitelib}/pykolab/wap_client/*.pyc
295 %{python_sitelib}/pykolab/wap_client/*.pyo
296
297 %files -n kolab-saslauthd
298 %doc AUTHORS COPYING
299 %{_unitdir}/kolab-saslauthd.service
300 %config(noreplace) %{_sysconfdir}/sysconfig/kolab-saslauthd
301 %{_sbindir}/kolab-saslauthd
302 %{python_sitelib}/saslauthd/
303 %dir %{_localstatedir}/run/kolab-saslauthd
304 %dir %{_localstatedir}/run/saslauthd
305 %{_tmpfilesdir}/kolab-saslauthd.conf
306
307 %files -n kolab-server
308 %doc AUTHORS COPYING
309 %{_unitdir}/kolabd.service
310 %config(noreplace) %{_sysconfdir}/sysconfig/kolabd
311 %{_sbindir}/kolabd
312 %{python_sitelib}/kolabd/
313 %attr(0770,kolab,kolab) %dir %{_localstatedir}/run/kolabd
314 %{_tmpfilesdir}/kolab-server.conf
315
316 %files -n postfix-kolab
317 %doc AUTHORS COPYING
318 %{_libexecdir}/postfix/kolab_smtp_access_policy
319
320 %files -n wallace
321 %doc AUTHORS COPYING
322 %{_unitdir}/wallace.service
323 %{_sysconfdir}/sysconfig/wallace
324 %{_sbindir}/wallaced
325 %{python_sitelib}/wallace
326 %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab
327 %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace
328 %{_tmpfilesdir}/wallace.conf

  ViewVC Help
Powered by ViewVC 1.1.30