]> TLD Linux GIT Repositories - packages/apache.git/blobdiff - apache.spec
- build MPMs as loadable modules
[packages/apache.git] / apache.spec
index 109acff926d7483d7d24b01e529f5794b1c6133b..8f232f86214f490137f9f0e5daaa0c2afa9704a7 100644 (file)
@@ -23,7 +23,7 @@
 %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
@@ -37,12 +37,12 @@ Summary(pt_BR.UTF-8):       Servidor HTTPD para prover serviços WWW
 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
@@ -89,7 +89,6 @@ Patch14:      httpd-2.0.48-corelimit.patch
 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
@@ -1774,21 +1773,21 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env.
 %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`
@@ -1797,7 +1796,7 @@ if [ "$MODULES_API" != "%_apache_modules_api" ]; then
        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
@@ -1819,12 +1818,10 @@ touch ssl_expr_scan.c
 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 \
@@ -1879,13 +1876,11 @@ install -d "buildmpm-${mpm}"; cd "buildmpm-${mpm}"
        --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} \
@@ -1898,18 +1893,7 @@ install -d "buildmpm-${mpm}"; cd "buildmpm-${mpm}"
        --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
@@ -1923,11 +1907,6 @@ install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
 %{__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