#!/bin/sh -ex # usage: "httpd-workspace srcdir rootdir" # ...creates build directories in srcdir and install roots in rootdir repos=https://svn.apache.org/repos/asf/ MFLAGS="-s `rpm --eval %{_smp_mflags}`" MODULES="ssl proxy proxy_http proxy_connect echo dav dav_fs expires \ headers info rewrite vhost_alias case_filter case_filter_in \ deflate bucketeer cache disk_cache mem_cache filter file_cache \ mem_cache authn_alias dav_lock authnz_ldap auth_ldap ldap" src=$1 dest=$2 test -d $src test -d $dest test $src != $dest buildall() { apr=$1 apu=$2 httpd=$3 pf=$4 pushd $src/${apr} ./buildconf ./configure --enable-maintainer-mode --prefix=$dest/${apr} \ --with-devrandom=/dev/urandom make ${MFLAGS} make install popd pushd $src/${apu} echo ./buildconf --with-apr=$src/${apr} > reconf chmod +x reconf ./reconf ./configure --prefix=$dest/${apu} --with-apr=$dest/${apr} \ --without-gdbm --with-ldap make ${MFLAGS} make install popd pushd $src/${httpd} echo ./buildconf --with-apr=$src/${apr} --with-apr-util=$src/${apu} > reconf chmod +x reconf ./reconf pcre="--with-pcre" [ "${httpd}" = "httpd-2.0.x" ] && pcre="" ./configure --prefix=$dest/${httpd} \ --enable-maintainer-mode \ --with-apr=$dest/${apr} --with-apr-util=$dest/${apu} \ --enable-mods-shared="all $MODULES" ${pcre} make ${MFLAGS} make install popd pushd $src/${pf} echo perl Makefile.PL -apxs $dest/${httpd}/bin/apxs > reconf chmod +x reconf ./reconf ./t/TEST -conf popd } CO="svn co -q" ${CO} $repos/httpd/httpd/trunk $src/httpd-trunk ${CO} $repos/apr/apr/trunk $src/apr-trunk ${CO} $repos/apr/apr-util/trunk $src/apu-trunk ${CO} $repos/httpd/test/trunk/perl-framework $src/pf-trunk buildall apr-trunk apu-trunk httpd-trunk pf-trunk ${CO} $repos/httpd/httpd/branches/2.0.x $src/httpd-2.0.x ${CO} $repos/apr/apr/branches/0.9.x $src/apr-0.9.x ${CO} $repos/apr/apr-util/branches/0.9.x $src/apu-0.9.x ${CO} $repos/httpd/test/trunk/perl-framework $src/pf-2.0.x buildall apr-0.9.x apu-0.9.x httpd-2.0.x pf-2.0.x ${CO} $repos/httpd/httpd/branches/2.2.x $src/httpd-2.2.x ${CO} $repos/apr/apr/branches/1.2.x $src/apr-1.2.x ${CO} $repos/apr/apr-util/branches/1.2.x $src/apu-1.2.x ${CO} $repos/httpd/test/trunk/perl-framework $src/pf-2.2.x buildall apr-1.2.x apu-1.2.x httpd-2.2.x pf-2.2.x