Browse Source

Major overhauling of Apache specification by consistencly use with_xxx as the option variables, by adding comments, etc.

Ralf S. Engelschall 23 years ago
parent
commit
e61d3b9ba7
1 changed files with 178 additions and 182 deletions
  1. 178 182
      apache/apache.spec

+ 178 - 182
apache/apache.spec

@@ -33,68 +33,51 @@
 ##  go with the macro mechanism. But do not try to repeat this!
 ##  go with the macro mechanism. But do not try to repeat this!
 
 
 #   the additionally used Apache modules (can be enabled without thinking)
 #   the additionally used Apache modules (can be enabled without thinking)
-%ifndef       mod_ssl
-%define       mod_ssl              no
-%endif
-%ifndef       mod_perl
-%define       mod_perl             no
-%endif
-%ifndef       mod_php
-%define       mod_php              no
-%endif
-%ifndef       mod_dav
-%define       mod_dav              no
-%endif
-%ifndef       mod_layout
-%define       mod_layout           no
-%endif
-%ifndef       mod_macro
-%define       mod_macro            no
-%endif
+%{!?with_mod_ssl:            %define  with_mod_ssl            no}
+%{!?with_mod_perl:           %define  with_mod_perl           no}
+%{!?with_mod_php:            %define  with_mod_php            no}
+%{!?with_mod_dav:            %define  with_mod_dav            no}
+%{!?with_mod_layout:         %define  with_mod_layout         no}
+%{!?with_mod_macro:          %define  with_mod_macro          no}
 
 
 #   the additionally used Apache modules (you have to know what you do)
 #   the additionally used Apache modules (you have to know what you do)
-%ifndef       mod_auth_pam
-%define       mod_auth_pam         no
-%endif
-%ifndef       mod_gzip
-%define       mod_gzip             no
-%endif
-%ifndef       mod_zmod
-%define       mod_zmod             no
-%endif
-%ifndef       mod_fastcgi
-%define       mod_fastcgi          no
-%endif
-%ifndef       mod_throttle
-%define       mod_throttle         no
-%endif
-%ifndef       mod_access_referer
-%define       mod_access_referer   no
+%{!?with_mod_auth_pam:       %define  with_mod_auth_pam       no}
+%{!?with_mod_gzip:           %define  with_mod_gzip           no}
+%{!?with_mod_zmod:           %define  with_mod_zmod           no}
+%{!?with_mod_fastcgi:        %define  with_mod_fastcgi        no}
+%{!?with_mod_throttle:       %define  with_mod_throttle       no}
+%{!?with_mod_access_referer: %define  with_mod_access_referer no}
+%{!?with_mod_roaming:        %define  with_mod_roaming        no}
+%{!?with_mod_relocate:       %define  with_mod_relocate       no}
+
+#   more optional settings 
+#   (requires "with_mod_php" set to "yes" above!)
+%{!?with_mod_php_mysql:      %define  with_mod_php_mysql      no}
+%{!?with_mod_php_gd:         %define  with_mod_php_gd         no}
+%{!?with_mod_php_db:         %define  with_mod_php_db         no}
+%{!?with_mod_php_pdflib:     %define  with_mod_php_pdflib     no}
+%{!?with_mod_php_zlib:       %define  with_mod_php_zlib       no}
+%{!?with_mod_php_bzip2:      %define  with_mod_php_bzip2      no}
+%{!?with_mod_php_openssl:    %define  with_mod_php_openssl    no}
+%{!?with_mod_php_openldap:   %define  with_mod_php_openldap   no}
+%{!?with_mod_php_mm:         %define  with_mod_php_mm         no}
+%{!?with_mod_php_pcre:       %define  with_mod_php_pcre       no}
+%{!?with_mod_php_ftp:        %define  with_mod_php_ftp        no}
+%{!?with_mod_php_java:       %define  with_mod_php_java       no}
+%{!?with_mod_php_oci8:       %define  with_mod_php_oci8       no}
+
+#   fixing implicit inter-module dependencies and correlations
+%if "%{with_mod_php}" == "yes"
+%if "%{with_mod_ssl}" == "yes"
+%define with_php_openssl yes
+%define with_php_mm      yes
 %endif
 %endif
-%ifndef       mod_roaming
-%define       mod_roaming          no
+%if "%{with_mod_php_mysql}" == "yes"
+%define with_php_zlib    yes
 %endif
 %endif
-%ifndef       mod_relocate
-%define       mod_relocate         no
 %endif
 %endif
 
 
-#   more optional settings 
-#   (requires mod_php set to "yes" above)
-%define       php_mysql            no
-%define       php_gd               no
-%define       php_db               no
-%define       php_pdflib           no
-%define       php_zlib             no
-%define       php_bzip2            no
-%define       php_openssl          no
-%define       php_openldap         no
-%define       php_mm               no
-%define       php_pcre             no
-%define       php_ftp              no
-%define       php_java             no
-%define       php_oci8             no
-
-#   the software versions
+#   package component versions
 %define       V_apache             1.3.23
 %define       V_apache             1.3.23
 %define       V_mod_ssl            2.8.7
 %define       V_mod_ssl            2.8.7
 %define       V_mod_perl           1.26
 %define       V_mod_perl           1.26
