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

  ViewVC Help
Powered by ViewVC 1.1.30