Browse Source

be smart and do not require an MTA for a scripting language by default

Ralf S. Engelschall 22 years ago
parent
commit
2a1a0bea17
1 changed files with 11 additions and 2 deletions
  1. 11 2
      php/php.spec

+ 11 - 2
php/php.spec

@@ -34,7 +34,7 @@ Class:        BASE
 Group:        Language
 License:      PHP
 Version:      4.3.4
-Release:      20040207
+Release:      20040212
 
 #   package options
 %option       with_calendar      no
@@ -70,6 +70,7 @@ Release:      20040207
 %option       with_pear          no
 %option       with_snmp          no
 %option       with_iconv         no
+%option       with_sendmail      no
 
 #   fixing implicit extension dependencies and correlations
 %if "%{with_pear}" == "yes"
@@ -96,7 +97,7 @@ Source0:      http://www.php.net/distributions/php-%{version}.tar.gz
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
 BuildPreReq:  OpenPKG, openpkg >= 20040130, gcc, sed, flex, bison
-PreReq:       OpenPKG, openpkg >= 20040130, MTA
+PreReq:       OpenPKG, openpkg >= 20040130
 %if "%{with_mysql}" == "yes"
 BuildPreReq:  mysql
 PreReq:       mysql
@@ -195,6 +196,10 @@ BuildPreReq:  ORACLE
 BuildPreReq:  snmp
 PreReq:       snmp
 %endif
+%if "%{with_sendmail}" == "yes"
+BuildPreReq:  MTA
+PreReq:       MTA
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
@@ -257,7 +262,11 @@ AutoReqProv:  no
     CPPFLAGS="$cppflags" \
     LDFLAGS="$ldflags" \
     LIBS="$libs" \
+%if "%{with_sendmail}" == "yes"
     PROG_SENDMAIL="%{l_prefix}/sbin/sendmail" \
+%else
+    PROG_SENDMAIL="`%{l_shtool} path false`" \
+%endif
     ./configure \
         --prefix=%{l_prefix} \
         --sysconfdir=%{l_prefix}/etc/php \