@@ -111,11 +94,6 @@
 %define       V_mod_roaming        1.0.2
 %define       V_mod_roaming        1.0.2
 %define       V_mod_relocate       1.0
 %define       V_mod_relocate       1.0
 
 
-#   fixing some implicit inter-module dependencies
-%if "%{php_mysql}" == "yes"
-%define       php_zlib             yes
-%endif
-
 #   package information
 #   package information
 Name:         apache
 Name:         apache
 Summary:      Apache HTTP Server
 Summary:      Apache HTTP Server
@@ -126,52 +104,24 @@ Distribution: OpenPKG [REL]
 Group:        Web
 Group:        Web
 License:      ASF
 License:      ASF
 Version:      %{V_apache}
 Version:      %{V_apache}
-Release:      20020318
+Release:      20020320
 
 
 #   list of sources
 #   list of sources
 Source0:      http://httpd.apache.org/dist/httpd/apache_%{V_apache}.tar.gz
 Source0:      http://httpd.apache.org/dist/httpd/apache_%{V_apache}.tar.gz
-# %if "%{mod_ssl}" == "yes"
 Source1:      http://www.modssl.org/source/mod_ssl-%{V_mod_ssl}-%{V_apache}.tar.gz
 Source1:      http://www.modssl.org/source/mod_ssl-%{V_mod_ssl}-%{V_apache}.tar.gz
-# %endif
-# %if "%{mod_perl}" == "yes"
 Source2:      http://perl.apache.org/dist/mod_perl-%{V_mod_perl}.tar.gz
 Source2:      http://perl.apache.org/dist/mod_perl-%{V_mod_perl}.tar.gz
-# %endif
-# %if "%{mod_php}" == "yes"
 Source3:      http://www.php.net/distributions/php-%{V_mod_php}.tar.gz
 Source3:      http://www.php.net/distributions/php-%{V_mod_php}.tar.gz
-# %endif
-# %if "%{mod_dav}" == "yes"
 Source4:      http://www.webdav.org/mod_dav/mod_dav-%{V_mod_dav}.tar.gz
 Source4:      http://www.webdav.org/mod_dav/mod_dav-%{V_mod_dav}.tar.gz
-# %endif
-# %if "%{mod_layout}" == "yes"
 Source5:      ftp://ftp.tangent.org/pub/apache/mod_layout-%{V_mod_layout}.tar.gz
 Source5:      ftp://ftp.tangent.org/pub/apache/mod_layout-%{V_mod_layout}.tar.gz
-# %endif
-# %if "%{mod_macro}" == "yes"
 Source6:      http://www.cri.ensmp.fr/~coelho/mod_macro/mod_macro-%{V_mod_macro}.tar.gz
 Source6:      http://www.cri.ensmp.fr/~coelho/mod_macro/mod_macro-%{V_mod_macro}.tar.gz
-# %endif
-# %if "%{mod_auth_pam}" == "yes"
 Source7:      http://pam.sourceforge.net/mod_auth_pam/mod_auth_pam.tar.gz
 Source7:      http://pam.sourceforge.net/mod_auth_pam/mod_auth_pam.tar.gz
-# %endif
-# %if "%{mod_gzip}" == "yes"
 Source8:      http://www.remotecommunications.com/apache/mod_gzip/src/%{V_mod_gzip}/mod_gzip.c
 Source8:      http://www.remotecommunications.com/apache/mod_gzip/src/%{V_mod_gzip}/mod_gzip.c
-# %endif
-# %if "%{mod_zmod}" == "yes"
 Source9:      http://www.ivw.de/???/src.apapi.FIN%{V_mod_zmod}.tar.gz
 Source9:      http://www.ivw.de/???/src.apapi.FIN%{V_mod_zmod}.tar.gz
-# %endif
-# %if "%{mod_fastcgi}" == "yes"
 Source10:     http://www.fastcgi.com/dist/mod_fastcgi-%{V_mod_fastcgi}.tar.gz
 Source10:     http://www.fastcgi.com/dist/mod_fastcgi-%{V_mod_fastcgi}.tar.gz
-# %endif
-# %if "%{mod_throttle}" == "yes"
 Source11:     http://www.snert.com/Software/mod_throttle/mod_throttle%{V_mod_throttle}.tgz
 Source11:     http://www.snert.com/Software/mod_throttle/mod_throttle%{V_mod_throttle}.tgz
-# %endif
-# %if "%{mod_access_referer}" == "yes"
 Source12:     http://download.sourceforge.net/accessreferer/mod_access_referer-%{V_mod_access_referer}.tar.gz
 Source12:     http://download.sourceforge.net/accessreferer/mod_access_referer-%{V_mod_access_referer}.tar.gz
-# %endif
-# %if "%{mod_roaming}" == "yes"
 Source13:     http://www.klomp.org/mod_roaming/mod_roaming-%{V_mod_roaming}.tar.gz
 Source13:     http://www.klomp.org/mod_roaming/mod_roaming-%{V_mod_roaming}.tar.gz
