|
|
|
##
|
|
|
|
## apache.spec -- RPM Specification for Apache
|
|
|
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
|
|
|
|
##
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
## copies.
|
|
|
|
##
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
##
|
|
|
|
|
|
|
|
# the additionally used Apache modules
|
|
|
|
%define mod_ssl no
|
|
|
|
%define mod_perl no
|
|
|
|
%define mod_php no
|
|
|
|
%define mod_dav no
|
|
|
|
%define mod_layout no
|
|
|
|
%define mod_macro no
|
|
|
|
%define mod_auth_pam no
|
|
|
|
%define mod_gzip no
|
|
|
|
%define mod_zmod no
|
|
|
|
%define mod_fastcgi no
|
|
|
|
%define mod_throttle no
|
|
|
|
%define mod_access_referer no
|
|
|
|
%define mod_roaming no
|
|
|
|
%define mod_relocate no
|
|
|
|
|
|
|
|
# more optional settings
|
|
|
|
# (requires mod_php set to "yes" above)
|
|
|
|
%define php_mysql no
|
|
|
|
%define php_gd no
|
|
|
|
|
|
|
|
# the software versions
|
|
|
|
%define V_apache 1.3.22
|
|
|
|
%define V_mod_ssl 2.8.5
|
|
|
|
%define V_mod_perl 1.26
|
|
|
|
%define V_mod_php 4.0.6
|
|
|
|
%define V_mod_dav 1.0.2-1.3.6
|
|
|
|
%define V_mod_layout 3.0.1
|
|
|
|
%define V_mod_macro 1.1.1
|
|
|
|
%define V_mod_auth_pam 1.0a
|
|
|
|
%define V_mod_gzip 1.3.19.1a
|
|
|
|
%define V_mod_zmod 2_3
|
|
|
|
%define V_mod_fastcgi 2.2.10
|
|
|
|
%define V_mod_throttle 312
|
|
|
|
%define V_mod_access_referer 1.0.2
|
|
|
|
%define V_mod_roaming 1.0.2
|
|
|
|
%define V_mod_relocate 1.0
|
|
|
|
|
|
|
|
# package information
|
|
|
|
Name: apache
|
|
|
|
Summary: Apache HTTP Server
|
|
|
|
URL: http://httpd.apache.org/
|
|
|
|
Vendor: Apache Software Foundation
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
Distribution: OpenPKG [EXP]
|
|
|
|
Group: Web
|
|
|
|
License: BSD-style
|
|
|
|
Version: %{V_apache}
|
|
|
|
Release: %{l_branch}.0
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
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
|
|
|
|
# %endif
|
|
|
|
# %if "%{mod_perl}" == "yes"
|
|
|
|
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
|
|
|
|
Patch0: ftp://ftp.openpkg.org/DST/php/php-%{V_mod_php}.patch
|
|
|
|
# %endif
|
|
|
|
# %if "%{mod_dav}" == "yes"
|
|
|
|
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
|
|
|
|
# %endif
|
|
|
|
# %if "%{mod_macro}" == "yes"
|
|
|
|
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
|
|
|
|
# %endif
|
|
|
|
# %if "%{mod_gzip}" == "yes"
|
|
|
|
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
|
|
|
|
# %endif
|
|
|
|
# %if "%{mod_fastcgi}" == "yes"
|
|
|
|
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
|
|
|
|
# %endif
|
|
|
|
# %if "%{mod_access_referer}" == "yes"
|
|
|
|
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
|
|
|
|
# %endif
|
|
|
|
# %if "%{mod_relocate}" == "yes"
|
|
|
|
Source14: http://www.tangent.org/mod_relocate/mod_relocate-%{V_mod_relocate}.tar.gz
|
|
|
|
# %endif
|
|
|
|
Source20: apache.conf
|
|
|
|
Source21: apache.base
|
|
|
|
Source22: apache.vhost
|
|
|
|
Source23: rc.apache
|
|
|
|
|
|
|
|
# build information
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
BuildPreReq: openpkg >= 0.9-20011022.0
|
|
|
|
PreReq: openpkg >= 0.9-20011022.0
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
BuildPreReq: openssl, mm
|
|
|
|
%endif
|
|
|
|
%if "%{mod_perl}" == "yes"
|
|
|
|
BuildPreReq: perl
|
|
|
|
PreReq: perl
|
|
|
|
%endif
|
|
|
|
%if "%{mod_php}" == "yes"
|
|
|
|
BuildPreReq: make
|
|
|
|
%if "%{php_mysql}" == "yes"
|
|
|
|
BuildPreReq: mysql
|
|
|
|
%endif
|
|
|
|
%if "%{php_gd}" == "yes"
|
|
|
|
BuildPreReq: gd
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
AutoReq: no
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
%description
|
|
|
|
The Apache Project is a collaborative software development effort
|
|
|
|
aimed at creating a robust, commercial-grade, featureful, and
|
|
|
|
freely-available source code implementation of an HTTP (Web) server.
|
|
|
|
The project is jointly managed by a group of volunteers located
|
|
|
|
around the world, using the Internet and the Web to communicate,
|
|
|
|
plan, and develop the server and its related documentation. These
|
|
|
|
volunteers are known as the Apache Group. In addition, hundreds
|
|
|
|
of users have contributed ideas, code, and documentation to the
|
|
|
|
project.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup0 -q -c
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
%setup1 -q -T -D -a 1
|
|
|
|
%endif
|
|
|
|
%if "%{mod_perl}" == "yes"
|
|
|
|
%setup2 -q -T -D -a 2
|
|
|
|
%endif
|
|
|
|
%if "%{mod_php}" == "yes"
|
|
|
|
%setup3 -q -T -D -a 3
|
|
|
|
%patch0 -p0
|
|
|
|
%endif
|
|
|
|
%if "%{mod_dav}" == "yes"
|
|
|
|
%setup4 -q -T -D -a 4
|
|
|
|
%endif
|
|
|
|
%if "%{mod_layout}" == "yes"
|
|
|
|
%setup5 -q -T -D -a 5
|
|
|
|
%endif
|
|
|
|
%if "%{mod_macro}" == "yes"
|
|
|
|
%setup6 -q -T -D -a 6
|
|
|
|
%endif
|
|
|
|
%if "%{mod_auth_pam}" == "yes"
|
|
|
|
%setup7 -q -T -D -a 7
|
|
|
|
%endif
|
|
|
|
%if "%{mod_zmod}" == "yes"
|
|
|
|
%setup9 -q -T -D -a 9
|
|
|
|
%endif
|
|
|
|
%if "%{mod_fastcgi}" == "yes"
|
|
|
|
%setup10 -q -T -D -a 10
|
|
|
|
%endif
|
|
|
|
%if "%{mod_throttle}" == "yes"
|
|
|
|
%setup11 -q -T -D -a 11
|
|
|
|
%endif
|
|
|
|
%if "%{mod_access_referer}" == "yes"
|
|
|
|
%setup12 -q -T -D -a 12
|
|
|
|
%endif
|
|
|
|
%if "%{mod_roaming}" == "yes"
|
|
|
|
%setup13 -q -T -D -a 13
|
|
|
|
%endif
|
|
|
|
%if "%{mod_relocate}" == "yes"
|
|
|
|
%setup14 -q -T -D -a 14
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%build
|
|
|
|
PATH="%{l_prefix}/bin:%{l_prefix}/sbin:$PATH"; export PATH
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
( cd mod_ssl-%{V_mod_ssl}-%{V_apache}
|
|
|
|
./configure \
|
|
|
|
--with-apache=../apache_%{V_apache} \
|
|
|
|
--expert
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_php}" == "yes" || "%{mod_dav}" == "yes"
|
|
|
|
( cd apache_%{V_apache}
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
./configure \
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
--enable-rule=EAPI \
|
|
|
|
%endif
|
|
|
|
--target=apache \
|
|
|
|
--with-layout=GNU \
|
|
|
|
--prefix=%{l_prefix} \
|
|
|
|
--sbindir=%{l_prefix}/sbin \
|
|
|
|
--sysconfdir=%{l_prefix}/etc/apache \
|
|
|
|
--libexecdir=%{l_prefix}/lib/apache \
|
|
|
|
--datadir=%{l_prefix}/share/apache \
|
|
|
|
--localstatedir=%{l_prefix}/var/apache
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_perl}" == "yes"
|
|
|
|
( cd mod_perl-%{V_mod_perl}
|
|
|
|
eval `%{l_prefix}/bin/perl -V:archname`
|
|
|
|
eval `%{l_prefix}/bin/perl -V:version`
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
|
perl=$RPM_BUILD_ROOT%{l_prefix}/bin/perl
|
|
|
|
echo "#!/bin/sh" >$perl
|
|
|
|
echo "exec %{l_prefix}/bin/perl \\" >>$perl
|
|
|
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
|
|
|
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
|
|
|
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
|
|
|
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
|
|
|
|
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
|
|
|
|
echo " \"\$@\"" >>$perl
|
|
|
|
chmod a+x $perl
|
|
|
|
$perl Makefile.PL \
|
|
|
|
PREFIX=$RPM_BUILD_ROOT%{l_prefix} \
|
|
|
|
APACHE_SRC=../apache_%{V_apache}/src \
|
|
|
|
DO_HTTPD=1 \
|
|
|
|
USE_APACI=1 \
|
|
|
|
PREP_HTTPD=1 \
|
|
|
|
EVERYTHING=1 \
|
|
|
|
PERL_TIE_TABLES=1 \
|
|
|
|
PERL_DIRECTIVE_HANDLERS=1
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
%{l_make} %{l_mflags} install
|
|
|
|
mkdir $RPM_BUILD_ROOT%{l_prefix}/perl5
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/* $RPM_BUILD_ROOT%{l_prefix}/perl5/
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/perl5 $RPM_BUILD_ROOT%{l_prefix}/lib/
|
|
|
|
%{l_rpmtool} subst "s;^\\(PERL = \\).*;\\1 $perl;" \
|
|
|
|
-- ../apache_%{V_apache}/src/modules/perl/mod_perl.config
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_php}" == "yes"
|
|
|
|
( cd php-%{V_mod_php}
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
CFLAGS="%{l_cflags -O} -I%{l_prefix}/include -DEAPI" \
|
|
|
|
%else
|
|
|
|
CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
|
|
|
|
%endif
|
|
|
|
CPPFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
|
|
|
|
LDFLAGS="%{l_cflags -O} -L%{l_prefix}/lib" \
|
|
|
|
%if "%{php_gd}" == "yes"
|
|
|
|
LIBS="-lpng -lz" \
|
|
|
|
%endif
|
|
|
|
./configure \
|
|
|
|
--prefix=%{l_prefix} \
|
|
|
|
--with-apache=../apache_%{V_apache} \
|
|
|
|
--with-config-file-path=%{l_prefix}/etc/apache \
|
|
|
|
%if "%{php_mysql}" == "yes"
|
|
|
|
--with-mysql=%{l_prefix} \
|
|
|
|
%endif
|
|
|
|
%if "%{php_gd}" == "yes"
|
|
|
|
--with-gd=%{l_prefix} \
|
|
|
|
%endif
|
|
|
|
--disable-shared \
|
|
|
|
--enable-track-vars
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
%{l_rpmtool} subst \
|
|
|
|
"s;^\\(EXTENSION_DIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
|
|
|
|
"s;^\\(PEAR_INSTALLDIR = \\)\\(%{l_prefix}\\);\\1$RPM_BUILD_ROOT\\2;" \
|
|
|
|
-- config_vars.mk
|
|
|
|
%{l_make} %{l_mflags} install \
|
|
|
|
prefix=$RPM_BUILD_ROOT%{l_prefix}
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_dav}" == "yes"
|
|
|
|
( cd mod_dav-%{V_mod_dav}
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
%else
|
|
|
|
CFLAGS="%{l_cflags -O} -DEAPI" \
|
|
|
|
%endif
|
|
|
|
LDFLAGS="%{l_cflags -O}" \
|
|
|
|
./configure \
|
|
|
|
--with-apache=../apache_%{V_apache}
|
|
|
|
%{l_make} %{l_mflags}
|
|
|
|
%{l_make} %{l_mflags} install
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_layout}" == "yes"
|
|
|
|
( cd mod_layout-%{V_mod_layout}
|
|
|
|
mkdir ../apache_%{V_apache}/src/modules/layout
|
|
|
|
cp * ../apache_%{V_apache}/src/modules/layout/ 2>/dev/null || true
|
|
|
|
chmod -R u+w ../apache_%{V_apache}/src/modules/layout
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_macro}" == "yes"
|
|
|
|
( cd mod_macro-%{V_mod_macro}
|
|
|
|
cp mod_macro.c ../apache_%{V_apache}/src/modules/extra/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_auth_pam}" == "yes"
|
|
|
|
( cd mod_auth_pam-%{V_mod_auth_pam}
|
|
|
|
cp mod_auth_pam.c ../apache_%{V_apache}/src/modules/extra/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_gzip}" == "yes"
|
|
|
|
cp %{SOURCE mod_gzip.c} apache_%{V_apache}/src/modules/extra/
|
|
|
|
%endif
|
|
|
|
%if "%{mod_zmod}" == "yes"
|
|
|
|
( cd src
|
|
|
|
mkdir ../apache_%{V_apache}/src/modules/zmod
|
|
|
|
%{l_rpmtool} subst 's;"compat.h";"ap_compat.h";' -- modules/zmod/mod_zmod.c
|
|
|
|
cp modules/zmod/* ../apache_%{V_apache}/src/modules/zmod/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_fastcgi}" == "yes"
|
|
|
|
( cd mod_fastcgi_%{V_mod_fastcgi}
|
|
|
|
mkdir ../apache_%{V_apache}/src/modules/fastcgi
|
|
|
|
cp -rp * ../apache_%{V_apache}/src/modules/fastcgi/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_throttle}" == "yes"
|
|
|
|
( cd mod_throttle-*
|
|
|
|
cp mod_throttle.c ../apache_%{V_apache}/src/modules/extra/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_access_referer}" == "yes"
|
|
|
|
( cd mod_access_referer-%{V_mod_access_referer}
|
|
|
|
cp mod_access_referer.c ../apache_%{V_apache}/src/modules/extra/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_roaming}" == "yes"
|
|
|
|
( cd mod_roaming-%{V_mod_roaming}
|
|
|
|
cp mod_roaming.c ../apache_%{V_apache}/src/modules/extra/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
%if "%{mod_relocate}" == "yes"
|
|
|
|
( cd mod_relocate-%{V_mod_relocate}
|
|
|
|
cp mod_relocate.c ../apache_%{V_apache}/src/modules/extra/
|
|
|
|
)
|
|
|
|
%endif
|
|
|
|
( cd apache_%{V_apache}
|
|
|
|
CC="%{l_cc}" \
|
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
EAPI_MM="%{l_prefix}" \
|
|
|
|
SSL_BASE="%{l_prefix}" \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_auth_pam}" == "yes"
|
|
|
|
LIBS="$LIBS -lpam" \
|
|
|
|
%endif
|
|
|
|
./configure \
|
|
|
|
--target=apache \
|
|
|
|
--with-layout=GNU \
|
|
|
|
--prefix=%{l_prefix} \
|
|
|
|
--sbindir=%{l_prefix}/sbin \
|
|
|
|
--sysconfdir=%{l_prefix}/etc/apache \
|
|
|
|
--libexecdir=%{l_prefix}/lib/apache \
|
|
|
|
--datadir=%{l_prefix}/share/apache \
|
|
|
|
--localstatedir=%{l_prefix}/var/apache \
|
|
|
|
--enable-suexec \
|
|
|
|
--suexec-caller=%{l_fsusr} \
|
|
|
|
--suexec-userdir=.www \
|
|
|
|
--enable-module=most \
|
|
|
|
--with-perl=%{l_prefix}/bin/perl \
|
|
|
|
%if "%{mod_ssl}" == "yes"
|
|
|
|
--enable-rule=EAPI \
|
|
|
|
--enable-module=ssl \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_perl}" == "yes"
|
|
|
|
--activate-module=src/modules/perl/libperl.a \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_php}" == "yes"
|
|
|
|
--activate-module=src/modules/php4/libphp4.a \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_dav}" == "yes"
|
|
|
|
--activate-module=src/modules/dav/libdav.a \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_layout}" == "yes"
|
|
|
|
--activate-module=src/modules/layout/liblayout.a \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_macro}" == "yes"
|
|
|
|
--activate-module=src/modules/extra/mod_macro.o \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_auth_pam}" == "yes"
|
|
|
|
--activate-module=src/modules/extra/mod_auth_pam.o \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_gzip}" == "yes"
|
|
|
|
--activate-module=src/modules/extra/mod_gzip.o \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_zmod}" == "yes"
|
|
|
|
--activate-module=src/modules/zmod/libzmod.a \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_fastcgi}" == "yes"
|
|
|
|
--activate-module=src/modules/fastcgi/libfastcgi.a \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_throttle}" == "yes"
|
|
|
|
--activate-module=src/modules/extra/mod_throttle.o \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_access_referer}" == "yes"
|
|
|
|
--activate-module=src/modules/extra/mod_access_referer.o \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_roaming}" == "yes"
|
|
|
|
--activate-module=src/modules/extra/mod_roaming.o \
|
|
|
|
%endif
|
|
|
|
%if "%{mod_relocate}" == "yes"
|
|
|
|
--activate-module=src/modules/extra/mod_relocate.o \
|
|
|
|
%endif
|
|
|
|
--enable-module=so
|
|
|
|
%{l_make} %{l_mflags -O} build-quiet
|
|
|
|
)
|
|
|
|
|
|
|
|
%install
|
|
|
|
( cd apache_%{V_apache}
|
|
|
|
%{l_make} %{l_mflags} install root=$RPM_BUILD_ROOT
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small/* \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/small
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/icons/README*
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/*.default
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/srm.conf
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/apache/access.conf
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.en \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/share/apache/htdocs/index.html.*
|
|
|
|
chmod a+rx $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin/*
|
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/share/apache/cgi-bin \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/cgi/
|
|
|
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/cgi/test-cgi
|
|
|
|
)
|
|
|
|
%if "%{mod_perl}" == "yes"
|
|
|
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl
|
|
|
|
%endif
|
|
|
|
l_hostname=`%{l_shtool} echo -e %h`
|
|
|
|
l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
|
|
|
|
%{l_shtool} install -c -m 644 \
|
|
|
|
-e "s;@l_prefix@;%{l_prefix};g" \
|
|
|
|
-e "s;@l_hostname@;$l_hostname;g" \
|
|
|
|
-e "s;@l_domainname@;$l_domainname;g" \
|
|
|
|
-e "s;@l_npusr@;%{l_npusr};g" \
|
|
|
|
-e "s;@l_npgrp@;%{l_npgrp};g" \
|
|
|
|
%{SOURCE apache.base} \
|
|
|
|
%{SOURCE apache.conf} \
|
|
|
|
%{SOURCE apache.vhost} \
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/apache/
|
|
|
|
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
|
|
|
|
|
|
|
|
%{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' \
|
|
|
|
-e 's;@l_fsusr@;%{l_fsusr};g' -e 's;@l_fsgrp@;%{l_fsgrp};g' \
|
|
|
|
%{SOURCE rc.apache} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
|
|
|
|
%{l_files_std} \
|
|
|
|
'%attr(4755,root,%{l_fsgrp}) %{l_prefix}/sbin/suexec' \
|
|
|
|
'%config %{l_prefix}/etc/apache/*' \
|
|
|
|
'%config %attr(444,%{l_fsusr},%{l_fsgrp}) %{l_prefix}/etc/apache/apache.base'
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|