Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > by-pkgid > 08b68bca035167118f0784235c7182ec > files > 29

cyrus-imapd-2.2.13-4mdv2007.0.src.rpm


# THIS PACKAGE IS STORED IN SVN
# PLEASE DO NOT UPLOAD WITHOUT
# COMMITTING YOUR CHANGES FIRST

# compatibility macros
%{?!mdkversion: %define mdkversion %(perl -pe '/(\\d+)\.(\\d)\.?(\\d)?/; $_="$1$2".($3||0)' /etc/mandrake-release)}
%{?!mkrel:%define mkrel(c:) %{-c:0.%{-c*}.}%{!?_with_unstable:%(perl -e '$_="%{1}";m/(.\*)(\\d+)$/;$rel=${2}-1;re;print "$1$rel";').%{?subrel:%subrel}%{!?subrel:1}.%{?distversion:%distversion}%{?!distversion:%(echo $[%{mdkversion}/10])}}%{?_with_unstable:%{1}}%{?distsuffix:%distsuffix}%{?!distsuffix:mdk}}
%{?!_with_unstable: %{error:%(echo -e "\n\n\nNOTE: THIS IS NOT AN ERROR\n\nYou are building package for a stable release, please see \nhttp://qa.mandrakesoft.com/twiki/bin/view/Main/DistroSpecificReleaseTag\nif you think this is incorrect\n\n\n ")}%(sleep 2)}

# use saslauth group if
%define SASLGROUP 0
%{?_with_saslgroup: %{expand: %%define SASLGROUP 1}}

# preforking cyrus.conf as default
%define PREFORK 1
%{?_without_prefork: %{expand: %%define PREFORK 0}}

# enable idled (default no)
%define IDLED 0
%{?_with_idled: %{expand: %%define IDLED 1}}

# enable automatic mailbox creation on deliver (default no):
%define build_autocreate 1
%{?_without_autocreate: %define build_autocreate 0}

# create on demand folder requested by sieve filter (default no):
%define build_autosieve 1
%{?_without_autosieve: %define build_autosieve 0}

# remove quota files extension:
%define build_rmquota 1
%{?_without_rmquota: %define build_rmquota 0}
 
# snmp support
%global with_snmp 1
%{?_without_snmp: %global with_snmp 0}

# virtual domains in LDAP support
# needed by Kolab2
%define build_virtualdomains_in_ldap 1
%{?_without_virtualdomains_in_ldap: %define build_virtualdomains_in_ldap 0}

Summary:	A high-performance mail store with IMAP and POP3 support
Name:		cyrus-imapd
Version:	2.2.13
Release:	%mkrel 4
License:	OSI Approved
Group:		System/Servers
URL:		http://asg.web.cmu.edu/cyrus/imapd/
Source0:	ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%{name}-%{version}.tar.gz
Source1:        ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%{name}-%{version}.tar.gz.sig
Source2:	cyrus-procmailrc
Source4:	cyrus-user-procmailrc.template
Source6:	%{name}.imap-2.1.x-conf
Source7:	cyrus-imapd.pamd-0.77
Source8:	cyrus-imapd.pamd
Source11:	%{name}.init
Source12:	%{name}.sysconfig
Source13:       http://clement.hermann.free.fr/scripts/Cyrus/imapcreate.pl
Source14:       %{name}.README.RPM
Source15:	%{name}.cvt_cyrusdb_all
Source16:	%{name}.magic
Source17:	mkimapdcert
Source18:	%{name}.cnf
Source19:	cyrus-imapd-procmail+cyrus.mc
Source20:	%{name}.cron-daily
Source21:	http://ftp.andrew.cmu.edu/pub/net/mibs/cmu/cmu.mib
# This patch fixes the perl install path for mdk9.0 and later
Patch5:		%{name}-mdk9.0perl-patch
# cyrus-master instead of master in syslog
Patch6:		%{name}-logident.patch
# adds munge8bit (convert 8bits headers to 'X') option
Patch9:		%{name}-2.2.7-munge8bit.patch
# Autocreate INBOX patch (http://email.uoa.gr/projects/cyrus/autocreate/)
Patch11:	http://email.uoa.gr/download/cyrus/cyrus-imapd-2.2.13/cyrus-imapd-2.2.13-autocreate-0.9.4.diff
# Create on demand folder requested by sieve filter (http://email.uoa.gr/projects/cyrus/autosievefolder/)
Patch13:	http://email.uoa.gr/download/cyrus/cyrus-imapd-2.2.12/cyrus-imapd-2.2.12-autosievefolder-0.6.diff
# Remove QUOTA patch (http://email.uoa.gr/projects/cyrus/quota-patches/rmquota/)
Patch14:	http://email.uoa.gr/download/cyrus/cyrus-imapd-2.2.12/cyrus-imapd-2.2.12-rmquota-0.5-0.diff
#command line switch to disallow plaintext login
Patch17:	%{name}-2.2.7-plaintext.patch
#remove syslog message for getrlimit to infinity
Patch18:	%{name}-2.1.16-getrlimit.patch
# 64-bit fixes
Patch19:	cyrus-imapd-2.2.8-64bit-fixes.patch
# (oe) allways try to find the preferred db
Patch20:	cyrus-imapd-2.2.12-find_db_shuffler.diff
# (oe) for kolab2: Allow for custom annotation
Patch21:	cyrus-imapd-2.2.13-annotate.diff
# (oe) for kolab2: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
Patch22:	cyrus-imapd-2.2.12-kolab-ldap.diff
# (oe) for kolab2: Allow for custom annotation
Patch23:	cyrus-imapd-2.2.13-cyradm_annotate.diff
# http://asg.web.cmu.edu/archive/message.php?mailbox=archive.cyrus-sasl&msg=7849
# https://bugzilla.andrew.cmu.edu/cgi-bin/cvsweb.cgi/src/cyrus/imtest/imtest.c.diff?r1=1.107&r2=1.108&f=u
Patch26:	cyrus-imapd-2.2.12-saslcompatfix.patch
# https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2786
Patch27:	cyrus-imapd-2.2.13-bug2786.diff
Requires:	perl
# with previous versions of sasl, imap LOGIN would fail
Requires:	%{mklibname sasl 2} >= 2.1.15
#Requires:	krb5-libs
Requires(pre):	/usr/sbin/useradd 
Requires(pre):	rpm-helper
%if %{SASLGROUP}
Requires(pre):	/usr/sbin/groupadd
%endif
Requires(post):	/sbin/chkconfig /usr/bin/openssl /usr/bin/chattr /bin/grep /bin/cp perl
Requires(preun):/sbin/service /sbin/chkconfig /usr/sbin/userdel /bin/rm
%if %{SASLGROUP}
Requires(preun):/usr/sbin/groupdel
%endif
Requires(postun):/sbin/service
Provides:	imap
Provides:	imap-server
BuildRequires:	autoconf2.5
BuildRequires:	libsasl-devel >= 2.1.15
BuildRequires:	e2fsprogs-devel
BuildRequires:	perl-devel
BuildRequires:	tcp_wrappers-devel
BuildRequires:	db4-devel >= 4.0
BuildRequires:	openssl-devel
BuildRequires:	flex
BuildRequires:	bison
BuildRequires:	groff >= 1.15-8
%if %{with_snmp}
BuildRequires:	net-snmp-devel >= 5.1-6mdk
BuildRequires:  libelfutils-devel
%endif
%if %{build_virtualdomains_in_ldap}
BuildRequires:	openldap-devel
%endif
BuildRoot:	%{_tmppath}/%{name}-%{version}-root