-# %endif
-# %if "%{mod_relocate}" == "yes"
 Source14:     http://www.tangent.org/mod_relocate/mod_relocate-%{V_mod_relocate}.tar.gz
 Source14:     http://www.tangent.org/mod_relocate/mod_relocate-%{V_mod_relocate}.tar.gz
-# %endif
 Source20:     apache.conf
 Source20:     apache.conf
 Source21:     apache.base
 Source21:     apache.base
 Source22:     apache.vhost
 Source22:     apache.vhost
@@ -182,50 +132,50 @@ Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
 BuildRoot:    %{l_buildroot}
 BuildPreReq:  openpkg >= 20020222
 BuildPreReq:  openpkg >= 20020222
 PreReq:       openpkg >= 20020222
 PreReq:       openpkg >= 20020222
-%if "%{mod_ssl}" == "yes"
+%if "%{with_mod_ssl}" == "yes"
 BuildPreReq:  openssl, mm
 BuildPreReq:  openssl, mm
 %endif
 %endif
-%if "%{mod_perl}" == "yes"
+%if "%{with_mod_perl}" == "yes"
 BuildPreReq:  perl
 BuildPreReq:  perl
 PreReq:       perl
 PreReq:       perl
 %endif
 %endif
-%if "%{mod_php}" == "yes"
+%if "%{with_mod_php}" == "yes"
 BuildPreReq:  make, bison, flex
 BuildPreReq:  make, bison, flex
-%if "%{php_mysql}" == "yes"
+%if "%{with_mod_php_mysql}" == "yes"
 BuildPreReq:  mysql
 BuildPreReq:  mysql
 %endif
 %endif
-%if "%{php_gd}" == "yes"
+%if "%{with_mod_php_gd}" == "yes"
 BuildPreReq:  gd
 BuildPreReq:  gd
 %endif
 %endif
-%if "%{php_db}" == "yes"
+%if "%{with_mod_php_db}" == "yes"
 BuildPreReq:  db
 BuildPreReq:  db
 %endif
 %endif
-%if "%{php_pdflib}" == "yes"
+%if "%{with_mod_php_pdflib}" == "yes"
 BuildPreReq:  pdflib, zlib
 BuildPreReq:  pdflib, zlib
 %endif
 %endif
-%if "%{php_zlib}" == "yes"
+%if "%{with_mod_php_zlib}" == "yes"
 BuildPreReq:  zlib
 BuildPreReq:  zlib
 %endif
 %endif
-%if "%{php_bzip2}" == "yes"
+%if "%{with_mod_php_bzip2}" == "yes"
 BuildPreReq:  bzip2
 BuildPreReq:  bzip2
 %endif
 %endif
-%if "%{php_openssl}" == "yes"
+%if "%{with_mod_php_openssl}" == "yes"
 BuildPreReq:  openssl
 BuildPreReq:  openssl
 %endif
 %endif
-%if "%{php_openldap}" == "yes"
+%if "%{with_mod_php_openldap}" == "yes"
 BuildPreReq:  openldap, openssl
 BuildPreReq:  openldap, openssl
 %endif
 %endif
-%if "%{php_mm}" == "yes"
+%if "%{with_mod_php_mm}" == "yes"
 BuildPreReq:  mm
 BuildPreReq:  mm
 %endif
 %endif
-%if "%{php_pcre}" == "yes"
+%if "%{with_mod_php_pcre}" == "yes"
 BuildPreReq:  pcre
 BuildPreReq:  pcre
 %endif
 %endif
-%if "%{php_java}" == "yes"
+%if "%{with_mod_php_java}" == "yes"
 BuildPreReq:  jdk-sun
 BuildPreReq:  jdk-sun
 %endif
 %endif
 %endif
 %endif
-%if "%{mod_auth_pam}" == "yes"
+%if "%{with_mod_auth_pam}" == "yes"
 BuildPreReq:  PAM
 BuildPreReq:  PAM
 PreReq:       PAM
 PreReq:       PAM
 %endif
 %endif
@@ -242,81 +192,89 @@ AutoReqProv:  no
     volunteers are known as the Apache Group. In addition, hundreds
     volunteers are known as the Apache Group. In addition, hundreds
     of users have contributed ideas, code, and documentation to the
     of users have contributed ideas, code, and documentation to the
     project.
     project.
