/[packages]/cauldron/cyrus-imapd/current/SPECS/cyrus-imapd.spec
ViewVC logotype

Contents of /cauldron/cyrus-imapd/current/SPECS/cyrus-imapd.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 233654 - (show annotations) (download)
Sat Apr 28 00:01:37 2012 UTC (11 years, 11 months ago) by tmb
File size: 23901 byte(s)
Require rpm-helper >= 0.24.8-1 for systemd support
1 # use saslauth group if
2 %define SASLGROUP 0
3 %{?_with_saslgroup: %{expand: %%define SASLGROUP 1}}
4
5 # preforking cyrus.conf as default
6 %define PREFORK 1
7 %{?_without_prefork: %{expand: %%define PREFORK 0}}
8
9 # enable idled (default no)
10 %define IDLED 0
11 %{?_with_idled: %{expand: %%define IDLED 1}}
12
13 # enable automatic mailbox creation on deliver (default no):
14 %define build_autocreate 1
15 %{?_without_autocreate: %define build_autocreate 0}
16
17 # create on demand folder requested by sieve filter (default no):
18 %define build_autosieve 1
19 %{?_without_autosieve: %define build_autosieve 0}
20
21 # remove quota files extension:
22 %define build_rmquota 1
23 %{?_without_rmquota: %define build_rmquota 0}
24
25 # snmp support
26 %global with_snmp 1
27 %{?_without_snmp: %global with_snmp 0}
28
29 # ldap/pts support
30 %global with_ldap 1
31 %{?_without_ldap: %global with_ldap 0}
32
33 %global with_mysql 1
34 %{?_without_mysql: %global with_mysql 0}
35
36 %global with_pgsql 1
37 %{?_without_pgsql: %global with_pgsql 0}
38
39 %global with_sqlite 1
40 %{?_without_sqlite: %global with_sqlite 0}
41
42 # virtual domains in LDAP support
43 # needed by Kolab2
44 %define build_virtualdomains_in_ldap 1
45 %{?_without_virtualdomains_in_ldap: %define build_virtualdomains_in_ldap 0}
46
47 %define db4_version 4.8
48
49 Summary: A high-performance mail store with IMAP and POP3 support
50 Name: cyrus-imapd
51 Version: 2.4.13
52 Release: %mkrel 6
53 License: OSI Approved
54 Group: System/Servers
55 URL: http://asg.web.cmu.edu/cyrus/imapd/
56 Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%{name}-%{version}.tar.gz
57 Source1: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%{name}-%{version}.tar.gz.sig
58 Source2: cyrus-procmailrc
59 Source4: cyrus-user-procmailrc.template
60 Source6: cyrus-imapd.imap-2.1.x-conf
61 Source7: cyrus-imapd.pamd-0.77
62 Source8: cyrus-imapd.pamd
63 Source10: cyrus-imapd.service
64 Source11: cyrus-imapd.init
65 Source12: cyrus-imapd.sysconfig
66 Source13: http://clement.hermann.free.fr/scripts/Cyrus/imapcreate.pl
67 Source14: cyrus-imapd.README.RPM
68 Source15: cyrus-imapd.cvt_cyrusdb_all
69 Source19: cyrus-imapd-procmail+cyrus.mc
70 Source20: cyrus-imapd.cron-daily
71 Source21: http://ftp.andrew.cmu.edu/pub/net/mibs/cmu/cmu.mib
72 Source22: cyr_systemd_helper
73 # This patch fixes the perl install path for mdk9.0 and later
74 Patch1: cyrus-imapd-mdk9.0perl-patch
75 # cyrus-master instead of master in syslog
76 Patch2: cyrus-imapd-logident.patch
77 # Autocreate INBOX patch (http://email.uoa.gr/projects/cyrus/autocreate/)
78 Patch3: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.16/cyrus-imapd-2.3.16-autocreate-0.10-0.diff
79 # Create on demand folder requested by sieve filter (http://email.uoa.gr/projects/cyrus/autosievefolder/)
80 Patch4: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.16/cyrus-imapd-2.3.16-autosieve-0.6.0.diff
81 # Remove QUOTA patch (http://email.uoa.gr/projects/cyrus/quota-patches/rmquota/)
82 Patch5: http://email.uoa.gr/download/cyrus/cyrus-imapd-2.3.9/cyrus-imapd-2.3.9-rmquota-0.5-0.diff
83 # command line switch to disallow plaintext login
84 Patch6: cyrus-imapd-plaintext.diff
85 # 64-bit fixes
86 Patch7: cyrus-imapd-2.2.8-64bit-fixes.patch
87 # (oe) for kolab2: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
88 Patch8: cyrus-imapd-kolab-ldap.diff
89 # (oe) for kolab2: Allow for custom annotation
90 Patch9: cyrus-imapd-cyradm_annotate.diff
91 # (bluca) add ptloader to cyrus.conf
92 Patch10: cyrus-imapd-ptloader-conf.diff
93 # (bluca) fix LDAP_OPT_X_SASL_SECPROPS error in ptloader
94 Patch11: cyrus-imapd-ptloader-secprops.diff
95 # http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
96 Patch12: cyrus-imapd-2.3.14-format_not_a_string_literal_and_no_format_arguments.diff
97 # remove verbosity of some syslog messages (simon matter)
98 Patch13: cyrus-imapd-2.1.16-getrlimit.patch
99 Patch14: cyrus-imapd-2.3.12-skiplist_verbosity.patch
100 Patch15: cyrus-imapd-2.3.12-statuscache_verbosity.patch
101 Patch16: cyrus-imapd-2.3.16-user_deny_verbosity.patch
102 # Other patches from simon matter
103 Patch17: cyrus-imapd-2.3.7-mancyrusdb.patch
104 Patch18: cyrus-imapd-2.3.13-make_md5_sha1_dirs.patch
105 Patch19: cyrus-imapd-2.3.11-mkimap.patch
106 Patch20: cyrus-imapd-2.3.16-sync_client_tls_capability_response.patch
107 Patch21: cyrus-imapd-2.3.16-sieve_port.patch
108 # make it build with perl 5.14
109 Patch22: cyrus-imapd-2.3.16-perl514.patch
110
111 # with previous versions of sasl, imap LOGIN would fail
112 Requires: %{mklibname sasl 2} >= 2.1.15
113 #Requires: krb5-libs
114 Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
115 Requires(preun):/usr/sbin/userdel /usr/sbin/groupdel
116 Requires(post): rpm-helper >= 0.24.8-1
117 Requires(preun): rpm-helper >= 0.24.8-1
118
119 Provides: imap
120 Provides: imap-server
121 BuildRequires: autoconf
122 BuildRequires: libsasl-devel >= 2.1.15
123 BuildRequires: ext2fs-devel
124 BuildRequires: perl-devel
125 BuildRequires: tcp_wrappers-devel
126 BuildRequires: db-devel
127 BuildRequires: openssl-devel
128 BuildRequires: flex
129 BuildRequires: bison
130 BuildRequires: groff >= 1.15-8
131 %if %{with_snmp}
132 BuildRequires: net-snmp-devel >= 5.1
133 BuildRequires: elfutils-devel
134 Requires: net-snmp-mibs
135 %endif
136 %if %{with_ldap}
137 BuildRequires: openldap-devel
138 %else
139 %if %{build_virtualdomains_in_ldap}
140 BuildRequires: openldap-devel
141 %endif
142 %endif
143 %if %{with_mysql}
144 BuildRequires: mysql-devel
145 %endif
146 %if %{with_pgsql}
147 BuildRequires: postgresql-devel
148 %endif
149 %if %{with_sqlite}
150 BuildRequires: sqlite3-devel
151 %endif
152
153 %if %{SASLGROUP}
154 %define _saslgroup saslauth
155 %endif
156 %define _cyrususer cyrus
157 %define _cyrusgroup mail
158 %define _vardata %{_var}/lib/imap
159 %define _spooldata %{_var}/spool/imap
160 # (gb) stick to /usr/lib/cyrus-imapd as this is an existing practise
161 # from MDK 10.0 and below + /etc/init.d/cyrus-imapd would need to
162 # runtime-detect the libdir since this ought to be an arch-independent
163 # script.
164 %define _cyrexecdir %{_prefix}/lib/cyrus-imapd
165 %define _confdir master/conf
166 %if %{PREFORK}
167 %define _cyrusconf %{_confdir}/prefork.conf
168 %else
169 %define _cyrusconf %{_confdir}/normal.conf
170 %endif
171
172 %description
173 The Cyrus IMAP Server is a scaleable enterprise mail system
174 designed for use from small to large enterprise environments using
175 standards-based technologies.
176
177 A full Cyrus IMAP implementation allows a seamless mail and bulletin
178 board environment to be set up across multiple servers. It differs from
179 other IMAP server implementations in that it is run on "sealed"
180 servers, where users are not normally permitted to log in. The mailbox
181 database is stored in parts of the filesystem that are private to the
182 Cyrus IMAP system. All user access to mail is through software using
183 the IMAP, POP3, or KPOP protocols. TLSv1 and SSL are supported for
184 security.
185
186 This is the main package, install also the %{name}-utils package (it
187 contains server administration tools and depends on the perl-Cyrus
188 package).
189
190 %package murder
191 Summary: Cyrus IMAP server murder aggregator system files
192 Group: System/Servers
193 Requires: %{name} = %{version}-%{release}
194
195 %description murder
196 The %{name}-murder package contains the Cyrus murder aggregator system,
197 i.e. IMAP, POP3 and LMTP proxies, and the mupdate mailbox master daemon.
198 It allows for cluster setups where there are many backend Cyrus spools
199 and frontend proxy servers.
200
201 %package nntp
202 Summary: Cyrus IMAP server murder nntp support files
203 Group: System/Servers
204 Requires: %{name} = %{version}-%{release}
205 Conflicts: leafnode
206
207 %description nntp
208 Cyrus has the ability to export Usenet via IMAP and/or export shared
209 IMAP mailboxes via NNTP. This is made possible by a new NNTP daemon
210 which is included in this package.
211
212 %package devel
213 Summary: Cyrus IMAPd development files
214 Group: Development/Other
215
216 %description devel
217 This package contains header files and libraries necessary for
218 developing applications which use the imclient library.
219
220 The main package is %{name}.
221
222 %package -n perl-Cyrus
223 Summary: Cyrus IMAPd utility Perl modules
224 Group: Development/Perl
225 # with previous versions of sasl, imap LOGIN would fail
226 Requires: %{mklibname sasl 2} >= 2.1.15
227
228 %description -n perl-Cyrus
229 This package contains Perl modules necessary to use the Cyrus server
230 administrative utilities.
231
232 The main package is %{name}.
233
234 %package utils
235 Summary: Cyrus IMAPd server admin utilities
236 Group: System/Servers
237 Requires: perl-Cyrus = %{version}-%{release}
238
239 %description utils
240 This package contains Cyrus IMAPd server administrative tools. It
241 can be installed on systems other than the one running the server.
242
243 This package depends on the perl-Cyrus package.
244 The main package is %{name}.
245
246 %prep
247
248 %setup -q -n %{name}-%{version}
249 %patch1 -b .mdk9.0perl.orig
250 %patch2
251 # %if %{build_autocreate}
252 # %patch3 -p1 -b .autocreate.orig
253 # %endif
254 #%if %{build_autosieve}
255 # # %patch4 -p1 -b .autosieve.orig
256 # %endif
257 # %if %{build_rmquota}
258 # %patch5 -p1 -b .rmquota.orig
259 # %endif
260
261 # %patch6 -p1 -b .plaintext.orig
262 # %patch7 -p1 -b .64bit-fixes.orig
263
264 # (oe) for kolab2: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
265 %if %{build_virtualdomains_in_ldap}
266 %patch8 -p1 -b .kolab-ldap.orig
267 %endif
268 # (oe) for kolab2: Allow for custom annotation
269 # %patch9 -p1 -b .annotate.orig
270 # %if %{with_ldap}
271 # %patch10 -p1 -b .ptloader.orig
272 # %endif
273 %patch11 -p1 -b .secprops.orig
274 # %patch12 -p1 -b .format_not_a_string_literal_and_no_format_arguments.orig
275
276 %patch13 -p1 -b .getrlimit.orig
277 %patch14 -p1 -b .skiplist_verbosity.orig
278 # %patch15 -p1 -b .statuscache_verbosity.orig
279 # %patch16 -p1 -b .user_deny_verbosity.orig
280
281 # %patch17 -p1 -b .mancyrusdb.orig
282 # %patch18 -p1 -b .make_md5_sha1_dirs.orig
283 %patch19 -p1 -b .mkimap.orig
284 # %patch20 -p1 -b .sync_client_tls_capability_response.orig
285 %patch21 -p1 -b .sieve_port.orig
286 # %patch22 -p1 -b .perl514
287
288 ## Extra documentation
289 mkdir -p extradocs
290 for i in %{SOURCE2} %{SOURCE4} %{SOURCE19} ; do
291 cp $i extradocs
292 done
293
294 ## remove cvs file
295 rm -f doc/text/.cvsignore
296
297 ## regenerate html man pages
298 pushd man
299 for mp in *[1-8] ; do groff -m man -T html $mp > ../doc/man/$mp.html ; done
300 popd
301
302 # fix build under mdx8.2
303 perl -ni -e "print unless /^AC_PREREQ/" configure.in
304
305 # fix conditional pam config file
306 install -m 0644 %{SOURCE8} cyrus-imapd.pamd
307
308 # cleanup
309 for i in `find . -type d -name CVS` `find . -type d -name .svn` `find . -type f -name .cvs\*` `find . -type f -name .#\*`; do
310 if [ -e "$i" ]; then rm -rf $i; fi >&/dev/null
311 done
312
313 %build
314 %serverbuild
315
316 CPPFLAGS="-I%{_includedir}/et $CPPFLAGS"
317 export CPPFLAGS
318 CFLAGS="$RPM_OPT_FLAGS -fPIC"
319 export CFLAGS
320 LDFLAGS="-L%{_libdir}"
321 export LDFLAGS
322
323 #with the existing autom4te.cache autoheader would fail with the message
324 #Can't locate object method "path" via package "Request" at /usr/share/autoconf/Autom4te/C4che.pm line 69, <GEN1> line 111.
325 #
326
327 rm -rf autom4te.cache configure
328 export WANT_AUTOCONF_2_5=1
329 libtoolize --copy --force; aclocal -I cmulocal; autoheader; autoconf
330
331 %configure2_5x \
332 %if %{IDLED}
333 --with-idle=idled \
334 %endif
335 %if !%{with_snmp}
336 --without-snmp \
337 %endif
338 %if %{with_ldap}
339 --with-ldap=/usr \
340 %endif
341 %if %{with_mysql}
342 --with-mysql --with-mysql-incdir=/usr/include/mysql \
343 %endif
344 %if %{with_pgsql}
345 --with-pgsql \
346 %endif
347 %if %{with_sqlite}
348 --with-sqlite \
349 %endif
350 --with-extraident="Mageia-RPM-%{version}-%{release}" \
351 --with-syslogfacility=MAIL \
352 --with-bdb=db-%{db_version} \
353 --enable-murder \
354 --enable-netscapehack \
355 --enable-listext \
356 --enable-nntp \
357 --with-perl=%{__perl} \
358 --with-cyrus-prefix=%{_cyrexecdir} \
359 --with-service-path=%{_cyrexecdir} \
360 # --with-krb=%{_prefix}/kerberos \
361
362 make clean
363 # no parallel make - 2.3.10
364 make
365
366 # Modify docs master --> cyrus-master
367 pushd man
368 perl -pi -e "s#master\(8\)#cyrus-master(8)#" `ls *5 *8`
369 cd ../doc
370 perl -pi -e "s#master#cyrus-master#g;" man.html
371 cd man
372 perl -pi -e "s#master\(8\)#cyrus-master(8)#;" `ls *html`
373 popd
374
375 # Modify path in perl scripts
376 pushd perl/imap/examples
377 perl -pi -e "s#/usr/local/bin/perl#%{__perl}#" `find . -type f -name "*.pl"`
378 popd
379
380 # Cleanup of doc dir
381 find doc perl -name CVS -type d | xargs -r rm -fr
382 find doc -name "*~" -type f | xargs -r rm -f
383 find doc -name "*.*.orig" -type f | xargs -r rm -f
384
385 rm -f doc/Makefile.dist
386 rm -f doc/text/htmlstrip.c
387
388 # modify lmtp socket path in .conf files
389 perl -pi -e "s#/var/imap#%{_vardata}#" %{_confdir}/*.conf
390
391 %install
392 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
393
394 %makeinstall_std
395 %makeinstall_std -C man
396
397 %{__install} -m 755 imtest/imtest %{buildroot}%{_cyrexecdir}/
398 %{__install} -m 755 perl/imap/cyradm %{buildroot}%{_cyrexecdir}/
399
400 # Install tools
401 for tool in dohash masssievec mkimap mknewsgroups rehash translatesieve undohash upgradesieve ; do
402 test -f tools/${tool} && %{__install} -m 755 tools/${tool} %{buildroot}%{_cyrexecdir}/
403 done
404 %{__install} -m 755 %{SOURCE13} %{buildroot}%{_cyrexecdir}/imapcreate
405
406 # Create directories
407 %{__install} -d \
408 %if %{with_snmp}
409 %{buildroot}%{_datadir}/snmp/mibs \
410 %endif
411 %if %{with_ldap}
412 %{buildroot}%{_vardata}/ptclient/ \
413 %endif
414 %{buildroot}%{_initrddir} \
415 %{buildroot}%{_unitdir} \
416 %{buildroot}%{_sysconfdir}/{pam.d,sysconfig,cron.daily} \
417 %{buildroot}%{_libdir}/sasl \
418 %{buildroot}%{_bindir} \
419 %{buildroot}%{_spooldata}/stage. \
420 %{buildroot}%{_vardata}/{user,quota,proc,log,msg,socket,db,sieve,rpm,backup}
421
422 # Install additional files
423 %{__install} -m 755 %{SOURCE15} %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all
424
425 # Install config files
426 %{__install} -m 644 %{_cyrusconf} %{buildroot}%{_sysconfdir}/cyrus.conf
427 %{__install} -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/imapd.conf
428
429 %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/pop
430 %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/imap
431 %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/sieve
432 %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/mupdate
433 %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/lmtp
434 %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/nntp
435 %{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/csync
436
437 %{__install} -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
438 %{__install} -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/%{name}
439 %{__install} -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service
440 %{__install} -m 755 %{SOURCE20} %{buildroot}%{_sysconfdir}/cron.daily/%{name}
441 %{__install} -m 755 %{SOURCE22} %{buildroot}%{_cyrexecdir}/cyr_systemd_helper
442
443 %if %{with_snmp}
444 # Install snmp mibs
445 %{__install} -m 644 master/CYRUS-MASTER.mib %{buildroot}%{_datadir}/snmp/mibs/CYRUS-MASTER-MIB.txt
446 %{__install} -m 644 %{SOURCE21} %{buildroot}%{_datadir}/snmp/mibs/CMU-MIB.txt
447 %endif
448
449 # Install README.RPM
450 %{__install} -m 644 %{SOURCE14} README.RPM
451 cat << EOF >> README.RPM
452
453 RPM BUILD TIME CONFIGURATION OPTIONS
454
455 This RPM package has been compiled with the following options:
456
457 use saslauth group
458 SASLGROUP: %{SASLGROUP}
459
460 use preforking cyrus.conf
461 PREFORK: %{PREFORK}
462
463 enable IDLED support
464 IDLED: %{IDLED}
465
466 enable full directory hash
467 FULLDIRHASH: %{FULLDIRHASH}
468
469 EOF
470
471 # Install templates
472 %{__install} -m 755 -d doc/conf
473 %{__install} -m 644 %{_confdir}/*.conf doc/conf/
474
475 # Rename 'master' binary and manpage to avoid crash with postfix
476 mv -f %{buildroot}%{_cyrexecdir}/master %{buildroot}%{_cyrexecdir}/cyrus-master
477 mv -f %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/cyrus-master.8
478 cp -af doc/man/master.8.html doc/man/cyrus-master.8.html
479
480 # Create symlinks
481 ln -sf ../lib/cyrus-imapd/cyradm %{buildroot}%{_bindir}/
482 ln -sf ../lib/cyrus-imapd/imtest %{buildroot}%{_bindir}/
483 ln -sf ../lib/cyrus-imapd/imapcreate %{buildroot}%{_bindir}/
484
485 # required if upgrading from 2.2.x -> 2.3.6+
486 %{__install} -m 755 tools/migrate-metadata %{buildroot}%{_cyrexecdir}/migrate-metadata
487
488 # provide the cyrusMaster.conf file, discovered by doing:
489 # /usr/lib/cyrus-imapd/cyrus-master -p /var/run/cyrus-master.pid -D
490 %if %{with_snmp}
491 install -d %{buildroot}/var/lib/net-snmp
492 echo "# placeholder" > %{buildroot}/var/lib/net-snmp/cyrusMaster.conf
493 %endif
494
495 # cleanup
496 find %{buildroot}%{perl_vendorarch} -name "*.annotate" | xargs rm -f
497
498 %pre
499 # Create 'cyrus' user on target host
500 %if %{SASLGROUP}
501 /usr/sbin/groupadd -r %{_saslgroup} 2> /dev/null || :
502 /usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
503 -G %{_saslgroup} -s /bin/bash -r %{_cyrususer} 2> /dev/null || :
504 %else
505 /usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
506 -s /bin/bash -r %{_cyrususer} 2> /dev/null || :
507 %endif
508
509 %post
510 if [ $1 = 1 ] ; then
511 # make sure we own the stuff, otherwise /var/log/mail/* will fill
512 # the whole disk with error messages...
513 chown -R %{_cyrususer}:%{_cyrusgroup} %{_vardata} %{_spooldata}
514 fi
515 %_create_ssl_certificate cyrus-imapd
516 chown %{_cyrususer}:%{_cyrusgroup} /etc/pki/tls/private/cyrus-imapd.pem
517
518
519 # Force synchronous updates only on ext2 filesystems
520 # Note: This will slow down user creation for 10.000+ users!
521 for i in %{_vardata}/{user,quota} %{_spooldata}
522 do
523 if [ `find $i -maxdepth 0 -printf %F` = "ext2" ]; then
524 chattr -R +S $i 2>/dev/null
525 fi
526 done
527
528 # Add sieve service if necessary
529 if ! grep -q ^sieve %{_sysconfdir}/services; then
530 echo -e 'sieve\t\t2000/tcp\t\t\t# Sieve mail filter daemon' >> %{_sysconfdir}/services
531 fi
532
533 # Add lmtp service if necessary
534 if ! grep -q ^lmtp %{_sysconfdir}/services; then
535 echo -e 'lmtp\t\t2003/tcp\t\t\t# Local mail delivery protocol (rfc2033)' >> %{_sysconfdir}/services
536 fi
537
538 # upgrade from previous versions with compiled in database backends
539 rm -f %{_vardata}/rpm/db.cfg.cache 2> /dev/null
540
541 # "ctl_deliver -E" is deprecated, now is "cyr_expire -E"
542 if grep -q "ctl_deliver *-E" %{_sysconfdir}/cyrus.conf ; then
543 perl -pi -e "s/ctl_deliver *-E/cyr_expire -E/" %{_sysconfdir}/cyrus.conf
544 fi
545 # compile to byte code sieve scripts on upgrade
546 # masssievec needs to run:
547 # - for versions before 2.2.0 (2.1.x) since they had no bytecode
548 # - upgrading from 2.2.0 since the bytecode has changed
549 # - upgrading from 2.2.1 since the bytecode has changed
550 if [ $1 != 1 ] ; then
551 if [ -f %{_vardata}/rpm/version ] ; then
552 oldversion=`cat %{_vardata}/rpm/version`
553 if [ "$oldversion" = "2.2.0" -o "$oldversion" = "2.2.1" ] ; then
554 compile_needed=1
555 else
556 compile_needed=0
557 fi
558 else
559 # versions prior to 2.2.x didn't write the file
560 compile_needed=1
561 fi
562 if [ $compile_needed = 1 ] ; then
563 echo "compiling sieve scripts"
564 su cyrus -c "%{_cyrexecdir}/masssievec %{_cyrexecdir}/sievec"
565 fi
566 fi
567 # cache the installed version for next upgrade
568 echo %{version} > %{_vardata}/rpm/version
569
570 %_post_service %{name}
571
572 %preun
573 %_preun_service %{name}
574 if [ $1 = 0 ]; then
575 /usr/sbin/userdel %{_cyrususer} 2> /dev/null || :
576 %if %{SASLGROUP}
577 if [ "`grep ^%{_saslgroup}: %{_sysconfdir}/group | cut -d: -f4-`" = "" ]; then
578 /usr/sbin/groupdel %{_saslgroup} 2> /dev/null || :
579 fi
580 %endif
581 rm -f %{_vardata}/socket/lmtp 2> /dev/null
582 rm -f %{_vardata}/rpm/version 2> /dev/null
583 fi
584
585 %triggerin -- %{name} < 2.0.0
586 #To avoid automatic restart of the daemon when upgrading from versions
587 #1.x.x of Cyrus IMAPd in rpm form, be sure the old daemon is stopped
588 /sbin/service %{name} stop >/dev/null 2>&1 || :
589
590 %files
591 %doc doc/* extradocs/*
592 %config(noreplace) %{_sysconfdir}/*.conf
593 %config(noreplace) %{_initrddir}/%{name}
594 %{_unitdir}/%{name}.service
595 %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
596 %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/pop
597 %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/imap
598 %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/sieve
599 %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/lmtp
600 %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
601 %dir %{_cyrexecdir}
602 %{_cyrexecdir}/arbitron
603 %{_cyrexecdir}/chk_cyrus
604 %{_cyrexecdir}/ctl_cyrusdb
605 %{_cyrexecdir}/ctl_deliver
606 %{_cyrexecdir}/ctl_mboxlist
607 %{_cyrexecdir}/cvt_cyrusdb
608 %{_cyrexecdir}/cvt_cyrusdb_all
609 %{_cyrexecdir}/cyr_dbtool
610 %{_cyrexecdir}/cyr_df
611 %{_cyrexecdir}/cyrdump
612 %{_cyrexecdir}/cyr_expire
613 %{_cyrexecdir}/cyr_synclog
614 %{_cyrexecdir}/cyr_sequence
615 %{_cyrexecdir}/cyr_userseen
616 %{_cyrexecdir}/cyr_systemd_helper
617 %{_cyrexecdir}/cyrus-master
618 %{_cyrexecdir}/dohash
619 %{_cyrexecdir}/fud
620 %{_cyrexecdir}/imapd
621 %{_cyrexecdir}/ipurge
622 %{_cyrexecdir}/lmtpd
623 %{_cyrexecdir}/masssievec
624 %{_cyrexecdir}/mbexamine
625 %{_cyrexecdir}/mbpath
626 %{_cyrexecdir}/migrate-metadata
627 %{_cyrexecdir}/mkimap
628 %{_cyrexecdir}/mknewsgroups
629 %{_cyrexecdir}/notifyd
630 %{_cyrexecdir}/pop3d
631 %{_cyrexecdir}/quota
632 %{_cyrexecdir}/reconstruct
633 %{_cyrexecdir}/rehash
634 %{_cyrexecdir}/sievec
635 %{_cyrexecdir}/sieved
636 %{_cyrexecdir}/squatter
637 %{_cyrexecdir}/timsieved
638 %{_cyrexecdir}/tls_prune
639 %{_cyrexecdir}/translatesieve
640 %{_cyrexecdir}/undohash
641 %{_cyrexecdir}/unexpunge
642 %{_cyrexecdir}/upgradesieve
643 %if %{with_ldap}
644 %{_cyrexecdir}/ptdump
645 %{_cyrexecdir}/ptexpire
646 %{_cyrexecdir}/ptloader
647 %endif
648 %if %build_autocreate
649 # %{_cyrexecdir}/compile_sieve
650 %endif
651 %{_cyrexecdir}/smmapd
652 %if %{IDLED}
653 %{_cyrexecdir}/idled
654 %endif
655 %attr(4754,%{_cyrususer},%{_cyrusgroup}) %{_cyrexecdir}/deliver
656 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}
657 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/user
658 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/quota
659 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/proc
660 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/log
661 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/msg
662 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/socket
663 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/db
664 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/sieve
665 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/rpm
666 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/backup
667 %if %{with_ldap}
668 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/ptclient
669 %endif
670 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_spooldata}
671 %attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_spooldata}/*
672 %if %{with_snmp}
673 %{_datadir}/snmp/mibs/*
674 %attr(0644,%{_cyrususer},%{_cyrusgroup}) /var/lib/net-snmp/cyrusMaster.conf
675 %endif
676 %{_mandir}/man5/*
677 %{_mandir}/man8/arbitron.8*
678 %{_mandir}/man8/chk_cyrus.8*
679 %{_mandir}/man8/ctl_cyrusdb.8*
680 %{_mandir}/man8/ctl_deliver.8*
681 %{_mandir}/man8/ctl_mboxlist.8*
682 %{_mandir}/man8/cvt_cyrusdb.8*
683 %{_mandir}/man8/cyr_dbtool.8*
684 %{_mandir}/man8/cyr_df.8*
685 %{_mandir}/man8/cyr_expire.8*
686 %{_mandir}/man8/cyr_synclog.8*
687 %{_mandir}/man8/cyrus-master.8*
688 %{_mandir}/man8/deliver.8*
689 %{_mandir}/man8/fud.8*
690 %{_mandir}/man8/idled.8*
691 %{_mandir}/man8/imapd.8*
692 %{_mandir}/man8/ipurge.8*
693 %{_mandir}/man8/lmtpd.8*
694 # %{_mandir}/man8/make_md5.8*
695 # %{_mandir}/man8/make_sha1.8*
696 %{_mandir}/man8/mbexamine.8*
697 %{_mandir}/man8/mbpath.8*
698 %{_mandir}/man8/notifyd.8*
699 %{_mandir}/man8/pop3d.8*
700 %{_mandir}/man8/quota.8*
701 %{_mandir}/man8/reconstruct.8*
702 %{_mandir}/man8/rmnews.8*
703 %{_mandir}/man8/smmapd.8*
704 %{_mandir}/man8/squatter.8*
705 %{_mandir}/man8/sync_client.8*
706 %{_mandir}/man8/syncnews.8*
707 %{_mandir}/man8/sync_reset.8*
708 %{_mandir}/man8/sync_server.8*
709 %{_mandir}/man8/timsieved.8*
710 %{_mandir}/man8/tls_prune.8*
711 %{_mandir}/man8/unexpunge.8*
712 %doc COPYRIGHT README README.RPM
713 %if %{build_autocreate}
714 # %doc README.autocreate
715 %endif
716
717 %files murder
718 %doc doc/text/install-murder
719 %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/mupdate
720 %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/csync
721 %{_cyrexecdir}/lmtpproxyd
722 %{_cyrexecdir}/mupdate
723 %{_cyrexecdir}/pop3proxyd
724 %{_cyrexecdir}/proxyd
725
726 %files nntp
727 %doc doc/text/install-netnews
728 %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/nntp
729 %{_cyrexecdir}/fetchnews
730 %{_cyrexecdir}/nntpd
731 %{_mandir}/man8/nntpd.8*
732 %{_mandir}/man8/fetchnews.8*
733
734 %files devel
735 %{_includedir}/cyrus
736 %{_libdir}/lib*.a
737 %{_mandir}/man3/imclient.3*
738
739 %files -n perl-Cyrus
740 %doc perl/imap/README perl/imap/Changes perl/imap/examples
741 %{perl_vendorarch}/auto/Cyrus
742 %{perl_vendorarch}/Cyrus
743 %{_mandir}/man3/Cyrus*
744
745 %files utils
746 %{_cyrexecdir}/cyradm
747 %{_cyrexecdir}/imtest
748 %{_cyrexecdir}/imapcreate
749 %{_bindir}/*
750 %{_mandir}/man1/*

  ViewVC Help
Powered by ViewVC 1.1.30