%if %{SASLGROUP}
%define		_saslgroup saslauth
%endif
%define		_cyrususer cyrus
%define		_cyrusgroup mail
%define		_vardata %{_var}/lib/imap
%define		_spooldata %{_var}/spool/imap
# (gb) stick to /usr/lib/cyrus-imapd as this is an existing practise
# from MDK 10.0 and below + /etc/init.d/cyrus-imapd would need to
# runtime-detect the libdir since this ought to be an arch-independent
# script.
%define		_cyrexecdir %{_prefix}/lib/cyrus-imapd
%define		_confdir master/conf
%if %{PREFORK}
%define		_cyrusconf %{_confdir}/prefork.conf
%else
%define		_cyrusconf %{_confdir}/normal.conf
%endif

%define		_ssldir %{_sysconfdir}/ssl/cyrus-imapd

%description
The Cyrus IMAP Server is a scaleable enterprise mail system
designed for use from small to large enterprise environments using
standards-based technologies.

A full Cyrus IMAP implementation allows a seamless mail and bulletin
board environment to be set up across multiple servers. It differs from
other IMAP server implementations in that it is run on "sealed"
servers, where users are not normally permitted to log in. The mailbox
database is stored in parts of the filesystem that are private to the
Cyrus IMAP system. All user access to mail is through software using
the IMAP, POP3, or KPOP protocols. TLSv1 and SSL are supported for
security.

This is the main package, install also the %{name}-utils package (it
contains server administration tools and depends on the perl-Cyrus
package).

%package	murder
Summary:	Cyrus IMAP server murder aggregator system files
Group:		System/Servers
Requires:	%{name} = %{version}-%{release}

%description	murder
The %{name}-murder package contains the Cyrus murder aggregator system,
i.e. IMAP, POP3 and LMTP proxies, and the mupdate mailbox master daemon.
It allows for cluster setups where there are many backend Cyrus spools
and frontend proxy servers.

%package	nntp
Summary:	Cyrus IMAP server murder nntp support files
Group:		System/Servers
Requires:	%{name} = %{version}-%{release}
Conflicts:	leafnode

%description	nntp
Cyrus has the ability to export Usenet via IMAP and/or export shared
IMAP mailboxes via NNTP. This is made possible by a new NNTP daemon
which is included in this package.

%package	devel
Summary:	Cyrus IMAPd development files
Group:		Development/Other

%description	devel
This package contains header files and libraries necessary for 
developing applications which use the imclient library.

The main package is %{name}.

%package -n	perl-Cyrus
Summary:	Cyrus IMAPd utility Perl modules
Group:		Development/Perl
# with previous versions of sasl, imap LOGIN would fail
Requires:	%{mklibname sasl 2} >= 2.1.15

%description -n	perl-Cyrus
This package contains Perl modules necessary to use the Cyrus server
administrative utilities.

The main package is %{name}.

%package	utils
Summary:	Cyrus IMAPd server admin utilities
Group:		System/Servers
Requires:	perl-Cyrus = %{version}-%{release}