+   
+    Options (additional modules I):
+    with_mod_ssl=%{with_mod_ssl} with_mod_perl=%{with_mod_perl} with_mod_php=%{with_mod_php}
+    with_mod_dav=%{with_mod_dav} with_mod_layout=%{with_mod_layout} with_mod_macro=%{with_mod_macro}
+
+    Options (additional modules II):
+    with_mod_auth_pam=%{with_mod_auth_pam} with_mod_gzip=%{with_mod_gzip} with_mod_zmod=%{with_mod_zmod}
+    with_mod_fastcgi=%{with_mod_fastcgi} with_mod_throttle=%{with_mod_throttle} with_mod_access_referer=%{with_mod_access_referer}
+    with_mod_roaming=%{with_mod_roaming} with_mod_relocate=%{with_mod_relocate}
 
 
-    This Apache %{V_apache} package optionally can include:
-    - mod_ssl %{V_mod_ssl} for HTTPS support.
-    - mod_perl %{V_mod_perl} for dynamic Perl scripting.
-    - mod_php %{V_mod_php} for dynamic PHP scripting.
-    - mod_dav %{V_mod_dav} for WebDAV support.
-    - mod_layout %{V_mod_layout} for header/footer support.
-    - mod_macro %{V_mod_macro} for macro support in config files.
-    - mod_auth_pam %{V_mod_auth_pam} for PAM-based authentication.
-    - mod_gzip %{V_mod_gzip} for on-the-fly GZIP-based data compression.
-    - mod_zmod %{V_mod_zmod} for IVW-compliant logfile writing.
-    - mod_fastcgi %{V_mod_fastcgi} for FastCGI support.
-    - mod_access_referer %{V_mod_access_referer} for access control via HTTP Referer.
-    - mod_roaming %{V_mod_roaming} for Netscape Communicator roaming support.
-    - mod_relocate %{V_mod_relocate} for external URL redirection with logging.
+    Options (additional extensions for mod_php):
+    with_mod_php_mysql=%{with_mod_php_mysql} with_mod_php_gd=%{with_mod_php_gd} with_mod_php_db=%{with_mod_php_db}
+    with_mod_php_pdflib=%{with_mod_php_pdflib} with_mod_php_zlib=%{with_mod_php_zlib} with_mod_php_bzip2=%{with_mod_php_bzip2}
+    with_mod_php_openssl=%{with_mod_php_openssl} with_mod_php_openldap=%{with_mod_php_openldap} with_mod_php_mm=%{with_mod_php_mm}
+    with_mod_php_pcre=%{with_mod_php_pcre} with_mod_php_ftp=%{with_mod_php_ftp} with_mod_php_java=%{with_mod_php_java}
+    with_mod_php_oci8=%{with_mod_php_oci8}
 
 
 %prep
 %prep
+    #   unpack Apache distribution
     %setup0 -q -c
     %setup0 -q -c
-%if "%{mod_ssl}" == "yes"
+    #   unpack optional extension modules
+%if "%{with_mod_ssl}" == "yes"
     %setup1 -q -T -D -a 1
     %setup1 -q -T -D -a 1
 %endif
 %endif
-%if "%{mod_perl}" == "yes"
+%if "%{with_mod_perl}" == "yes"
     %setup2 -q -T -D -a 2
     %setup2 -q -T -D -a 2
 %endif
 %endif
-%if "%{mod_php}" == "yes"
+%if "%{with_mod_php}" == "yes"
     %setup3 -q -T -D -a 3
     %setup3 -q -T -D -a 3
 %endif
 %endif
-%if "%{mod_dav}" == "yes"
+%if "%{with_mod_dav}" == "yes"
     %setup4 -q -T -D -a 4
     %setup4 -q -T -D -a 4
 %endif
 %endif
-%if "%{mod_layout}" == "yes"
+%if "%{with_mod_layout}" == "yes"
     %setup5 -q -T -D -a 5
     %setup5 -q -T -D -a 5
 %endif
 %endif
-%if "%{mod_macro}" == "yes"
+%if "%{with_mod_macro}" == "yes"
     %setup6 -q -T -D -a 6
     %setup6 -q -T -D -a 6
 %endif
 %endif
-%if "%{mod_auth_pam}" == "yes"
+%if "%{with_mod_auth_pam}" == "yes"
     %setup7 -q -T -D -a 7
     %setup7 -q -T -D -a 7
 %endif
 %endif
-%if "%{mod_zmod}" == "yes"
+%if "%{with_mod_zmod}" == "yes"
     %setup9 -q -T -D -a 9
     %setup9 -q -T -D -a 9
 %endif
 %endif
-%if "%{mod_fastcgi}" == "yes"
+%if "%{with_mod_fastcgi}" == "yes"
     %setup10 -q -T -D -a 10
     %setup10 -q -T -D -a 10
 %endif
 %endif
-%if "%{mod_throttle}" == "yes"
+%if "%{with_mod_throttle}" == "yes"
     %setup11 -q -T -D -a 11
     %setup11 -q -T -D -a 11
 %endif
 %endif
-%if "%{mod_access_referer}" == "yes"
+%if "%{with_mod_access_referer}" == "yes"
     %setup12 -q -T -D -a 12
     %setup12 -q -T -D -a 12
 %endif
 %endif
-%if "%{mod_roaming}" == "yes"
+%if "%{with_mod_roaming}" == "yes"
     %setup13 -q -T -D -a 13
     %setup13 -q -T -D -a 13
 %endif
 %endif
-%if "%{mod_relocate}" == "yes"
+%if "%{with_mod_relocate}" == "yes"
     %setup14 -q -T -D -a 14
     %setup14 -q -T -D -a 14
 %endif
 %endif
 
 
 %build
 %build
+    #   prepare environment
     PATH="%{l_prefix}/bin:%{l_prefix}/sbin:$PATH"; export PATH
     PATH="%{l_prefix}/bin:%{l_prefix}/sbin:$PATH"; export PATH
     rm -rf $RPM_BUILD_ROOT
     rm -rf $RPM_BUILD_ROOT
     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
