X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=exim.spec;h=de83c263c620f515c06763f24d9216d9c5109bb2;hb=c8593f7b5e9fbbc726d739ee04092c38864837a3;hp=1333dd82abec7485fd81869f91d9f69d61875c71;hpb=d6777b735673b029130cb3a4ec854f4d5334759b;p=packages%2Fexim.git diff --git a/exim.spec b/exim.spec index 1333dd8..de83c26 100644 --- a/exim.spec +++ b/exim.spec @@ -1,14 +1,19 @@ +# Conditional build: +# bcond_on_pgsql - build wihtout PostgreSQ support +# bcond_on_mysql - build with MySQL support +# bcond_off_ldap - build without LDAP support + Summary: University of Cambridge Mail Transfer Agent Summary(pl): Agent Transferu Poczty Uniwersytetu w Cambridge Name: exim -Version: 3.16 +Version: 3.22 Release: 2 License: GPL Group: Networking/Daemons Group(de): Netzwerkwesen/Server Group(pl): Sieciowe/Serwery -Source0: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/%{name}-%{version}.tar.gz -Source1: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/%{name}-texinfo-3.10.tar.gz +Source0: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/%{name}-%{version}.tar.bz2 +Source1: ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/%{name}-texinfo-3.20.tar.bz2 Source2: %{name}.init Source3: %{name}.cron.db Source4: %{name}.8 @@ -28,13 +33,18 @@ Patch0: %{name}-EDITME.patch Patch1: %{name}-monitor-EDITME.patch Patch2: %{name}-texinfo.patch Patch3: %{name}-use_system_pcre.patch +Patch4: %{name}-Makefile-Default.patch URL: http://www.exim.org/ -BuildRequires: openldap-devel +%{!?bcond_off_ldap:BuildRequires: openldap-devel >= 2.0.0} +%{?bcond_on_mysql:BuildRequires: mysql-devel} +%{?bcond_on_pgsql:BuildRequires: postgresql-devel} +BuildRequires: XFree86-devel BuildRequires: texinfo BuildRequires: perl BuildRequires: pam-devel BuildRequires: pcre-devel BuildRequires: db3-devel +BuildRequires: openssl-devel Provides: smtpdaemon Prereq: /usr/sbin/useradd Prereq: /usr/sbin/groupadd @@ -85,8 +95,6 @@ Bazuj administracyjny. %prep -#%set_MAIL qwe -#exit 1 %setup -q -T -b 0 %setup -q -T -D -a 1 @@ -94,6 +102,7 @@ administracyjny. %patch1 -p1 %patch2 -p0 %patch3 -p1 +%patch4 -p1 install %{SOURCE14} doc/FAQ.txt.gz install %{SOURCE15} doc/config.samples.tar.gz @@ -103,7 +112,12 @@ cp src/EDITME Local/Makefile cp exim_monitor/EDITME Local/eximon.conf %build -%{__make} CFLAGS="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-O -g}" +%{__make} CFLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS}" \ + %{?bcond_on_mysql:LOOKUP_MYSQL=yes} \ + %{?bcond_on_pgsql:LOOKUP_PGSQL=yes} \ + %{!?bcond_off_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \ + LOOKUP_LIBS="%{!?bcond_off_ldap:-lldap -llber} %{?bcond_on_mysql:-lmysqlclient} %{?bcond_on_pgsql:-lpq}" \ + LOOKUP_INCLUDE="%{?bcond_on_mysql:-I/usr/include/mysql} %{?bcond_on_pgsql:-I/usr/include/pgsql}" makeinfo exim-texinfo-*/doc/{oview,spec,filter}.texinfo @@ -147,22 +161,28 @@ gzip -9nf README* NOTICE LICENCE analyse-log-errors \ doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,oview.txt,spec.txt} %pre -/usr/sbin/groupadd -g 79 -r -f exim -if [ -n "`id -u exim 2>/dev/null`" ]; then +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 + exit 1 + fi +else + /usr/sbin/groupadd -g 79 -r -f exim +fi + +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 exit 1 fi else /usr/sbin/useradd -u 79 -r -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim 1>&2 - if [ -f /var/db/passwd.db ]; then - /usr/bin/update-db 1>&2 - fi fi + %post umask 022 /sbin/chkconfig --add %{name} -if [ -r /var/run/exim*.pid ]; then +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." @@ -184,8 +204,10 @@ rm -f %{_sysconfdir}/security/pam_env.conf.tmp %preun if [ "$1" = "0" ]; then + if [ -f /var/lock/subsys/exim ]; then + /etc/rc.d/init.d/exim stop >&2 + fi /sbin/chkconfig --del %{name} - /etc/rc.d/init.d/%{name} stop >&2 fi %postun @@ -213,8 +235,8 @@ rm -rf $RPM_BUILD_ROOT %attr( 644,root,root) /etc/logrotate.d/exim %attr( 754,root,root) /etc/rc.d/init.d/exim %attr(4755,root,root) %{_bindir}/exim -%attr( 775,root,mail) %dir %{_var}/mail -%attr( 700,exim,root) %dir %{_var}/spool/exim +%attr(1777,root,mail) %dir %{_var}/mail +%attr( 770,root,exim) %dir %{_var}/spool/exim %attr( 750,exim,exim) %dir %{_var}/spool/exim/db %attr( 700,exim,root) %dir %{_var}/spool/exim/input %attr( 750,exim,root) %dir %{_var}/spool/exim/msglog