%description	utils
This package contains Cyrus IMAPd server administrative tools. It 
can be installed on systems other than the one running the server.

This package depends on the perl-Cyrus package.
The main package is %{name}.

%prep

%setup -q
%patch5 -b .mdk9.0perl
%patch6
%patch9 -p1 -b .munge8bit
%if %{build_autocreate}
%patch11 -p1 -b .autocreate
%endif
%if %{build_autosieve}
%patch13 -p1 -b .autosieve
%endif
%if %{build_rmquota}
%patch14 -p1 -b .rmquota
%endif

%patch17 -p1 -b .plaintext
%patch18 -p1 -b .getrlimit
%patch19 -p1 -b .64bit-fixes
%patch20 -p0 -b .find_db_shuffler

# (oe) for kolab2: Allow for custom annotation
%patch21 -p0 -b .annotate
# (oe) for kolab2: Patch to support virtdomains: ldap (parse domain from "email" field an LDAP user entry)
%if %{build_virtualdomains_in_ldap}
%patch22 -p1 -b .kolab-ldap
%endif
# (oe) for kolab2: Allow for custom annotation
%patch23 -p1 -b .annotate

%patch26 -p2 -b .saslcompat
%patch27 -p0 -b .bug2786

## Extra documentation
mkdir -p extradocs
for i in %{SOURCE2} %{SOURCE4} %{SOURCE19} ; do
  cp $i extradocs
done 

## remove cvs file
rm -f doc/text/.cvsignore

## regenerate html man pages
pushd man
for mp in *[1-8] ; do groff -m man -T html $mp > ../doc/man/$mp.html ; done
popd

# fix build under mdx8.2
perl -ni -e "print unless /^AC_PREREQ/" configure.in

# fix conditional pam config file
%if %{mdkversion} < 200610
install -m 0644 %{SOURCE7} cyrus-imapd.pamd
%else
install -m 0644 %{SOURCE8} cyrus-imapd.pamd
%endif

%build
CPPFLAGS="-I%{_includedir}/et"
export CPPFLAGS
CFLAGS="$RPM_OPT_FLAGS -fPIC"
export CFLAGS
LDFLAGS="-L%{_libdir}"
export LDFLAGS

#with the existing autom4te.cache autoheader would fail with the message
#Can't locate object method "path" via package "Request" at /usr/share/autoconf/Autom4te/C4che.pm line 69, <GEN1> line 111.
#

rm -rf autom4te.cache configure
export WANT_AUTOCONF_2_5=1

aclocal -I cmulocal; autoheader; autoconf

%configure2_5x \
%if %{IDLED}
    --with-idle=idled \
%endif
%if !%{with_snmp}
    --without-snmp \
%endif
    --with-extraident="Mandriva-RPM-%{version}-%{release}" \
    --with-syslogfacility=MAIL \
    --enable-murder \
    --enable-netscapehack \
    --enable-listext \
    --enable-annotatemore \
    --enable-nntp \
    --with-perl=%{__perl} \
    --with-cyrus-prefix=%{_cyrexecdir} \
    --with-service-path=%{_cyrexecdir} \
    --with-auth=unix
#    --with-krb=%{_prefix}/kerberos \
%{__make} 

# Modify docs master --> cyrus-master
pushd man
  perl -pi -e "s#master\(8\)#cyrus-master(8)#" `ls *5 *8`
  cd ../doc
  perl -pi -e "s#master#cyrus-master#g;" man.html
  cd man
  perl -pi -e "s#master\(8\)#cyrus-master(8)#;" `ls *html`
popd

# Modify path in perl scripts
pushd perl/imap/examples
  perl -pi -e "s#/usr/local/bin/perl#%{__perl}#" `find . -type f -name "*.pl"`
popd

# Cleanup of doc dir
find doc perl -name CVS -type d | xargs -r rm -fr
find doc -name "*~" -type f | xargs -r rm -f
rm -f doc/Makefile.dist
rm -f doc/text/htmlstrip.c

