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

  ViewVC Help
Powered by ViewVC 1.1.30