# Conditional build:
-# bcond_on_pgsql - build wihtout PostgreSQ support
+# bcond_on_pgsql - build wiht PostgreSQ support
# bcond_on_mysql - build with MySQL support
# bcond_off_ldap - build without LDAP support
Summary(pl): Agent Transferu Poczty Uniwersytetu w Cambridge
Name: exim
Version: 3.22
-Release: 2
+Release: 4
License: GPL
Group: Networking/Daemons
Group(de): Netzwerkwesen/Server
Source6: %{name}on.desktop
Source8: Makefile-Linux
Source9: %{name}.aliases
-Source10: %{name}.conf
-Source11: newaliases
-Source12: %{name}.logrotate
-Source13: %{name}.sysconfig
-#Source14: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/FAQ.txt.gz
-Source14: %{name}-FAQ.txt.gz
-#Source15: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/config.samples.tar.gz
-Source15: %{name}-config.samples.tar.gz
+Source10: newaliases
+Source11: %{name}.logrotate
+Source12: %{name}.sysconfig
+#Source13: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/FAQ.txt.gz
+Source13: %{name}-FAQ.txt.gz
+#Source14: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/config.samples.tar.gz
+Source14: %{name}-config.samples.tar.gz
Patch0: %{name}-EDITME.patch
Patch1: %{name}-monitor-EDITME.patch
Patch2: %{name}-texinfo.patch
Patch3: %{name}-use_system_pcre.patch
Patch4: %{name}-Makefile-Default.patch
+Patch5: %{name}-conf.patch
URL: http://www.exim.org/
%{!?bcond_off_ldap:BuildRequires: openldap-devel >= 2.0.0}
%{?bcond_on_mysql:BuildRequires: mysql-devel}
BuildRequires: pam-devel
BuildRequires: pcre-devel
BuildRequires: db3-devel
-BuildRequires: openssl-devel
+BuildRequires: openssl-devel >= 0.9.6a
Provides: smtpdaemon
Prereq: /usr/sbin/useradd
Prereq: /usr/sbin/groupadd
%patch3 -p1
%patch4 -p1
-install %{SOURCE14} doc/FAQ.txt.gz
-install %{SOURCE15} doc/config.samples.tar.gz
+install %{SOURCE13} doc/FAQ.txt.gz
+install %{SOURCE14} doc/config.samples.tar.gz
install -d Local
-cp src/EDITME Local/Makefile
-cp exim_monitor/EDITME Local/eximon.conf
+cp -f src/EDITME Local/Makefile
+cp -f exim_monitor/EDITME Local/eximon.conf
%build
-%{__make} CFLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \
+%{__make} CFLAGS="%{rpmcflags}" \
%{?bcond_on_mysql:LOOKUP_MYSQL=yes} \
%{?bcond_on_pgsql:LOOKUP_PGSQL=yes} \
%{!?bcond_off_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \
install build-Linux-pld/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \
build-Linux-pld/exinext \
- build-Linux-pld/exi{cyclog,next,what} %{SOURCE11} \
+ build-Linux-pld/exi{cyclog,next,what} %{SOURCE10} \
util/{exigrep,eximstats,exiqsumm,exiqsumm,unknownuser.sh,unknownuser.sh,transport-filter.pl} \
$RPM_BUILD_ROOT%{_bindir}
install build-Linux-pld/eximon.bin $RPM_BUILD_ROOT/usr/X11R6/bin
install %{SOURCE5} .
install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily/
-install %{SOURCE13} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE12} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
-install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/mail/
+install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install src/configure.default $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf
+cd $RPM_BUILD_ROOT%{_sysconfdir}/mail
+patch -p0 < %{PATCH5}
+cd -
install %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8/
install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
install *.info* $RPM_BUILD_ROOT%{_infodir}/
-ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
-ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_libdir}/sendmail
-ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
-ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
-ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
-ln -s %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
+ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
+ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_libdir}/sendmail
+ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
+ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
+ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
+ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
install %{SOURCE6} $RPM_BUILD_ROOT%{_applnkdir}/System
%pre
if [ -n "`/usr/bin/getgid exim`" ]; then
if [ "`getgid exim`" != "79" ]; then
- echo "Warning: group exim haven't gid=79. Corect this before install exim" 1>&2
+ echo "Warning: group exim haven't gid=79. Correct this before installing exim" 1>&2
exit 1
fi
else
if [ -n "`/bin/id -u exim 2>/dev/null`" ]; then
if [ "`id -u exim`" != "79" ]; then
- echo "Warning: user exim doesn't have uid=79. Corect this before installing Exim" 1>&2
+ echo "Warning: user exim doesn't have uid=79. Correct this before installing Exim" 1>&2
exit 1
fi
else
newaliases
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-# Add/modify MAIL variable via pam_env.
-mv -f %{_sysconfdir}/security/pam_env.conf{,.tmp}
-awk '$1 != "MAIL" { print $0; }; END { print "MAIL\t\tDEFAULT=${HOME}/Mail/Mailbox"; }' \
- < %{_sysconfdir}/security/pam_env.conf.tmp \
- > %{_sysconfdir}/security/pam_env.conf
-rm -f %{_sysconfdir}/security/pam_env.conf.tmp
-
%preun
if [ "$1" = "0" ]; then
if [ -f /var/lock/subsys/exim ]; then
if [ "$1" = "0" ]; then
/usr/sbin/userdel exim
/usr/sbin/groupdel exim
-
- mv -f %{_sysconfdir}/security/pam_env.conf{,.tmp}
- awk '$1 != "MAIL" { print $0; }' \
- < %{_sysconfdir}/security/pam_env.conf.tmp \
- > %{_sysconfdir}/security/pam_env.conf
- rm -f %{_sysconfdir}/security/pam_env.conf.tmp
fi
%clean