parent
69fe149e8c
commit
d28c0d0250
101
cyrus-imapd.spec
101
cyrus-imapd.spec
@ -1,8 +1,8 @@
|
||||
#TODO: merge all sub-packages (except -devel) into cyrus-imapd, they are all required
|
||||
|
||||
Name: cyrus-imapd
|
||||
Version: 2.3.15
|
||||
Release: 6%{?dist}
|
||||
|
||||
%define _dbver db4
|
||||
Release: 7%{?dist}
|
||||
|
||||
%define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem
|
||||
|
||||
@ -15,11 +15,7 @@ Release: 6%{?dist}
|
||||
%define _spooldata %{_var}/spool/imap
|
||||
%define _cyrexecdir %{_exec_prefix}/lib/%{name}
|
||||
|
||||
#FIXME: check if wise to remove (2x):
|
||||
%define _confdir master/conf
|
||||
%define _contribdir doc/contrib
|
||||
|
||||
%define _cyrusconf %{_confdir}/prefork.conf
|
||||
%define _cyrusconf master/conf/prefork.conf
|
||||
|
||||
Summary: A high-performance mail server with IMAP, POP3, NNTP and SIEVE support
|
||||
License: MIT
|
||||
@ -78,18 +74,18 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: autoconf >= 2.59
|
||||
BuildRequires: cyrus-sasl-devel >= 2.1.15-1, perl-devel, tcp_wrappers
|
||||
BuildRequires: %{_dbver}-devel, openssl-devel, pkgconfig
|
||||
BuildRequires: flex, bison, groff >= 1.15-8, automake
|
||||
BuildRequires: db4-devel, openssl-devel, pkgconfig
|
||||
BuildRequires: flex, bison, groff, automake
|
||||
BuildRequires: openldap-devel
|
||||
BuildRequires: krb5-devel
|
||||
BuildRequires: net-snmp-devel
|
||||
|
||||
Requires(post): e2fsprogs, /sbin/chkconfig, /sbin/service, perl, grep, coreutils, findutils
|
||||
Requires(preun): /sbin/chkconfig, /sbin/service, coreutils
|
||||
Requires(postun): /sbin/service
|
||||
Requires(post): e2fsprogs, chkconfig, initscripts, perl, grep, coreutils, findutils
|
||||
Requires(preun): chkconfig, initscripts, coreutils
|
||||
Requires(postun): initscripts
|
||||
|
||||
Requires: %{name}-utils = %{version}-%{release}
|
||||
Requires: cyrus-sasl-lib >= 2.1.15, file >= 3.35-1, %{_dbver}-utils
|
||||
Requires: cyrus-sasl-lib >= 2.1.15, file >= 3.35-1, db4-utils
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
%description
|
||||
@ -139,9 +135,9 @@ Cyrus IMAP server administration utilities.
|
||||
%package utils
|
||||
Group: Applications/System
|
||||
Summary: Cyrus IMAP server administration utilities
|
||||
Requires(pre): /usr/sbin/groupadd, /usr/sbin/useradd
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): grep, coreutils, make, openssl
|
||||
Requires(postun): /usr/sbin/userdel, /usr/sbin/groupdel
|
||||
Requires(postun): shadow-utils
|
||||
Requires: %{name}-perl = %{version}-%{release}
|
||||
|
||||
%description utils
|
||||
@ -167,7 +163,6 @@ one running the server.
|
||||
|
||||
# only to update config.* files
|
||||
automake -a -f -c || :
|
||||
|
||||
aclocal -I cmulocal
|
||||
autoheader
|
||||
autoconf -f
|
||||
@ -199,7 +194,7 @@ LDFLAGS="$LDFLAGS -pie"; export LDFLAGS
|
||||
--with-perl=%{__perl} \
|
||||
--with-cyrus-prefix=%{_cyrexecdir} \
|
||||
--with-service-path=%{_cyrexecdir} \
|
||||
--with-bdb-incdir=%{_includedir}/%{_dbver} \
|
||||
--with-bdb-incdir=%{_includedir}/db4 \
|
||||
--with-extraident="Fedora-RPM-%{version}-%{release}" \
|
||||
--with-syslogfacility=MAIL \
|
||||
--with-krbimpl=mit
|
||||
@ -246,23 +241,22 @@ find doc -name "*.html.*" -type f | xargs -r %{__rm} -f
|
||||
%{__install} -m 644 %{SOURCE29} doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
|
||||
|
||||
# modify lmtp socket path in .conf files
|
||||
%{__perl} -pi -e "s@/var/imap/@%{_vardata}/@" %{_confdir}/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
|
||||
%{__perl} -pi -e "s@/var/imap/@%{_vardata}/@" master/conf/*.conf doc/cyrusv2.mc doc/m4/%{name}-sendmail-8.12.9-cyrusv2.m4
|
||||
|
||||
# enable/disable idled in .conf files to prevent error messages
|
||||
|
||||
#FIXME:check if required in distributed conf, remove otherways
|
||||
%{__perl} -pi -e "s/# idled/ idled/" %{_confdir}/*.conf
|
||||
# enable in .conf files to prevent error messages
|
||||
%{__perl} -pi -e "s/# idled/ idled/" master/conf/*.conf
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
# This hack is needed on RedHat > 7.3 to install the perl files correctly
|
||||
# This hack is needed to install the perl files correctly
|
||||
pushd perl/imap
|
||||
%{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
|
||||
popd
|
||||
pushd perl/sieve/managesieve
|
||||
%{__perl} Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
|
||||
popd
|
||||
|
||||
# Do what the regular make install does
|
||||
%{__make} install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
|
||||
%{__make} -C man install DESTDIR=%{buildroot} PREFIX=%{_prefix} mandir=%{_mandir}
|
||||
@ -285,21 +279,21 @@ done
|
||||
%{buildroot}%{_vardata}/ptclient \
|
||||
%{buildroot}%{_datadir}/%{name}/rpm \
|
||||
%{buildroot}%{_sysconfdir}/pki/%{name} \
|
||||
%{_contribdir}
|
||||
doc/contrib
|
||||
|
||||
# Install additional files
|
||||
%{__install} -m 755 %{SOURCE13} %{buildroot}%{_cyrexecdir}/cvt_cyrusdb_all
|
||||
%{__install} -m 755 %{SOURCE28} %{buildroot}%{_cyrexecdir}/rpm_set_permissions
|
||||
%{__install} -m 644 %{SOURCE14} %{buildroot}%{_datadir}/%{name}/rpm/magic
|
||||
%{__install} -m 644 %{SOURCE10} %{_contribdir}/
|
||||
%{__install} -m 644 %{SOURCE15} %{_contribdir}/imapcreate
|
||||
%{__install} -m 644 %{SOURCE16} %{_contribdir}/cyrus_ldap_quota
|
||||
%{__install} -m 644 %{SOURCE17} %{_contribdir}/batchreconstruct
|
||||
%{__install} -m 644 %{SOURCE18} %{_contribdir}/bsd2cyrus
|
||||
%{__install} -m 644 %{SOURCE19} %{_contribdir}/cpmsg
|
||||
%{__install} -m 644 %{SOURCE20} %{_contribdir}/folderxfer
|
||||
%{__install} -m 644 %{SOURCE21} %{_contribdir}/inboxfer
|
||||
%{__install} -m 644 %{SOURCE30} %{_contribdir}/README
|
||||
%{__install} -m 644 %{SOURCE10} doc/contrib/
|
||||
%{__install} -m 644 %{SOURCE15} doc/contrib/imapcreate
|
||||
%{__install} -m 644 %{SOURCE16} doc/contrib/cyrus_ldap_quota
|
||||
%{__install} -m 644 %{SOURCE17} doc/contrib/batchreconstruct
|
||||
%{__install} -m 644 %{SOURCE18} doc/contrib/bsd2cyrus
|
||||
%{__install} -m 644 %{SOURCE19} doc/contrib/cpmsg
|
||||
%{__install} -m 644 %{SOURCE20} doc/contrib/folderxfer
|
||||
%{__install} -m 644 %{SOURCE21} doc/contrib/inboxfer
|
||||
%{__install} -m 644 %{SOURCE30} doc/contrib/README
|
||||
|
||||
# fix permissions on perl .so files
|
||||
find %{buildroot}%{_libdir}/perl5/ -type f -name "*.so" -exec %{__chmod} 755 {} \;
|
||||
@ -325,7 +319,7 @@ mv %{buildroot}%{_mandir}/man8/pop3d.8 %{buildroot}%{_mandir}/man8/pop3d.8cyrus
|
||||
|
||||
# Install templates
|
||||
%{__install} -m 755 -d doc/conf
|
||||
%{__install} -m 644 %{_confdir}/*.conf doc/conf/
|
||||
%{__install} -m 644 master/conf/*.conf doc/conf/
|
||||
|
||||
# Generate db config file
|
||||
( grep '^{' lib/imapoptions | grep _db | cut -d'"' -f 2,4 | \
|
||||
@ -387,17 +381,9 @@ fi
|
||||
# Force synchronous updates, usually only on ext2 filesystems
|
||||
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
|
||||
chattr -R +S $i 2>/dev/null ||:
|
||||
done
|
||||
|
||||
# prevent idled related errors to show up
|
||||
#FIXME:check if it changes anything nowadays? remove otherways
|
||||
if grep -q "^# idled" %{_sysconfdir}/cyrus.conf ; then
|
||||
%{__perl} -pi -e "s/^# idled/ idled/" %{_sysconfdir}/cyrus.conf
|
||||
fi
|
||||
|
||||
# Create SSL certificates
|
||||
exec > /dev/null 2> /dev/null
|
||||
|
||||
@ -441,7 +427,6 @@ fi
|
||||
|
||||
%post utils
|
||||
# Add service entries if necessary
|
||||
#FIXME: is this needed?
|
||||
if ! %{__grep} -q ^csync %{_sysconfdir}/services; then
|
||||
echo -e 'csync\t\t2005/tcp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
|
||||
echo -e 'csync\t\t2005/udp\t\t\t# Cyrus IMAP Replication Daemon' >> %{_sysconfdir}/services
|
||||
@ -450,8 +435,6 @@ fi
|
||||
%postun utils
|
||||
if [ $1 = 0 ]; then
|
||||
/usr/sbin/userdel %{_cyrususer} 2> /dev/null || :
|
||||
if [ "$(%{__grep} ^saslauth: %{_sysconfdir}/group | cut -d: -f4-)" = "" ]; then
|
||||
/usr/sbin/groupdel saslauth 2> /dev/null || :
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -461,7 +444,7 @@ fi
|
||||
%doc doc/*
|
||||
%config(noreplace) %{_sysconfdir}/cyrus.conf
|
||||
%config(noreplace) %{_sysconfdir}/imapd.conf
|
||||
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
|
||||
%{_sysconfdir}/rc.d/init.d/%{name}
|
||||
%{_sysconfdir}/logrotate.d/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/pop
|
||||
@ -471,7 +454,7 @@ fi
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/mupdate
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/csync
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/nntp
|
||||
%attr(0755,root,root) %{_sysconfdir}/cron.daily/%{name}
|
||||
%{_sysconfdir}/cron.daily/%{name}
|
||||
%dir %{_cyrexecdir}
|
||||
%{_cyrexecdir}/arbitron
|
||||
%{_cyrexecdir}/arbitronsort.pl
|
||||
@ -596,6 +579,10 @@ fi
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 24 2009 Michal Hlavinka <mhlaivnk@redhat.com> - 2.3.15-7
|
||||
- rebuild with new db4 (#540093)
|
||||
- spec cleanup
|
||||
|
||||
* Fri Nov 06 2009 Michal Hlavinka <mhlavink@redhat.com> - 2.3.15-6
|
||||
- fix sourcing of /etc/sysconfig/cyrus-imapd (#533320)
|
||||
|
||||
@ -827,7 +814,7 @@ fi
|
||||
|
||||
* Thu Dec 15 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.3
|
||||
- reintroduce subpackage utils, fix requirements
|
||||
- move some utils to %{_bindir}/
|
||||
- move some utils to %%{_bindir}/
|
||||
|
||||
* Wed Dec 14 2005 Simon Matter <simon.matter@invoca.ch> 2.3.0-0.2
|
||||
- integrate subpackages murder, nntp, replication, utils
|
||||
@ -988,9 +975,9 @@ fi
|
||||
|
||||
* Thu Jan 06 2005 Simon Matter <simon.matter@invoca.ch>
|
||||
- added more fixes to the autocreate patch
|
||||
- don't use %_libdir for %_cyrexecdir, it's a mess on x86_64
|
||||
- don't use %_libdir for symlinks
|
||||
- remove %_libdir pachtes
|
||||
- don't use %%_libdir for %%_cyrexecdir, it's a mess on x86_64
|
||||
- don't use %%_libdir for symlinks
|
||||
- remove %%_libdir pachtes
|
||||
- change pam configs to work on x86_64
|
||||
- changed default build option for IDLED to on
|
||||
- changed rpm_set_permissions to honor partitions in /etc/imapd.conf
|
||||
@ -1418,7 +1405,7 @@ fi
|
||||
- included sieve matching patch
|
||||
|
||||
* Thu Jun 27 2002 Simon Matter <simix@datacomm.ch>
|
||||
- fixed %post script where %F was expanded to file.file
|
||||
- fixed %%post script where %%F was expanded to file.file
|
||||
|
||||
* Wed Jun 26 2002 Simon Matter <simix@datacomm.ch>
|
||||
- fixed missing man page
|
||||
@ -1460,7 +1447,7 @@ fi
|
||||
- added requires perl-File-Temp for utils package
|
||||
|
||||
* Wed Feb 06 2002 Simon Matter <simix@datacomm.ch>
|
||||
- added some %dir flags
|
||||
- added some %%dir flags
|
||||
- removed /usr/lib/sasl/Cyrus.conf
|
||||
- added conf templates
|
||||
- build time option for usage of saslauth group
|
||||
@ -1487,7 +1474,7 @@ fi
|
||||
|
||||
* Sat Jan 19 2002 Simon Matter <simix@datacomm.ch>
|
||||
- changed default auth to pam
|
||||
- remove several %dir from %files sections
|
||||
- remove several %%dir from %%files sections
|
||||
- change from /usr/lib/cyrus -> /usr/libexec/cyrus
|
||||
- rename source files to something like cyrus...
|
||||
- added rehash tool
|
||||
@ -1495,7 +1482,7 @@ fi
|
||||
|
||||
* Fri Jan 18 2002 Simon Matter <simix@datacomm.ch>
|
||||
- fixed init script
|
||||
- fixed %post section in spec
|
||||
- fixed %%post section in spec
|
||||
|
||||
* Thu Jan 17 2002 Simon Matter <simix@datacomm.ch>
|
||||
- ready for first build
|
||||
|
Loading…
Reference in New Issue
Block a user