-%if "%{mod_ssl}" == "yes"
+
+    #   optionally prepare mod_ssl
+%if "%{with_mod_ssl}" == "yes"
     ( cd mod_ssl-%{V_mod_ssl}-%{V_apache}
     ( cd mod_ssl-%{V_mod_ssl}-%{V_apache}
       ./configure \
       ./configure \
           --with-apache=../apache_%{V_apache} \
           --with-apache=../apache_%{V_apache} \
           --expert
           --expert
     )
     )
 %endif
 %endif
-%if "%{mod_php}" == "yes" || "%{mod_dav}" == "yes"
+
+    #   optionally pre-configure Apache for mod_php and mod_dav
+%if "%{with_mod_php}" == "yes" || "%{with_mod_dav}" == "yes"
     ( cd apache_%{V_apache}
     ( cd apache_%{V_apache}
       CC="%{l_cc}" \
       CC="%{l_cc}" \
       CFLAGS="%{l_cflags -O}" \
       CFLAGS="%{l_cflags -O}" \
       ./configure \
       ./configure \
-%if "%{mod_ssl}" == "yes"
+%if "%{with_mod_ssl}" == "yes"
           --enable-rule=EAPI \
           --enable-rule=EAPI \
 %endif
 %endif
           --target=apache \
           --target=apache \
@@ -329,7 +287,9 @@ AutoReqProv:  no
           --localstatedir=%{l_prefix}/var/apache
           --localstatedir=%{l_prefix}/var/apache
     )
     )
 %endif
 %endif
-%if "%{mod_perl}" == "yes"
+
+    #   optionally prepare mod_perl
+%if "%{with_mod_perl}" == "yes"
     ( cd mod_perl-%{V_mod_perl}
     ( cd mod_perl-%{V_mod_perl}
       eval `%{l_prefix}/bin/perl -V:archname`
       eval `%{l_prefix}/bin/perl -V:archname`
       eval `%{l_prefix}/bin/perl -V:version`
       eval `%{l_prefix}/bin/perl -V:version`
@@ -362,61 +322,63 @@ AutoReqProv:  no
           ../apache_%{V_apache}/src/modules/perl/mod_perl.config
           ../apache_%{V_apache}/src/modules/perl/mod_perl.config
     )
     )
 %endif
 %endif
-%if "%{mod_php}" == "yes"
+
+    #   optionally prepare mod_php
+%if "%{with_mod_php}" == "yes"
     ( cd php-%{V_mod_php}
     ( cd php-%{V_mod_php}
       CC="%{l_cc}" \
       CC="%{l_cc}" \
-%if "%{mod_ssl}" == "yes"
+%if "%{with_mod_ssl}" == "yes"
       CFLAGS="%{l_cflags -O} -I%{l_prefix}/include -DEAPI" \
       CFLAGS="%{l_cflags -O} -I%{l_prefix}/include -DEAPI" \
 %else
 %else
       CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
       CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
 %endif
 %endif
       CPPFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
       CPPFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
       LDFLAGS="%{l_cflags -O} -L%{l_prefix}/lib" \
       LDFLAGS="%{l_cflags -O} -L%{l_prefix}/lib" \
-%if "%{php_gd}" == "yes"
+%if "%{with_mod_php_gd}" == "yes"
       LIBS="-lpng -lz" \
       LIBS="-lpng -lz" \
 %endif
 %endif
       ./configure \
       ./configure \
           --prefix=%{l_prefix} \
           --prefix=%{l_prefix} \
           --with-apache=../apache_%{V_apache} \
           --with-apache=../apache_%{V_apache} \
           --with-config-file-path=%{l_prefix}/etc/apache \
           --with-config-file-path=%{l_prefix}/etc/apache \
-%if "%{php_mysql}" == "yes"
+%if "%{with_mod_php_mysql}" == "yes"
           --with-mysql=%{l_prefix} \
           --with-mysql=%{l_prefix} \
 %endif
 %endif
-%if "%{php_gd}" == "yes"
+%if "%{with_mod_php_gd}" == "yes"
           --with-gd=%{l_prefix} \
           --with-gd=%{l_prefix} \
 %endif
 %endif
-%if "%{php_db}" == "yes"
+%if "%{with_mod_php_db}" == "yes"
           --with-db3=%{l_prefix} \
           --with-db3=%{l_prefix} \
 %endif
 %endif
-%if "%{php_zlib}" == "yes" || "%{php_pdflib}" == "yes"
+%if "%{with_mod_php_zlib}" == "yes" || "%{with_mod_php_pdflib}" == "yes"
           --with-zlib=%{l_prefix} \
           --with-zlib=%{l_prefix} \
 %endif
 %endif
-%if "%{php_bzip2}" == "yes"
+%if "%{with_mod_php_bzip2}" == "yes"
           --with-bz2=%{l_prefix} \
           --with-bz2=%{l_prefix} \
 %endif
 %endif
-%if "%{php_pdflib}" == "yes"
+%if "%{with_mod_php_pdflib}" == "yes"
           --with-pdflib=%{l_prefix} \
           --with-pdflib=%{l_prefix} \
 %endif
 %endif
-%if "%{php_openssl}" == "yes" || "%{php_openldap}" == "yes"
+%if "%{with_mod_php_openssl}" == "yes" || "%{with_mod_php_openldap}" == "yes"
           --with-openssl=%{l_prefix} \
           --with-openssl=%{l_prefix} \
 %endif
 %endif
-%if "%{php_openldap}" == "yes"
+%if "%{with_mod_php_openldap}" == "yes"
           --with-ldap=%{l_prefix} \
           --with-ldap=%{l_prefix} \
 %endif
 %endif
-%if "%{php_mm}" == "yes"
+%if "%{with_mod_php_mm}" == "yes"
           --with-mm=%{l_prefix} \
           --with-mm=%{l_prefix} \
           --enable-session \
           --enable-session \
 %endif
 %endif
-%if "%{php_pcre}" == "yes"
+%if "%{with_mod_php_pcre}" == "yes"
           --with-pcre=%{l_prefix} \
           --with-pcre=%{l_prefix} \
 %endif
 %endif
-%if "%{php_ftp}" == "yes"
+%if "%{with_mod_php_ftp}" == "yes"
           --enable-ftp \
           --enable-ftp \
 %endif
 %endif
-%if "%{php_java}" == "yes"
+%if "%{with_mod_php_java}" == "yes"
           --with-java=%{l_prefix}/libexec/jdk-sun \
           --with-java=%{l_prefix}/libexec/jdk-sun \
 %endif
 %endif
-%if "%{php_oci8}" == "yes"
+%if "%{with_mod_php_oci8}" == "yes"
           --with-oci8 \
           --with-oci8 \
 %endif
 %endif
           --disable-shared \
           --disable-shared \
@@ -430,10 +392,12 @@ AutoReqProv:  no
           prefix=$RPM_BUILD_ROOT%{l_prefix}
           prefix=$RPM_BUILD_ROOT%{l_prefix}
     )
     )
 %endif
 %endif
