浏览代码

Bump the beast with C&W/IT-Ops-SSE stuff: - add mod_auth_ldap - add cURL and mhash support for mod_php - add dummy php.ini

Ralf S. Engelschall 23 年之前
父节点
当前提交
e2cd31723c
共有 1 个文件被更改,包括 45 次插入1 次删除
  1. 45 1
      apache/apache.spec

+ 45 - 1
apache/apache.spec

@@ -42,6 +42,7 @@
 %define       V_mod_layout         3.2
 %define       V_mod_macro          1.1.2
 %define       V_mod_auth_pam       1.0a
+%define       V_mod_auth_ldap      2.4.1
 %define       V_mod_gzip           1.3.19.1a
 %define       V_mod_fastcgi        2.2.12
 %define       V_mod_throttle       312
@@ -71,6 +72,7 @@ Release:      20030107
 %option       with_mod_macro          no
 
 #   package options (additionally used Apache modules; you have to know what you do)
+%option       with_mod_auth_ldap      no
 %option       with_mod_auth_pam       no
 %option       with_mod_gzip           no
 %option       with_mod_fastcgi        no
@@ -101,6 +103,8 @@ Release:      20030107
 %option       with_mod_php_xml        no
 %option       with_mod_php_bc         no
 %option       with_mod_php_transsid   no
+%option       with_mod_php_curl       no
+%option       with_mod_php_mhash      no
 
 #   package options (optional PHP3 specific settings; requires "with_mod_php3")
 %option       with_mod_php3_ftp       no
@@ -157,6 +161,7 @@ Source11:     http://download.sourceforge.net/accessreferer/mod_access_referer-%
 Source12:     http://www.klomp.org/mod_roaming/mod_roaming-%{V_mod_roaming}.tar.gz
 Source13:     http://software.tangent.org/download/mod_relocate-%{V_mod_relocate}.tar.gz
 Source14:     http://www.php.net/distributions/php-%{V_mod_php3}.tar.gz
+Source15:     http://www.muquit.com/muquit/software/mod_auth_ldap/mod_auth_ldap.tar.gz
 Source20:     apache.conf
 Source21:     apache.base
 Source22:     apache.vhost
@@ -219,7 +224,13 @@ BuildPreReq:  gettext, libiconv
 BuildPreReq:  imap
 %endif
 %if "%{with_mod_php_xml}" == "yes"
-BuildPreReq: expat
+BuildPreReq:  expat
+%endif
+%if "%{with_mod_php_curl}" == "yes"
+BuildPreReq:  curl
+%endif
+%if "%{with_mod_php_mhash}" == "yes"
+BuildPreReq:  mhash
 %endif
 %endif
 %if "%{with_mod_php3}" == "yes"
@@ -240,6 +251,9 @@ BuildPreReq:  openssl
 BuildPreReq:  zlib
 %endif
 %endif
+%if "%{with_mod_auth_ldap}" == "yes"
+BuildPreReq:  openldap, openssl
+%endif
 %if "%{with_mod_auth_pam}" == "yes"
 BuildPreReq:  PAM
 PreReq:       PAM
@@ -302,6 +316,9 @@ AutoReqProv:  no
 %if "%{with_mod_php3}" == "yes"
     %setup14 -q -T -D -a 14
 %endif
+%if "%{with_mod_auth_ldap}" == "yes"
+    %setup15 -q -T -D -a 15
+%endif
 
 %build
     #   prepare environment
@@ -469,6 +486,12 @@ AutoReqProv:  no
 %endif
 %if "%{with_mod_php_transsid}" == "yes"
           --enable-trans-sid \
+%endif
+%if "%{with_mod_php_mhash}" == "yes"
+          --with-mhash=%{l_prefix} \
+%endif
+%if "%{with_mod_php_curl}" == "yes"
+          --with-curl=%{l_prefix} \
 %endif
           --without-pear \
           --disable-shared \
@@ -574,6 +597,13 @@ AutoReqProv:  no
     )
 %endif
 
+    #   optionally prepare mod_auth_ldap
+%if "%{with_mod_auth_ldap}" == "yes"
+    ( cd modauthldap
+      cp mod_auth_ldap.c ../apache_%{V_apache}/src/modules/extra/
+    )
+%endif
+
     #   optionally prepare mod_gzip
 %if "%{with_mod_gzip}" == "yes"
     cp %{SOURCE mod_gzip.c} apache_%{V_apache}/src/modules/extra/
@@ -630,6 +660,11 @@ AutoReqProv:  no
           ldflags="$ldflags -L$pam_libdir"
       fi
       libs="$libs -lpam"
+%endif
+%if "%{with_mod_auth_ldap}" == "yes"
+      cflags="$cflags -I%{l_prefix}/include"
+      ldflags="$ldflags -L%{l_prefix}/lib"
+      libs="$libs -lldap -llber -lssl -lcrypto"
 %endif
       CC="%{l_cc}" \
       CFLAGS="$cflags" \
@@ -678,6 +713,9 @@ AutoReqProv:  no
 %if "%{with_mod_auth_pam}" == "yes"
           --activate-module=src/modules/extra/mod_auth_pam.o \
 %endif
+%if "%{with_mod_auth_ldap}" == "yes"
+          --activate-module=src/modules/extra/mod_auth_ldap.c \
+%endif
 %if "%{with_mod_gzip}" == "yes"
           --activate-module=src/modules/extra/mod_gzip.o \
 %endif
@@ -727,6 +765,12 @@ AutoReqProv:  no
     rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
 %endif
 
+    #   optionally make PHP happy
+%if "%{with_mod_php}" == "yes"
+    %{l_shtool} install -c -m 644 /dev/null \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/apache/php.ini
+%endif
+
     #   create default configuration
     l_hostname=`%{l_shtool} echo -e %h`
     l_domainname=`%{l_shtool} echo -e %d | cut -c2-`