Browse Source

upgrading package: apache2 2.0.53 -> 2.0.54

master
parent
commit
feb7cdd10f
  1. 177
      apache2/apache2.spec

177
apache2/apache2.spec

@ -22,6 +22,10 @@
## SUCH DAMAGE.
##
# package version
%define V_apache 2.0.54
%define V_mod_perl 2.0.0-RC4
# package information
Name: apache2
Summary: Apache Webserver (V2)
@ -32,8 +36,8 @@ Distribution: OpenPKG
Class: PLUS
Group: Web
License: ASF
Version: 2.0.53
Release: 20050328
Version: %{V_apache}
Release: 20050417
# package options (suexec related)
%option with_suexec yes
@ -47,11 +51,13 @@ Release: 20050328
%option with_mod_ldap no
%option with_mod_proxy no
%option with_mod_filecache no
%option with_mod_perl no
%option with_shared_core no
# list of sources
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
Source1: rc.apache2
Source0: http://www.apache.org/dist/httpd/httpd-%{V_apache}.tar.gz
Source1: http://perl.apache.org/dist/mod_perl-%{V_mod_perl}.tar.gz
Source2: rc.apache2
Patch0: apache2.patch
# build information
@ -73,6 +79,10 @@ PreReq: openssl
BuildPreReq: openldap, openssl
PreReq: openldap, openssl
%endif
%if "%{with_mod_perl}" == "yes"
BuildPreReq: perl
PreReq: perl
%endif
AutoReq: no
AutoReqProv: no
Conflicts: apache
@ -95,93 +105,134 @@ Conflicts: apache
%track
prog apache2 = {
version = %{version}
version = %{V_apache}
url = http://www.apache.org/dist/httpd/
regex = httpd-(2.[02468]\.\d+)\.tar\.gz
}
prog apache2:mod_perl = {
version = %{V_mod_perl}
url = http://perl.apache.org/dist/
regex = mod_perl-(__VER__)\.tar\.gz
}
%prep
%setup -q -n httpd-%{version}
%patch -p0
%setup -q -c
%patch -p0 -d httpd-%{V_apache}
%if "%{with_mod_perl}" == "yes"
%setup -q -T -D -a 1
%endif
%build
# optionally prepare mod_perl
%if "%{with_mod_perl}" == "yes"
( cd mod_perl-%{V_mod_perl}
eval `%{l_prefix}/bin/perl -V:archname`
eval `%{l_prefix}/bin/perl -V:version`
eval `%{l_prefix}/bin/perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
%{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}${installarchlib} \\" >>$perl
echo " -I${RPM_BUILD_ROOT}${installprivlib} \\" >>$perl
echo " -I${RPM_BUILD_ROOT}${installsitearch} \\" >>$perl
echo " -I${RPM_BUILD_ROOT}${installsitelib} \\" >>$perl
echo " \"\$@\"" >>$perl
chmod a+x $perl
$perl Makefile.PL \
MP_AP_PREFIX="`pwd`/../httpd-%{V_apache}" \
MP_AP_BUILD=0 \
MP_CCOPTS="%{l_cflags -O}" \
MP_INST_APACHE2=1 \
MP_USE_DSO=0 \
MP_USE_STATIC=1 \
MP_COMPAT_1X=1
%{l_make} %{l_mflags}
%{l_make} %{l_mflags} install
) || exit $?
%endif
# configure package
export CC="%{l_cc}"
export CFLAGS="%{l_cflags -O}"
export CPPFLAGS="%{l_cppflags}"
export LDFLAGS="%{l_ldflags}"
export LIBS=""
case "%{l_platform -t}" in
*-sunos* ) LIBS="$LIBS -lrt" ;;
esac
( cd httpd-%{V_apache}
export CC="%{l_cc}"
export CFLAGS="%{l_cflags -O}"
export CPPFLAGS="%{l_cppflags}"
export LDFLAGS="%{l_ldflags}"
export LIBS=""
case "%{l_platform -t}" in
*-sunos* ) LIBS="$LIBS -lrt" ;;
esac
%if "%{with_mod_ldap}" == "yes"
LIBS="$LIBS -lssl -lcrypto"
%endif
./configure \
--enable-layout=GNU \
--prefix=%{l_prefix} \
--sysconfdir=%{l_prefix}/etc/apache2 \
--libexecdir=%{l_prefix}/libexec/apache2 \
--with-mpm=prefork \
LIBS="$LIBS -lssl -lcrypto"
%endif
./configure \
--enable-layout=GNU \
--prefix=%{l_prefix} \
--sysconfdir=%{l_prefix}/etc/apache2 \
--libexecdir=%{l_prefix}/libexec/apache2 \
--with-mpm=prefork \
%if "%{with_suexec}" == "yes"
--enable-suexec \
--with-suexec-bin=%{l_prefix}/sbin/suexec \
--with-suexec-caller=%{with_suexec_caller} \
--with-suexec-userdir=%{with_suexec_userdir} \
--with-suexec-logfile=%{l_prefix}/var/apache/log/suexec.log \
--enable-suexec \
--with-suexec-bin=%{l_prefix}/sbin/suexec \
--with-suexec-caller=%{with_suexec_caller} \
--with-suexec-userdir=%{with_suexec_userdir} \
--with-suexec-logfile=%{l_prefix}/var/apache/log/suexec.log \
%endif
%if "%{with_mod_deflate}" == "yes"
--enable-deflate \
--with-z=%{l_prefix} \
--enable-deflate \
--with-z=%{l_prefix} \
%endif
%if "%{with_mod_ssl}" == "yes"
--enable-ssl \
--with-ssl=%{l_prefix} \
--enable-ssl \
--with-ssl=%{l_prefix} \
%endif
%if "%{with_mod_dav}" == "yes"
--enable-dav \
--enable-dav-fs \
--enable-dav \
--enable-dav-fs \
%endif
%if "%{with_mod_ldap}" == "yes"
--enable-ldap \
--enable-auth-ldap \
--with-ldap \
--with-ldap-include=%{l_prefix}/include/ \
--with-ldap-lib=%{l_prefix}/lib \
--enable-ldap \
--enable-auth-ldap \
--with-ldap \
--with-ldap-include=%{l_prefix}/include/ \
--with-ldap-lib=%{l_prefix}/lib \
%endif
%if "%{with_mod_proxy}" == "yes"
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-http \
--enable-proxy-ftp \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-http \
--enable-proxy-ftp \
%endif
%if "%{with_mod_filecache}" == "yes"
--enable-file-cache \
--enable-file-cache \
%endif
%if "%{with_shared_core}" == "yes"
--enable-so \
%endif
--enable-speling \
--enable-rewrite \
--enable-headers \
--enable-info \
--enable-mime-magic \
--enable-vhost-alias \
--enable-auth-dbm \
--disable-shared \
--disable-threads \
--with-dbm=db42 \
--with-berkeley-db=%{l_prefix} \
--with-expat=%{l_prefix} \
--with-iconv=%{l_prefix}
# build package
%{l_make} %{l_mflags}
--enable-so \
%endif
--enable-speling \
--enable-rewrite \
--enable-headers \
--enable-info \
--enable-mime-magic \
--enable-vhost-alias \
--enable-auth-dbm \
--disable-shared \
--disable-threads \
--with-dbm=db42 \
--with-berkeley-db=%{l_prefix} \
--with-expat=%{l_prefix} \
--with-iconv=%{l_prefix}
# build package
%{l_make} %{l_mflags}
) || exit $?
%install
# install package
rm -rf $RPM_BUILD_ROOT
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
( cd httpd-%{V_apache}
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
) || exit $?
# adjust configuration
%{l_shtool} subst \

Loading…
Cancel
Save