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

  ViewVC Help
Powered by ViewVC 1.1.30