X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=exim.spec;h=502eea9f30569b21f1e6d1ac4b0f34c008e5431b;hb=9abc83e7706136fab85cfd18d14c62d44026b1db;hp=37c8d00eb11b57252ce70e8113a5b8dfa3c72471;hpb=ea881333174e6b3acd028d6c60c4202800e041c3;p=packages%2Fexim.git diff --git a/exim.spec b/exim.spec index 37c8d00..502eea9 100644 --- a/exim.spec +++ b/exim.spec @@ -1,29 +1,28 @@ +# # Conditional build: %bcond_without pgsql # without PostgreSQL support %bcond_without mysql # without MySQL support +%bcond_without sqlite # without sqlite %bcond_without whoson # without whoson support %bcond_without sasl # without SASL %bcond_without ldap # without LDAP support -%bcond_without exiscan # without exiscan support %bcond_without spf # without spf support %bcond_without srs # without srs support -%bcond_with saexim # with sa-exim support +%bcond_without dkeys # without domainkeys support # -%define exiscan_version 4.44-28 -%define saexim_version 3.1 Summary: University of Cambridge Mail Transfer Agent Summary(pl): Agent Transferu Poczty Uniwersytetu w Cambridge Summary(pt_BR): Servidor de correio eletrônico exim Name: exim -Version: 4.44 +Version: 4.63 Release: 1 Epoch: 2 License: GPL Group: Networking/Daemons Source0: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-%{version}.tar.bz2 -# Source0-md5: 7487274e013b598d97445987d38b2071 -Source1: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-texinfo-4.40.tar.bz2 -# Source1-md5: cc91bd804ee0f7fd70991e2e6b529033 +# Source0-md5: dde2d5f7106d51607409af94174db46c +Source1: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-texinfo-%{version}.tar.bz2 +# Source1-md5: 1e14e90a4ecd8aadc4e6748e1726d6d5 Source2: %{name}.init Source3: %{name}.cron.db Source4: %{name}4.conf @@ -32,8 +31,6 @@ Source6: %{name}on.desktop # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/ Source7: %{name}4-man-021016.tar.bz2 # Source7-md5: b552704ebf853a401946038a2b7e8e98 -Source8: http://duncanthrax.net/exiscan-acl/exiscan-acl-%{exiscan_version}.patch.bz2 -# Source8-md5: 72ef5567106e89e6cef1cc742ab52525 Source9: %{name}.aliases Source10: newaliases Source11: %{name}.logrotate @@ -44,43 +41,48 @@ Source14: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.t # Source14-md5: 4b93321938a800caa6127c48ad60a42b Source15: %{name}4-smtp.pamd Source16: %{name}on.png -Source17: http://marc.merlins.org/linux/exim/files/sa-exim-%{saexim_version}.tar.gz -# Source17-md5: 34892f195384c127f7c40c461a9ef421 Patch0: %{name}4-EDITME.patch Patch1: %{name}4-monitor-EDITME.patch -Patch2: %{name}4-texinfo.patch +Patch2: %{name}4-cflags.patch Patch3: %{name}4-use_system_pcre.patch Patch4: %{name}4-Makefile-Default.patch -Patch5: %{name}4-exiscan-pld.patch +# http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch +Patch5: localscan_dlopen_%{name}_4.20_or_better.patch +Patch6: %{name}-noloadbalance.patch +# http://sourceforge.net/projects/eximdsn/ +Patch7: %{name}_462_dsn_1_2.patch +Patch8: %{name}-spam-timeout.patch URL: http://www.exim.org/ -%{?with_ldap:BuildRequires: openldap-devel >= 2.0.0} -%{?with_spf:BuildRequires: libspf2-devel} -%{?with_srs:BuildRequires: libsrs_alt-devel >= 0.5} -%{?with_mysql:BuildRequires: mysql-devel} -%{?with_pgsql:BuildRequires: postgresql-devel} -%{?with_whoson:BuildRequires: whoson-devel} %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.0} -BuildRequires: XFree86-devel BuildRequires: db-devel +%{?with_dkeys:BuildRequires: libdomainkeys-devel >= 0.68} +%{?with_spf:BuildRequires: libspf2-devel >= 1.2.5-2} +%{?with_srs:BuildRequires: libsrs_alt-devel >= 1.0} +%{?with_mysql:BuildRequires: mysql-devel} +%{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} BuildRequires: openssl-devel >= 0.9.7d BuildRequires: pam-devel BuildRequires: pcre-devel BuildRequires: perl-devel >= 1:5.6.0 +%{?with_pgsql:BuildRequires: postgresql-devel} BuildRequires: readline-devel -BuildRequires: rpmbuild(macros) >= 1.159 -BuildRequires: texinfo -PreReq: rc-scripts +BuildRequires: rpmbuild(macros) >= 1.268 +%{?with_sqlite:BuildRequires: sqlite3-devel} +BuildRequires: texinfo >= 4.7 +%{?with_whoson:BuildRequires: whoson-devel} +BuildRequires: xorg-lib-libX11-devel +Requires(post): /bin/hostname +Requires(post): fileutils +Requires(post,preun): /sbin/chkconfig +Requires(postun): /usr/sbin/groupdel +Requires(postun): /usr/sbin/userdel Requires(pre): /bin/id Requires(pre): /usr/bin/getgid Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd -Requires(postun): /usr/sbin/groupdel -Requires(postun): /usr/sbin/userdel -Requires(post): fileutils -Requires(post): /bin/hostname -Requires(post,preun): /sbin/chkconfig -Requires: pam >= 0.77.3 +Requires: pam >= 0.79.0 Requires: perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION') +Requires: rc-scripts Provides: group(exim) Provides: smtpdaemon Provides: user(exim) @@ -146,16 +148,29 @@ informa administrador pode executar uma série de ações de controle a partir desta interface. +%package devel +Summary: Header files for Exim +Summary(pl): Pliki nag³ówkowe dla Exima +Group: Development/Libraries +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description devel +Header files for Exim. + +%description devel -l pl +Pliki nag³ówkowe dla Exima. + %prep %setup -q -a1 -a7 %patch0 -p1 %patch1 -p1 -%patch2 -p0 +%patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p0 -%{?with_exiscan:test -f %{SOURCE8} || exit 1; bzip2 -d -c %{SOURCE8} | patch -p1 || exit 1} -%{?with_saexim:test -f %{SOURCE17} || exit 1; gzip -d -c %{SOURCE17} | tar -x || exit 1} +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 install %{SOURCE13} doc/FAQ.txt.bz2 install %{SOURCE14} doc/config.samples.tar.bz2 @@ -165,63 +180,55 @@ cp -f src/EDITME Local/Makefile cp -f exim_monitor/EDITME Local/eximon.conf %build - -%if %{with saexim} - cd sa-exim-%{saexim_version} - %{__make} -j1 sa-exim.h - echo '#define SPAMASSASSIN_CONF "%{_sysconfdir}/mail/spamassassin/local.cf"' >> sa-exim.h - cat sa-exim.c > ../src/local_scan.c - cat sa-exim.h > ../src/sa-exim.h - cd .. -%endif - %{__make} -j1 \ + %{?debug:FULLECHO=''} \ CC="%{__cc}" \ - CFLAGS="%{rpmcflags} %{?with_spf:-DSPF} %{?with_srs:-DSRS}" \ + CUSTOM_CFLAGS="%{rpmcflags} -DSUPPORT_DSN=yes %{?with_spf:-DEXPERIMENTAL_SPF=yes} %{?with_srs:-DEXPERIMENTAL_SRS=yes} %{?with_dkeys:-DEXPERIMENTAL_DOMAINKEYS=yes}" \ LOOKUP_CDB=yes \ -XLFLAGS=-L%{_prefix}/X11R6/%{_lib} \ -X11_LD_LIB=%{_prefix}/X11R6/%{_lib} \ + XLFLAGS=-L%{_prefix}/X11R6/%{_lib} \ + X11_LD_LIB=%{_prefix}/X11R6/%{_lib} \ %{?with_mysql:LOOKUP_MYSQL=yes} \ %{?with_pgsql:LOOKUP_PGSQL=yes} \ + %{?with_sqlite:LOOKUP_SQLITE=yes} \ %{?with_whoson:LOOKUP_WHOSON=yes} \ %{?with_sasl:AUTH_CYRUS_SASL=yes} \ %{?with_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \ - LOOKUP_LIBS="%{?with_ldap:-lldap -llber} %{?with_mysql:-lmysqlclient} %{?with_pgsql:-lpq} %{?with_whoson:-lwhoson} %{?with_spf:-lspf2} %{?with_srs:-lsrs_alt} %{?with_sasl:-lsasl2}" \ + LOOKUP_LIBS="%{?with_ldap:-lldap -llber} %{?with_mysql:-lmysqlclient} %{?with_pgsql:-lpq} %{?with_sqlite:-lsqlite3} %{?with_whoson:-lwhoson} %{?with_spf:-lspf2} %{?with_srs:-lsrs_alt} %{?with_sasl:-lsasl2} %{?with_dkeys:-ldomainkeys}" \ LOOKUP_INCLUDE="%{?with_mysql:-I%{_includedir}/mysql} %{?with_pgsql:-I%{_includedir}/pgsql}" -makeinfo --force exim-texinfo-*/doc/*.texinfo +makeinfo --force -o exim_filtering.info exim-texinfo-*/doc/filter.texinfo +makeinfo --force -o exim.info exim-texinfo-*/doc/spec.texinfo %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,pam.d} -install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,/usr/lib} +install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,%{_prefix}/lib} install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archiv,}/exim,mail} -install -d $RPM_BUILD_ROOT{%{_infodir},%{_prefix}/X11R6/bin,%{_desktopdir},%{_pixmapsdir}} +install -d $RPM_BUILD_ROOT{%{_infodir},%{_desktopdir},%{_pixmapsdir}} +install -d $RPM_BUILD_ROOT%{_libdir}/%{name} install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \ build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \ build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \ util/unknownuser.sh \ $RPM_BUILD_ROOT%{_bindir} -install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_prefix}/X11R6/bin -install build-Linux-*/eximon $RPM_BUILD_ROOT%{_prefix}/X11R6/bin +install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_bindir} +install build-Linux-*/eximon $RPM_BUILD_ROOT%{_bindir} install %{SOURCE5} . -install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly/ +install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name} install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf -install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/ +install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases -install *.info* $RPM_BUILD_ROOT%{_infodir}/ +install *.info* $RPM_BUILD_ROOT%{_infodir} install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp -%{?with_saexim:install sa-exim-%{saexim_version}/sa-exim.conf $RPM_BUILD_ROOT/%{_sysconfdir}/mail/sa-exim.conf} - ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail -ln -sf %{_bindir}/exim $RPM_BUILD_ROOT/usr/lib/sendmail +ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_prefix}/lib/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 @@ -230,52 +237,32 @@ ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir} install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir} +install -d $RPM_BUILD_ROOT%{_includedir}/%{name} +install src/{local_scan.h,store.h,mytypes.h} $RPM_BUILD_ROOT%{_includedir}/%{name} + touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log %clean rm -rf $RPM_BUILD_ROOT %pre -if [ -n "`/usr/bin/getgid exim`" ]; then - if [ "`/usr/bin/getgid exim`" != 79 ]; then - echo "Warning: group exim haven't gid=79. Correct this before installing exim" 1>&2 - exit 1 - fi -else - /usr/sbin/groupadd -g 79 exim 1>&2 -fi - -if [ -n "`/bin/id -u exim 2>/dev/null`" ]; then - if [ "`/bin/id -u exim`" != 79 ]; then - echo "Warning: user exim doesn't have uid=79. Correct this before installing exim" 1>&2 - exit 1 - fi -else - /usr/sbin/useradd -u 79 -d /var/spool/exim -s /bin/false \ - -c "Exim pseudo user" -g exim exim 1>&2 -fi +%groupadd -g 79 exim +%useradd -u 79 -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim %post umask 022 /sbin/chkconfig --add %{name} -if [ -f /var/lock/subsys/exim ]; then - /etc/rc.d/init.d/%{name} restart >&2 -else - echo "Run \"/etc/rc.d/init.d/%{name} start\" to start exim daemon." -fi +%service %{name} restart "exim daemon" if [ ! -f /etc/mail/mailname ]; then rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname - chmod 644 /etc/mail/mailname fi newaliases [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 %preun if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/exim ]; then - /etc/rc.d/init.d/exim stop >&2 - fi + %service exim stop /sbin/chkconfig --del %{name} fi @@ -295,13 +282,12 @@ fi %files %defattr(644,root,root,755) -%doc README* NOTICE LICENCE analyse-log-errors doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,spec.txt,Exim*.upgrade,OptionLists.txt%{?with_exiscan:,exiscan-*.txt}} build-Linux-*/transport-filter.pl +%doc README* NOTICE LICENCE analyse-log-errors doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,spec.txt,Exim*.upgrade,OptionLists.txt,experimental-spec.txt} build-Linux-*/transport-filter.pl %dir %{_sysconfdir}/mail -%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/exim.conf -%{?with_saexim:%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/sa-exim.conf} -%attr(644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases -%attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/exim -%attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/exim +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/exim.conf +%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases +%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/exim +%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/exim %attr(754,root,root) /etc/rc.d/init.d/exim %attr(4755,root,root) %{_bindir}/exim %attr(770,root,exim) %dir %{_var}/spool/exim @@ -323,17 +309,23 @@ fi %attr(755,root,root) %{_sbindir}/rsmtp %attr(755,root,root) %{_sbindir}/runq %attr(755,root,root) %{_sbindir}/sendmail -%attr(755,root,root) /usr/lib/sendmail +%attr(755,root,root) %{_prefix}/lib/sendmail %attr(754,root,root) /etc/cron.weekly/exim.cron.db %attr(750,exim,root) %dir %{_var}/log/exim %attr(750,exim,root) %dir %{_var}/log/archiv/exim %attr(640,exim,root) %ghost %{_var}/log/exim/* -%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/pam.d/smtp -%{_infodir}/* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp +%{_libdir}/%{name} +%{_infodir}/*.info* %{_mandir}/man8/* %files X11 %defattr(644,root,root,755) -%attr(755,root,root) %{_prefix}/X11R6/bin/* -%{_desktopdir}/%{name}on.desktop -%{_pixmapsdir}/%{name}on.png +%attr(755,root,root) %{_bindir}/eximon +%attr(755,root,root) %{_bindir}/eximon.bin +%{_desktopdir}/eximon.desktop +%{_pixmapsdir}/eximon.png + +%files devel +%defattr(644,root,root,755) +%{_includedir}/%{name}