# modify lmtp socket path in .conf files
perl -pi -e "s#/var/imap#%{_vardata}#" %{_confdir}/*.conf

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%makeinstall_std
%makeinstall_std -C man

%{__install} -m 755 imtest/imtest	%{buildroot}%{_cyrexecdir}/
%{__install} -m 755 perl/imap/cyradm	%{buildroot}%{_cyrexecdir}/

# Install tools
for tool in dohash masssievec mkimap mknewsgroups rehash translatesieve undohash  upgradesieve ; do
	 test -f tools/${tool} && %{__install} -m 755 tools/${tool} %{buildroot}%{_cyrexecdir}/
done
%{__install} -m 755 %{SOURCE13} %{buildroot}%{_cyrexecdir}/imapcreate

# Create directories
%{__install} -d \
%if %{with_snmp}
        %{buildroot}%{_datadir}/snmp/mibs \
%endif
	%{buildroot}%{_sysconfdir}/{rc.d/init.d,pam.d,sysconfig,cron.daily} \
	%{buildroot}%{_libdir}/sasl \
	%{buildroot}%{_bindir} \
	%{buildroot}%{_spooldata}/stage. \
	%{buildroot}%{_vardata}/{user,quota,proc,log,msg,socket,db,sieve,rpm,backup} \
        %{buildroot}%{_datadir}/%{name}/rpm \
        %{buildroot}%{_ssldir}

# Install additional files
%{__install} -m 755 %{SOURCE15}   %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all
%{__install} -m 755 %{SOURCE16}   %{buildroot}%{_datadir}/%{name}/rpm/magic
%{__install} -m 755 %{SOURCE17}   %{buildroot}%{_cyrexecdir}/mkimapdcert
%{__install} -m 600 %{SOURCE18}   %{buildroot}%{_ssldir}/cyrus-imapd.cnf

# Install config files
%{__install} -m 644 %{_cyrusconf} %{buildroot}%{_sysconfdir}/cyrus.conf
%{__install} -m 644 %{SOURCE6}    %{buildroot}%{_sysconfdir}/imapd.conf

%{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/pop
%{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/imap
%{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/sieve
%{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/mupdate
%{__install} -m 644 cyrus-imapd.pamd %{buildroot}%{_sysconfdir}/pam.d/lmtp

%{__install} -m 644 %{SOURCE12}   %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -m 755 %{SOURCE11}   %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
%{__install} -m 755 %{SOURCE20}   %{buildroot}%{_sysconfdir}/cron.daily/%{name}

%if %{with_snmp}
# Install snmp mibs
%{__install} -m 644 master/CYRUS-MASTER.mib %{buildroot}%{_datadir}/snmp/mibs/CYRUS-MASTER-MIB.txt
%{__install} -m 644 %{SOURCE21} %{buildroot}%{_datadir}/snmp/mibs/CMU-MIB.txt
%endif

# Install README.RPM
%{__install} -m 644 %{SOURCE14} README.RPM
cat << EOF >> README.RPM

RPM BUILD TIME CONFIGURATION OPTIONS

This RPM package has been compiled with the following options:

use saslauth group
SASLGROUP: %{SASLGROUP}

use preforking cyrus.conf
PREFORK: %{PREFORK}

enable IDLED support
IDLED: %{IDLED}

enable full directory hash
FULLDIRHASH: %{FULLDIRHASH}

EOF

# Install templates
%{__install} -m 755 -d doc/conf
%{__install} -m 644 %{_confdir}/*.conf doc/conf/

# Rename 'master' binary and manpage to avoid crash with postfix
mv -f %{buildroot}%{_cyrexecdir}/master	%{buildroot}%{_cyrexecdir}/cyrus-master
mv -f %{buildroot}%{_mandir}/man8/master.8 %{buildroot}%{_mandir}/man8/cyrus-master.8
cp -af doc/man/master.8.html doc/man/cyrus-master.8.html

# Create symlinks
ln -sf ../lib/cyrus-imapd/cyradm %{buildroot}%{_bindir}/
ln -sf ../lib/cyrus-imapd/imtest %{buildroot}%{_bindir}/
ln -sf ../lib/cyrus-imapd/imapcreate %{buildroot}%{_bindir}/

# Create magic file for skiplist
file -C -m %{buildroot}%{_datadir}/%{name}/rpm/magic

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%pre
# Create 'cyrus' user on target host
%if %{SASLGROUP}
/usr/sbin/groupadd -r %{_saslgroup} 2> /dev/null || :
/usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
				-G %{_saslgroup} -s /bin/bash -r %{_cyrususer} 2> /dev/null || :
%else
/usr/sbin/useradd -c "Cyrus IMAP Server" -d %{_vardata} -g %{_cyrusgroup} \
	-s /bin/bash -r %{_cyrususer} 2> /dev/null || :
%endif

%post
if [ $1 = 1 ] ; then

# make sure we own the stuff, otherwise /var/log/mail/* will fill
# the whole disk with error messages...
chown -R %{_cyrususer}:%{_cyrusgroup} %{_vardata} %{_spooldata}

  #Create a self-signed server key and certificate 
  #The script checks first if they exists, if yes, it exits, 
  #otherwise, it creates them.
  if ! [ -f %{_ssldir}/cyrus-imapd.pem ];then
    sh %{_cyrexecdir}/mkimapdcert >/dev/null 
  fi
fi


# Force synchronous updates only on ext2 filesystems
# Note: This will slow down user creation for 10.000+ users!
for i in %{_vardata}/{user,quota} %{_spooldata}
do
	if [ `find $i -maxdepth 0 -printf %F` = "ext2" ]; then
		chattr -R +S $i 2>/dev/null
	fi
done

# Add sieve service if necessary
if ! grep -q ^sieve %{_sysconfdir}/services; then
	echo -e 'sieve\t\t2000/tcp\t\t\t# Sieve mail filter daemon' >> %{_sysconfdir}/services
fi

# Add lmtp service if necessary
if ! grep -q ^lmtp %{_sysconfdir}/services; then
	echo -e 'lmtp\t\t2003/tcp\t\t\t# Local mail delivery protocol (rfc2033)' >> %{_sysconfdir}/services
fi

# upgrade from previous versions with compiled in database backends
rm -f %{_vardata}/rpm/db.cfg.cache 2> /dev/null

# "ctl_deliver -E" is deprecated, now is "cyr_expire -E"
if grep -q "ctl_deliver *-E" %{_sysconfdir}/cyrus.conf ; then
  perl -pi -e "s/ctl_deliver *-E/cyr_expire -E/" %{_sysconfdir}/cyrus.conf
fi
# compile to byte code sieve scripts on upgrade
# masssievec needs to run:
# - for versions before 2.2.0 (2.1.x) since they had no bytecode
# - upgrading from 2.2.0 since the bytecode has changed
# - upgrading from 2.2.1 since the bytecode has changed
if [ $1 != 1 ] ; then 
  if [ -f %{_vardata}/rpm/version ] ; then
    oldversion=`cat %{_vardata}/rpm/version`
    if [ "$oldversion" = "2.2.0" -o "$oldversion" = "2.2.1" ] ; then
      compile_needed=1
    else
      compile_needed=0
    fi
  else
    # versions prior to 2.2.x didn't write the file
    compile_needed=1
  fi
  if [ $compile_needed = 1 ] ; then
    echo "compiling sieve scripts"
    su cyrus -c "%{_cyrexecdir}/masssievec %{_cyrexecdir}/sievec"
  fi
fi
# cache the installed version for next upgrade
echo %{version} > %{_vardata}/rpm/version

%_post_service %{name}


%preun
%_preun_service %{name}
if [ $1 = 0 ]; then
	/usr/sbin/userdel %{_cyrususer} 2> /dev/null || :
%if %{SASLGROUP}
	if [ "`grep ^%{_saslgroup}: %{_sysconfdir}/group | cut -d: -f4-`" = "" ]; then
		/usr/sbin/groupdel %{_saslgroup} 2> /dev/null || :
	fi
%endif
	rm -f %{_vardata}/socket/lmtp 2> /dev/null
	rm -f %{_vardata}/rpm/version 2> /dev/null
fi

%triggerin -- %{name} < 2.0.0
#To avoid automatic restart of the daemon when upgrading from versions
#1.x.x of Cyrus IMAPd in rpm form, be sure the old daemon is stopped
/sbin/service %{name} stop >/dev/null 2>&1 || :


%files
%defattr(-,root,root)
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/*.conf
%attr(0755,root,root) %config(noreplace) %{_sysconfdir}/rc.d/init.d/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%attr(0644,root,root) %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/pop
%attr(0644,root,root) %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/imap
%attr(0644,root,root) %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/sieve
%attr(0644,root,root) %config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/lmtp
%attr(0755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
%attr(0755,root,root) %dir %{_cyrexecdir}
%attr(0755,root,root) %{_cyrexecdir}/arbitron
%attr(0755,root,root) %{_cyrexecdir}/chk_cyrus
%attr(0755,root,root) %{_cyrexecdir}/ctl_cyrusdb
%attr(0755,root,root) %{_cyrexecdir}/ctl_deliver
%attr(0755,root,root) %{_cyrexecdir}/ctl_mboxlist
%attr(0755,root,root) %{_cyrexecdir}/cvt_cyrusdb
%attr(0755,root,root) %{_cyrexecdir}/cvt_cyrusdb_all
%attr(0755,root,root) %{_cyrexecdir}/mkimapdcert
%attr(0755,root,root) %{_cyrexecdir}/cyrdump
%attr(0755,root,root) %{_cyrexecdir}/cyrus-master
%attr(0755,root,root) %{_cyrexecdir}/dohash
%attr(0755,root,root) %{_cyrexecdir}/cyr_expire
%attr(0755,root,root) %{_cyrexecdir}/fud
%attr(0755,root,root) %{_cyrexecdir}/imapd
%attr(0755,root,root) %{_cyrexecdir}/ipurge
%attr(0755,root,root) %{_cyrexecdir}/lmtpd
%attr(0755,root,root) %{_cyrexecdir}/mbpath
%attr(0755,root,root) %{_cyrexecdir}/mkimap
%attr(0755,root,root) %{_cyrexecdir}/notifyd
%attr(0755,root,root) %{_cyrexecdir}/pop3d
%attr(0755,root,root) %{_cyrexecdir}/quota
%attr(0755,root,root) %{_cyrexecdir}/reconstruct
%attr(0755,root,root) %{_cyrexecdir}/rehash
%attr(0755,root,root) %{_cyrexecdir}/squatter
%attr(0755,root,root) %{_cyrexecdir}/timsieved
%attr(0755,root,root) %{_cyrexecdir}/tls_prune
%attr(0755,root,root) %{_cyrexecdir}/translatesieve
%attr(0755,root,root) %{_cyrexecdir}/undohash
%attr(0755,root,root) %{_cyrexecdir}/masssievec
%attr(0755,root,root) %{_cyrexecdir}/mknewsgroups
%attr(0755,root,root) %{_cyrexecdir}/upgradesieve
%attr(0755,root,root) %{_cyrexecdir}/mbexamine
%attr(0755,root,root) %{_cyrexecdir}/sievec
%if %build_autocreate
%attr(0755,root,root) %{_cyrexecdir}/compile_sieve
%endif
%attr(0755,root,root) %{_cyrexecdir}/smmapd
%if %{IDLED}
%attr(0755,root,root) %{_cyrexecdir}/idled
%endif
%attr(4754,%{_cyrususer},%{_cyrusgroup}) %{_cyrexecdir}/deliver
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_vardata}
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/user
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/quota
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/proc
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/log
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/msg
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/socket
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/db
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/sieve
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/rpm
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_vardata}/backup
%attr(0500,%{_cyrususer},%{_cyrusgroup}) %dir %{_ssldir}
%attr(0600,%{_cyrususer},%{_cyrusgroup}) %config(noreplace) %{_ssldir}/cyrus-imapd.cnf
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %dir %{_spooldata}
%attr(0750,%{_cyrususer},%{_cyrusgroup}) %{_spooldata}/*
%attr(0755,root,root) %dir %{_datadir}/%{name}
%attr(0755,root,root) %dir %{_datadir}/%{name}/rpm
%attr(0644,root,root) %{_datadir}/%{name}/rpm/*
%if %{with_snmp}
%attr(0644,root,root) %{_datadir}/snmp/mibs/*
%endif
%attr(0644,root,root) %{_mandir}/man5/*
%attr(0644,root,root) %{_mandir}/man8/arbitron.8*
%attr(0644,root,root) %{_mandir}/man8/chk_cyrus.8*
%attr(0644,root,root) %{_mandir}/man8/ctl_cyrusdb.8*
%attr(0644,root,root) %{_mandir}/man8/ctl_deliver.8*
%attr(0644,root,root) %{_mandir}/man8/ctl_mboxlist.8*
%attr(0644,root,root) %{_mandir}/man8/cvt_cyrusdb.8*
%attr(0644,root,root) %{_mandir}/man8/cyr_expire.8*
%attr(0644,root,root) %{_mandir}/man8/cyrus-master.8*
%attr(0644,root,root) %{_mandir}/man8/deliver.8*
%attr(0644,root,root) %{_mandir}/man8/fud.8*
%attr(0644,root,root) %{_mandir}/man8/idled.8*
%attr(0644,root,root) %{_mandir}/man8/imapd.8*
%attr(0644,root,root) %{_mandir}/man8/ipurge.8*
%attr(0644,root,root) %{_mandir}/man8/lmtpd.8*
%attr(0644,root,root) %{_mandir}/man8/mbexamine.8*
%attr(0644,root,root) %{_mandir}/man8/mbpath.8*
%attr(0644,root,root) %{_mandir}/man8/notifyd.8*
%attr(0644,root,root) %{_mandir}/man8/pop3d.8*
%attr(0644,root,root) %{_mandir}/man8/quota.8*
%attr(0644,root,root) %{_mandir}/man8/reconstruct.8*
%attr(0644,root,root) %{_mandir}/man8/rmnews.8*
%attr(0644,root,root) %{_mandir}/man8/smmapd.8*
%attr(0644,root,root) %{_mandir}/man8/squatter.8*
%attr(0644,root,root) %{_mandir}/man8/syncnews.8*
%attr(0644,root,root) %{_mandir}/man8/timsieved.8*
%attr(0644,root,root) %{_mandir}/man8/tls_prune.8*
%doc COPYRIGHT README README.RPM
%if %{build_autocreate}
%doc README.autocreate
%endif
%doc doc/*
%doc extradocs/*

%files murder
%defattr(-,root,root)
%config(noreplace) %verify(not size,not md5) %{_sysconfdir}/pam.d/mupdate
%attr(0755,root,root) %{_cyrexecdir}/lmtpproxyd
%attr(0755,root,root) %{_cyrexecdir}/mupdate
%attr(0755,root,root) %{_cyrexecdir}/pop3proxyd
%attr(0755,root,root) %{_cyrexecdir}/proxyd
%doc doc/text/install-murder

%files nntp
%defattr(-,root,root)
%attr(0755,root,root) %{_cyrexecdir}/fetchnews
%attr(0755,root,root) %{_cyrexecdir}/nntpd
%attr(0644,root,root) %{_mandir}/man8/nntpd.8*
%attr(0644,root,root) %{_mandir}/man8/fetchnews.8*
%doc doc/text/install-netnews

%files devel
%defattr(-,root,root)
%{_includedir}/cyrus
%{_libdir}/lib*.a
%attr(0644,root,root) %{_mandir}/man3/imclient.3*

%files -n perl-Cyrus
%defattr(-,root,root)
%{perl_vendorarch}/auto/Cyrus
%{perl_vendorarch}/Cyrus
%attr(0644,root,root) %{_mandir}/man3/Cyrus*
%doc perl/imap/README
%doc perl/imap/Changes
%doc perl/imap/examples

%files utils
%defattr(-,root,root)
%attr(0755,root,root) %{_cyrexecdir}/cyradm
%attr(0755,root,root) %{_cyrexecdir}/imtest
%attr(0755,root,root) %{_cyrexecdir}/imapcreate
%attr(0755,root,root) %{_bindir}/*
%attr(0644,root,root) %{_mandir}/man1/*



%changelog
* Tue Aug 15 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-08-15 15:09:06 (56199)
- added parallel init information to the initscript (closes #24222)

* Sat Aug 05 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-08-05 00:01:56 (53022)
- added some commented options to default imapd.conf (#22197)

* Fri Aug 04 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-08-04 23:55:33 (53020)
- bunzip pam conf files

* Fri Aug 04 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-08-04 23:52:17 (53012)
- import cyrus-imapd-2.2.13-2mdv2007.0

* Sun Jun 11 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.13-2mdv2007.0
- added P27 (#23051)

* Thu Jun 01 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.13-1mdv2007.0
- 2.2.13
- drop upstream patches; P0,P24,P25
- new P11
- rediffed patches; P21,P23
- cleaned up the spec file some
- make it backportable for older pam (S7,S8)

* Thu May 25 2006 Andreas Hasenack <andreas@mandriva.com> 2.2.12-22mdk
- added patch from CVS to fix a compatibility issue with sasl-2.1.22 final
  (imtest was incorrectly relying on a sasl bug that was fixed)
- removed buildrequires for XFree86-devel, couldn't find anything using it

* Fri May 12 2006 Stefan van der Eijk <stefan@eijk.nu> 2.2.12-21mdk
- rebuild for sparc

* Mon Apr 17 2006 Andreas Hasenack <andreas@mandriva.com> 2.2.12-20mdk
- added patch for timsieved, from amal@krasn.ru, to fix
  "Database handles remain at environment close" errors when using
  berkeley db for tls sessions

* Fri Mar 24 2006 Andreas Hasenack <andreas@mandriva.com> 2.2.12-19mdk
- updated auto-* patches

* Wed Jan 04 2006 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-18mdk
- rebuilt against new net-snmp with new major (10)

* Wed Dec 21 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-17mdk
- rebuilt against net-snmp that has new major (9)

* Sun Nov 13 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-16mdk
- rebuilt against openssl-0.9.8a

* Wed Sep 07 2005 Andreas Hasenack <andreas@mandriva.com> 2.2.12-15mdk
- added patch from wes@umich.edu to avoid an off-by-one error which
  was causing cyrus to reject messages with long lines. Thanks to 
  joeghi for supplying a sample message and being patient.
  (fixes https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2676)

* Tue Aug 30 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-14mdk
- rebuilt against new openldap-2.3.6 libs

* Fri Aug 12 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-13mdk
- added one more annotation patch for kolab2 from the kolab cvs

* Thu Aug 04 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-12mdk
- revert the lib64 fixes

* Thu Aug 04 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-11mdk
- %{_cyrexecdir} is now %{_libdir}/cyrus-imap

* Fri Jul 29 2005 Andreas Hasenack <andreas@mandriva.com> 2.2.12-10mdk
- enabled virtual domains in ldap by default (needed by Kolab2)
- moved virtual domains' buildrequires (openldap) outside the nested %if
  it was in (otherwise, it would only be required if snmp support was also
  enabled)

* Fri Jul 22 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-9mdk
- use a more descriptive build option for virtual domains in ldap (Andreas Hasenack)
- reworked the virtual domains in ldap patch (Andreas Hasenack)

* Wed Jul 06 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.12-8mdk
- added rediffed P21, P22 from the openpkg kolab2 packages
- added one gcc4 patch by Ondrej Sury

* Sun Mar 20 2005 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.2.12-7mdk
- fix #9788, conflicts is in the eyes of the beholder...

* Sat Mar 19 2005 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.2.12-6mdk
- only do the recursive chown if not upgrading (Luca Olivetti)

* Thu Mar 17 2005 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.2.12-5mdk
- make sure cyrus:mail owns /var/lib/imap 
  and /var/spool/imap in %post

* Fri Mar 11 2005 Luca Berra <bluca@vodka.it> 2.2.12-4mdk
- revert liblm_sensors-devel change, fixed in net-snmp package

* Thu Mar 10 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.2.12-3mdk
- buildrequires: liblm_sensors-devel (cyrus-imapd/master)

* Fri Feb 25 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.2.12-2mdk
- rebuilt against the system bdb (P20)

* Tue Feb 15 2005 Luca Olivetti <luca@olivetti.cjb.net> 2.2.12-1mdk
- 2.2.12 (bug fix release)
- ugly compatibility macros for uglier release tag. See
  http://qa.mandrakesoft.com/twiki/bin/view/Main/DistroSpecificReleaseTag
- new autocreate and autosievefolder patches

* Thu Jan 13 2005 Luca Olivetti <luca@olivetti.cjb.net> 2.2.10-2mdk
- drop last digit from release tag
- fetchnews man page moved to cyrus-imapd-nntp subpackage (conflict with
  leafnode, thanks to Marek Kruz.el <marek@good.solutions.net.pl>
- new version of autocreate patch
- removed last chunk from 64bit fixes patch (the fault was in the
  previous autocreate patch, not in cyrus proper)

* Wed Nov 24 2004 Luca Olivetti <luca@olivetti.cjb.net> 2.2.10-1mdk
- 2.2.10 (security fixes)
- removed failing hunk in 64-bit fixes patch, it shouldn't be necessary
  anymore

* Tue Oct 26 2004 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.2.8-3mdk
- some 64-bit fixes
- stick to /usr/lib/cyrus-imapd as _cyrexecdir

* Sat Aug 28 2004 Luca Berra <bluca@vodka.it> 2.2.8-2.mdk
- rebuild with db-4.2

* Fri Jul 30 2004 Luca Olivetti <luca@olivetti.cjb.net> 2.2.8-1mdk
- 2.2.8

* Tue Jul 27 2004 Luca Olivetti <luca@olivetti.cjb.net> 2.2.7-1mdk
- 2.2.7
- new autocreate,autosievefolder,rmquota patches
- removed p100 (quota patches from cvs)
- removed p2 and p3 (man pages fixes, fixed upstream)
- patch9 (munge8bit) and patch17 (plaintext) no longer patch html manpage
  (it's less tiresome to regenerate them with groff)
- removed patch19 (masssievec, fixed upstream)
- cleanup

* Thu Jul 01 2004 Luca Olivetti <luca@olivetti.cjb.net> 2.2.6-2mdk
- new imapcreate.pl script
- added quota patches from cvs

* Wed Jun 23 2004 Luca Olivetti <luca@olivetti.cjb.net> 2.2.6-1mdk
- 2.2.6
- changed version detection defines (and now it builds under 10.0 again)
- new autocreate,autosievefolder,rmquota patches
- removed patch0 (mandir, fixed upstream)
- removed patch1 (cflags, fixed upstream)
- rediffed patch9 (munge8bit)
- removed patch16 (netsnmp, , upstream package already has net-snmp support)
- rediffed patch17 (disallow plaintext login with a command line switch)
- removed patch100 (fix list command for non personal namespaces, fixed
  upstream)
- added BuildRequires libelfutils-devel for net-snmp

* Thu Jun 17 2004 Luca Berra <bluca@vodka.it> 2.2.3-7mdk
- updated p15 and rebuilt against updated net-snmp
- add 10.1 to recognized versions

* Mon Apr 05 2004 Florin <florin@mandrakesoft.com> 2.2.3.6
- update to 2.2.3 (merge with the L. Olivetti's work)

* Fri Jan 23 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 2.1.16-5mdk
- rebuild with the new net-snmp that doesn't require rpm
- replaced agent-libs by netsnmp-agent-libs in ucdsnmp.m4 so we don't link
  with extra libraries, such as libelf, librpm, popt, etc.

* Thu Jan 22 2004 Laurent MONTEL <lmontel@mandrakesoft.com> 2.1.16-4mdk
- Rebuild with new perl

* Sun Jan 18 2004 <bluca@vodka.it> 2.1.16-3mdk
- fixed net-snmp patch (me sucks)

* Sun Dec 28 2003 Luca Berra <bluca@vodka.it> 2.1.16-2mdk
- added net-snmp patch (P16)
- force use of secure connections on daemon command-line (P17)

* Sun Dec 28 2003 Giuseppe GHibò <ghibo@mandrakesoft.com> 2.1.16-1mdk
- Release 2.1.16.
- Updated Patch12 (IPV6).
- Updated Patch11 (autocreate).
- Added Patch13 (autosieve)
- Added Patch15 (username_tolower), from Simon Matter's RPM.
- Added Patch100.

* Thu Dec 11 2003 Florin <florin@mandrakesoft.com> 2.1.15-8mdk
- fix the libsnmp-devel requires (stupid me)
- get rid of rpm-devel

* Thu Dec 11 2003 Florin <florin@mandrakesoft.com> 2.1.15-7mdk
- fix the mdk82,90,92 macro definitions
- add rpm-devel in BuildRequires (G. Ghibo)
- Requires on libnet-snmp-devel instead of libsnmp-devel
- remove the libopenssl0.9.7, libsasl2 explicit Requires
- use config(noreplace) for the initscripts and the cron files

* Mon Sep 22 2003 Florin <florin@mandrakesoft.com> 2.1.15-6mdk
- requires libopenssl0.9.7

* Mon Sep 22 2003 Florin <florin@mandrakesoft.com> 2.1.15-5mdk
- fix wrong buildrequires

* Fri Sep 19 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.1.15-4mdk
- adjust requires

* Wed Sep 03 2003 Florin <florin@mandrakesoft.com> 2.1.15-3mdk
- remove the Requires on the devel package

* Wed Aug 27 2003 Luca Olivetti <luca@olivetti.cjb.net> 2.1.15-2mdk
- now should build under 8.2/9.0/9.1 as well as cooker

* Tue Aug 26 2003 Florin <florin@mandrakesoft.com> 2.1.15-1mdk
- 2.1.15
- upgrade the ipv6 and autocreate patches
- comment out the perllocal.pod line (file not found)
- add the unpackaged file arbitron

* Thu Jul 31 2003 Luca Olivetti <luca@olivetti.cjb.net> 2.1.13-4mdk
- ipv6 support
- snmp monitoring enabled
- just one source for pam default configuration (they were all the same)
- added /etc/pam.d/lmtp
- removed source21 (migration scripts, should be packaged separately)
- removed libdb dependencies for perl-Cyrus

* Tue Jul 22 2003 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.14-3mdk
- add mailbox autocreation patch (disable with --without autocreate)
- make it short-circuit (don't mv files from builddir to buildroot in install)

* Sat Jul 19 2003 Luca Olivetti <luca@olivetti.cjb.net> 2.1.14-2mdk
- merged changes from 2.1.13-1mdk, 2.1.13-2mdk and 2.1.13-3mdk missing
  from 2.1.14-1mdk
- removed patch 8 (forcedowncase, same option included upstream)
- rediffed patch 9 (munge8bit)
- removed patch11 (fixes for db4.1), fixed upstream

* Wed Jul 16 2003 Florin <florin@mandrakesoft.com> 2.1.14-1mdk
- 2.1.14
- add mbexamine

* Wed Jun 18 2003 Buchan Milne <bgmilne@linux-mandrake.com> 2.1.13-3mdk
- Require perl-devel
- Don't require libdb4.0, 9.0 and later should do auto-requires.
- Compiled against db4.1, sasl2