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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30