-%if "%{mod_dav}" == "yes"
+
+    #   optionally prepare mod_dav
+%if "%{with_mod_dav}" == "yes"
     ( cd mod_dav-%{V_mod_dav}
     ( cd mod_dav-%{V_mod_dav}
       CC="%{l_cc}" \
       CC="%{l_cc}" \
-%if "%{mod_ssl}" == "yes"
+%if "%{with_mod_ssl}" == "yes"
       CFLAGS="%{l_cflags -O}" \
       CFLAGS="%{l_cflags -O}" \
 %else
 %else
       CFLAGS="%{l_cflags -O} -DEAPI" \
       CFLAGS="%{l_cflags -O} -DEAPI" \
@@ -445,59 +409,81 @@ AutoReqProv:  no
       %{l_make} %{l_mflags} install
       %{l_make} %{l_mflags} install
     )
     )
 %endif
 %endif
-%if "%{mod_layout}" == "yes"
+
+    #   optionally prepare mod_layout
+%if "%{with_mod_layout}" == "yes"
     ( cd mod_layout-%{V_mod_layout}
     ( cd mod_layout-%{V_mod_layout}
       mkdir ../apache_%{V_apache}/src/modules/layout
       mkdir ../apache_%{V_apache}/src/modules/layout
       cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
       cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
       chmod -R u+w ../apache_%{V_apache}/src/modules/layout
       chmod -R u+w ../apache_%{V_apache}/src/modules/layout
     )
     )
 %endif
 %endif
-%if "%{mod_macro}" == "yes"
+
+    #   optionally prepare mod_macro
+%if "%{with_mod_macro}" == "yes"
     ( cd mod_macro-%{V_mod_macro}
     ( cd mod_macro-%{V_mod_macro}
       cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
       cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
     )
     )
 %endif
 %endif
-%if "%{mod_auth_pam}" == "yes"
+
+    #   optionally prepare mod_auth_pam
+%if "%{with_mod_auth_pam}" == "yes"
     ( cd mod_auth_pam-%{V_mod_auth_pam}
     ( cd mod_auth_pam-%{V_mod_auth_pam}
       cp mod_auth_pam.c ../apache_%{V_apache}/src/modules/extra/
       cp mod_auth_pam.c ../apache_%{V_apache}/src/modules/extra/
     )
     )
 %endif
 %endif
-%if "%{mod_gzip}" == "yes"
+
+    #   optionally prepare mod_gzip
+%if "%{with_mod_gzip}" == "yes"
     cp %{SOURCE mod_gzip.c} apache_%{V_apache}/src/modules/extra/
     cp %{SOURCE mod_gzip.c} apache_%{V_apache}/src/modules/extra/
 %endif
 %endif
