%bcond_with bucketeer # debug one
# this is internal macro, don't change to %%apache_modules_api
-%define _apache_modules_api 20051115
+%define _apache_modules_api 20120211
%define openssl_ver 0.9.8i
%define apr_ver 1:1.4.5
Summary(ru.UTF-8): Самый популярный веб-сервер
Summary(tr.UTF-8): Lider WWW tarayıcı
Name: apache
-Version: 2.2.22
-Release: 1
+Version: 2.4.1
+Release: 0.1
License: Apache v2.0
Group: Networking/Daemons/HTTP
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
-# Source0-md5: d77fa5af23df96a8af68ea8114fa6ce1
+# Source0-md5: 4366afbea8149ca125af01fd59a2f8a2
Source1: %{name}.init
Source2: %{name}.logrotate
Source3: %{name}.sysconfig
Patch15: httpd-2.0.48-debuglog.patch
Patch18: %{name}-v6only-ENOPROTOOPT.patch
Patch19: %{name}-conffile-path.patch
-Patch20: %{name}-apxs.patch
Patch23: %{name}-suexec_fcgi.patch
Patch24: %{name}-bug-48094.patch
# http://scripts.mit.edu/trac/browser/trunk/server/common/patches/httpd-2.2.x-mod_ssl-sessioncaching.patch?rev=1348
%patch8 -p1
%patch9 -p1
%patch10 -p1
-%patch12 -p1
+#%%patch12 -p1
%patch14 -p1
%patch15 -p1
%patch18 -p1
%patch19 -p1
-%patch20 -p1
%patch23 -p1
%patch24 -p1
-%patch25 -p1
+# seems already applied
+#%%patch25 -p1
%patch26 -p1
-%patch28 -p1
+%{?with_itk:%patch28 -p1}
%patch29 -p1
# using system apr, apr-util and pcre
-%{__rm} -r srclib/{apr,apr-util,pcre}
+#%%{__rm} -r srclib/{apr,apr-util,pcre}
# sanity check
MODULES_API=`awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' include/ap_mmn.h`
exit 1
fi
-# fix libdir (at least in PLD layout; no need to care about other ones)
+# fix libdir (at least in TLD layout; no need to care about other ones)
sed -i -e 's,/lib$,/%{_lib},' config.layout
%build
cd ../..
CPPFLAGS="-DMAX_SERVER_LIMIT=200000 -DBIG_SECURITY_HOLE=1"
-for mpm in prefork worker %{?with_event:event} %{?with_itk:itk}; do
-install -d "buildmpm-${mpm}"; cd "buildmpm-${mpm}"
-../%configure \
- --enable-layout=PLD \
+%configure \
+ --enable-layout=TLD \
--disable-v4-mapped \
- $( [ "${mpm}" = "prefork" -o "${mpm}" = "worker" -o "${mpm}" = "event" -o "${mpm}" = "itk" ] && echo "--enable-exception-hook" ) \
+ --enable-exception-hook \
--enable-modules=all \
--enable-mods-shared=all \
--enable-auth-anon \
--enable-speling \
--enable-rewrite \
--enable-so \
- --with-program-name=httpd.${mpm} \
- --with-mpm=${mpm} \
-%ifarch %{ix86}
-%ifnarch i386 i486
- $( [ "${mpm}" = "leader" ] && echo "--enable-nonportable-atomics=yes" ) \
-%endif
-%endif
+ --with-program-name=httpd \
+ --with-mpm=prefork \
+ --with-mpm=worker \
+ --with-mpm=event \
+ --enable-mpms-shared \
--with-suexec-bin=%{_sbindir}/suexec \
--with-suexec-caller=http \
--with-suexec-docroot=%{_datadir} \
--with-pcre
%{__make}
-./httpd.${mpm} -l | grep -v "${mpm}" > modules-inside
-cd ..
-
-done
-
-for mpm in worker %{?with_event:event} %{?with_itk:itk}; do
- if ! cmp -s buildmpm-prefork/modules-inside buildmpm-${mpm}/modules-inside; then
- echo "List of compiled modules is different between prefork-MPM and ${mpm}-MPM!"
- echo "Build failed."
- exit 1
- fi
-done
+./httpd -l > modules-inside
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -C buildmpm-prefork install \
DESTDIR=$RPM_BUILD_ROOT
-# install other mpm-s
-for mpm in worker %{?with_event:event} %{?with_itk:itk}; do
- install buildmpm-${mpm}/httpd.${mpm} $RPM_BUILD_ROOT%{_sbindir}/httpd.${mpm}
-done
-
ln -s httpd.prefork $RPM_BUILD_ROOT%{_sbindir}/httpd
ln -s %{_libexecdir} $RPM_BUILD_ROOT%{_sysconfdir}/modules
ln -s %{_localstatedir}/run/httpd $RPM_BUILD_ROOT%{_sysconfdir}/run