-%if "%{mod_zmod}" == "yes"
+
+    #   optionally prepare mod_zmod
+%if "%{with_mod_zmod}" == "yes"
     ( cd src
     ( cd src
       mkdir ../apache_%{V_apache}/src/modules/zmod
       mkdir ../apache_%{V_apache}/src/modules/zmod
       %{l_shtool} subst -e 's;"compat.h";"ap_compat.h";' modules/zmod/mod_zmod.c
       %{l_shtool} subst -e 's;"compat.h";"ap_compat.h";' modules/zmod/mod_zmod.c
       cp modules/zmod/* ../apache_%{V_apache}/src/modules/zmod/
       cp modules/zmod/* ../apache_%{V_apache}/src/modules/zmod/
     )
     )
 %endif
 %endif
-%if "%{mod_fastcgi}" == "yes"
+
+    #   optionally prepare mod_fastcgi
+%if "%{with_mod_fastcgi}" == "yes"
     ( cd mod_fastcgi-%{V_mod_fastcgi}
     ( cd mod_fastcgi-%{V_mod_fastcgi}
       mkdir ../apache_%{V_apache}/src/modules/fastcgi
       mkdir ../apache_%{V_apache}/src/modules/fastcgi
       cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
       cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
     )
     )
 %endif
 %endif
-%if "%{mod_throttle}" == "yes"
+
+    #   optionally prepare mod_throttle
+%if "%{with_mod_throttle}" == "yes"
     ( cd mod_throttle-*
     ( cd mod_throttle-*
       cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
       cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
     )
     )
 %endif
 %endif
-%if "%{mod_access_referer}" == "yes"
+
+    #   optionally prepare mod_access_referer
+%if "%{with_mod_access_referer}" == "yes"
     ( cd mod_access_referer-%{V_mod_access_referer}
     ( cd mod_access_referer-%{V_mod_access_referer}
       cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
       cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
     )
     )
 %endif
 %endif
-%if "%{mod_roaming}" == "yes"
+
+    #   optionally prepare mod_roaming
+%if "%{with_mod_roaming}" == "yes"
     ( cd mod_roaming-%{V_mod_roaming}
     ( cd mod_roaming-%{V_mod_roaming}
       cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
       cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
     )
     )
 %endif
 %endif
-%if "%{mod_relocate}" == "yes"
+
+    #   optionally prepare mod_relocate
+%if "%{with_mod_relocate}" == "yes"
     ( cd mod_relocate-%{V_mod_relocate}
     ( cd mod_relocate-%{V_mod_relocate}
       cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
       cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
     )
     )
 %endif
 %endif
+
+    #   configure Apache
     ( cd apache_%{V_apache}
     ( cd apache_%{V_apache}
       cflags="%{l_cflags -O}"
       cflags="%{l_cflags -O}"
       ldflags=""
       ldflags=""
@@ -511,7 +497,7 @@ AutoReqProv:  no
       CFLAGS="$cflags" \
       CFLAGS="$cflags" \
       LDFLAGS="$ldflags" \
       LDFLAGS="$ldflags" \
       LIBS="$libs" \
       LIBS="$libs" \
-%if "%{mod_ssl}" == "yes"
+%if "%{with_mod_ssl}" == "yes"
       EAPI_MM="%{l_prefix}" \
       EAPI_MM="%{l_prefix}" \
       SSL_BASE="%{l_prefix}" \
       SSL_BASE="%{l_prefix}" \
 %endif
 %endif
@@ -529,47 +515,47 @@ AutoReqProv:  no
           --suexec-userdir=.www \
           --suexec-userdir=.www \
           --enable-module=most \
           --enable-module=most \
           --with-perl=%{l_prefix}/bin/perl \
           --with-perl=%{l_prefix}/bin/perl \
-%if "%{mod_ssl}" == "yes"
+%if "%{with_mod_ssl}" == "yes"
           --enable-rule=EAPI \
           --enable-rule=EAPI \
           --enable-module=ssl \
           --enable-module=ssl \
 %endif
 %endif
-%if "%{mod_perl}" == "yes"
+%if "%{with_mod_perl}" == "yes"
           --activate-module=src/modules/perl/libperl.a \
           --activate-module=src/modules/perl/libperl.a \
 %endif
 %endif
-%if "%{mod_php}" == "yes"
+%if "%{with_mod_php}" == "yes"
           --activate-module=src/modules/php4/libphp4.a \
           --activate-module=src/modules/php4/libphp4.a \
 %endif
 %endif
-%if "%{mod_dav}" == "yes"
+%if "%{with_mod_dav}" == "yes"
           --activate-module=src/modules/dav/libdav.a \
           --activate-module=src/modules/dav/libdav.a \
 %endif
 %endif
-%if "%{mod_layout}" == "yes"
+%if "%{with_mod_layout}" == "yes"
           --activate-module=src/modules/layout/liblayout.a \
           --activate-module=src/modules/layout/liblayout.a \
 %endif
 %endif
-%if "%{mod_macro}" == "yes"
+%if "%{with_mod_macro}" == "yes"
           --activate-module=src/modules/extra/mod_macro.o \
           --activate-module=src/modules/extra/mod_macro.o \
 %endif
 %endif
-%if "%{mod_auth_pam}" == "yes"
+%if "%{with_mod_auth_pam}" == "yes"
           --activate-module=src/modules/extra/mod_auth_pam.o \
           --activate-module=src/modules/extra/mod_auth_pam.o \
 %endif
 %endif
-%if "%{mod_gzip}" == "yes"
+%if "%{with_mod_gzip}" == "yes"
           --activate-module=src/modules/extra/mod_gzip.o \
           --activate-module=src/modules/extra/mod_gzip.o \
 %endif
 %endif
-%if "%{mod_zmod}" == "yes"
+%if "%{with_mod_zmod}" == "yes"
           --activate-module=src/modules/zmod/libzmod.a \
           --activate-module=src/modules/zmod/libzmod.a \
 %endif
 %endif
-%if "%{mod_fastcgi}" == "yes"
+%if "%{with_mod_fastcgi}" == "yes"
           --activate-module=src/modules/fastcgi/libfastcgi.a \
           --activate-module=src/modules/fastcgi/libfastcgi.a \
 %endif
 %endif
-%if "%{mod_throttle}" == "yes"
+%if "%{with_mod_throttle}" == "yes"
           --activate-module=src/modules/extra/mod_throttle.o \
           --activate-module=src/modules/extra/mod_throttle.o \
 %endif
 %endif
-%if "%{mod_access_referer}" == "yes"
+%if "%{with_mod_access_referer}" == "yes"
           --activate-module=src/modules/extra/mod_access_referer.o \
           --activate-module=src/modules/extra/mod_access_referer.o \
 %endif
 %endif
-%if "%{mod_roaming}" == "yes"
+%if "%{with_mod_roaming}" == "yes"
           --activate-module=src/modules/extra/mod_roaming.o \
           --activate-module=src/modules/extra/mod_roaming.o \
 %endif
 %endif
-%if "%{mod_relocate}" == "yes"
+%if "%{with_mod_relocate}" == "yes"
           --activate-module=src/modules/extra/mod_relocate.o \
           --activate-module=src/modules/extra/mod_relocate.o \
 %endif
 %endif
           --enable-module=so
           --enable-module=so
@@ -577,8 +563,11 @@ AutoReqProv:  no
     )
     )
 
 
 %install
 %install
+    #   install Apache
     ( cd apache_%{V_apache}
     ( cd apache_%{V_apache}
+      #   perform standard Apache installation procedure
       %{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
       %{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
+      #   post-adjustments to installation tree
       mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
       mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
          $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
          $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
       rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
       rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
@@ -594,9 +583,13 @@ AutoReqProv:  no
          $RPM_BUILD_ROOT%{l_prefix}/cgi/
          $RPM_BUILD_ROOT%{l_prefix}/cgi/
       rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
       rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
     )
     )
-%if "%{mod_perl}" == "yes"
+
+    #   optionally cleanup for mod_perl
+%if "%{with_mod_perl}" == "yes"
     rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
     rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
 %endif
 %endif
+
+    #   create default configuration
     l_hostname=`%{l_shtool} echo -e %h`
     l_hostname=`%{l_shtool} echo -e %h`
     l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
     l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
     %{l_shtool} install -c -m 644 \
     %{l_shtool} install -c -m 644 \
@@ -612,14 +605,17 @@ AutoReqProv:  no
     mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache/magic $RPM_BUILD_ROOT%{l_prefix}/etc/apache/mime.magic
     mv $RPM_BUILD_ROOT%{l_prefix}/etc/apache/magic $RPM_BUILD_ROOT%{l_prefix}/etc/apache/mime.magic
     find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
     find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
 
 
+    #   create run-command script
     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
     %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
     %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g'    \
     %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g'    \
         -e 's;@l_musr@;%{l_musr};g' -e 's;@l_mgrp@;%{l_mgrp};g'  \
         -e 's;@l_musr@;%{l_musr};g' -e 's;@l_mgrp@;%{l_mgrp};g'  \
         %{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
         %{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
 
 
+    #   strip installation binaries
     strip $RPM_BUILD_ROOT%{l_prefix}/bin/*  2> /dev/null || true
     strip $RPM_BUILD_ROOT%{l_prefix}/bin/*  2> /dev/null || true
     strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2> /dev/null || true
     strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* 2> /dev/null || true
 
 
+    #   determine installation tree files
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \
         %{l_files_std} \
         '%attr(4755,root,%{l_mgrp}) %{l_prefix}/sbin/suexec' \
         '%attr(4755,root,%{l_mgrp}) %{l_prefix}/sbin/suexec' \
@@ -632,7 +628,7 @@ AutoReqProv:  no
     rm -rf $RPM_BUILD_ROOT
     rm -rf $RPM_BUILD_ROOT
 
 
 %post
 %post
-%if "%{mod_auth_pam}" == "yes"
+%if "%{with_mod_auth_pam}" == "yes"
     #   add PAM configuration entry
     #   add PAM configuration entry
     if [ $1 -eq 1 ]; then
     if [ $1 -eq 1 ]; then
         $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "apache"
         $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "apache"
@@ -640,7 +636,7 @@ AutoReqProv:  no
 %endif
 %endif
 
 
 %preun
 %preun
-%if "%{mod_auth_pam}" == "yes"
+%if "%{with_mod_auth_pam}" == "yes"
     #   remove PAM configuration entry
     #   remove PAM configuration entry
     if [ $1 -eq 0 ]; then
     if [ $1 -eq 0 ]; then
         $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "apache"
         $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "apache"