diff options
Diffstat (limited to 'testing/apache2/APKBUILD')
-rw-r--r-- | testing/apache2/APKBUILD | 114 |
1 files changed, 60 insertions, 54 deletions
diff --git a/testing/apache2/APKBUILD b/testing/apache2/APKBUILD index 40cf16b03..a072fbab4 100644 --- a/testing/apache2/APKBUILD +++ b/testing/apache2/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=apache2 pkgver=2.2.16 -pkgrel=0 +pkgrel=1 pkgdesc="A high performance Unix-based HTTP server" url="http://httpd.apache.org/" license="APACHE" @@ -24,16 +24,12 @@ source="http://archive.apache.org/dist/httpd/httpd-$pkgver.tar.bz2 apache2.confd apache2.logrotate apache2.initd + httpd.conf alpine.layout" prepare() { - cd "$srcdir"/httpd-$pkgver - sed -e 's#User daemon#User apache#' \ - -e 's#Group daemon#Group apache#' \ - -i docs/conf/httpd.conf.in || return 1 - cat "$srcdir/alpine.layout" >> config.layout - cd "$srcdir" + cat "$srcdir/alpine.layout" >> httpd-$pkgver/config.layout # create symlinks to soruces for prefork and worker ln -s httpd-$pkgver prefork @@ -59,45 +55,55 @@ prepare() { autoconf || return 1 } +_buildmpm() { + local mpm=$1 + shift + mkdir "$srcdir"/build-${mpm} + cd "$srcdir"/build-${mpm} + "$srcdir"/$mpm/configure --prefix=/usr \ + --enable-layout=Alpine \ + --enable-so \ + --enable-suexec \ + --with-suexec-caller=http \ + --with-suexec-docroot=/var/www/localhost/htdocs \ + --with-suexec-logfile=/var/log/httpd/suexec.log \ + --with-suexec-bin=/usr/sbin/suexec \ + --with-suexec-uidmin=99 \ + --with-suexec-gidmin=99 \ + --with-apr=/usr/bin/apr-1-config \ + --with-apr-util=/usr/bin/apu-1-config \ + --with-pcre=/usr \ + --with-mpm=${mpm} \ + || return 1 + make || return 1 +} + build () { local mpm - for mpm in prefork worker itk; do - mkdir "$srcdir"/build-${mpm} - cd "$srcdir"/build-${mpm} - "$srcdir"/$mpm/configure --prefix=/usr \ - --enable-layout=Alpine \ - --enable-modules=all \ - --enable-mods-shared=all \ - --enable-so \ - --enable-suexec \ - --with-suexec-caller=http \ - --with-suexec-docroot=/var/www/localhost/htdocs \ - --with-suexec-logfile=/var/log/httpd/suexec.log \ - --with-suexec-bin=/usr/sbin/suexec \ - --with-suexec-uidmin=99 \ - --with-suexec-gidmin=99 \ - --enable-ldap \ - --enable-authnz-ldap \ - --enable-cache \ - --enable-disk-cache \ - --enable-mem-cache \ - --enable-file-cache \ - --enable-ssl \ - --with-ssl \ - --enable-deflate \ - --enable-cgid \ - --enable-proxy \ - --enable-proxy-connect \ - --enable-proxy-http \ - --enable-proxy-ftp \ - --enable-dbd \ - --with-apr=/usr/bin/apr-1-config \ - --with-apr-util=/usr/bin/apu-1-config \ - --with-pcre=/usr \ - --with-mpm=${mpm} \ - || return 1 - make || return 1 + # build prefork with everything + _buildmpm prefork \ + --enable-mods-shared=all \ + --enable-ssl --with-ssl --enable-distcache \ + --enable-proxy \ + --enable-cache \ + --enable-disk-cache \ + --enable-mem-cache \ + --enable-file-cache \ + --enable-ldap --enable-authnz-ldap \ + --enable-cgid \ + --enable-authn-anon --enable-authn-alias \ + --disable-imagemap \ + --enable-proxy-connect \ + --enable-proxy-http \ + --enable-proxy-ftp \ + --enable-deflate \ + --enable-dbd \ + || return 1 + + #build the alternative mpms, but without modules + for mpm in worker itk; do + _buildmpm $mpm --enable-modules=none done } @@ -108,7 +114,14 @@ package() { install -m755 "$srcdir"/build-$mpm/httpd \ "$pkgdir/usr/sbin/httpd.${mpm}" || return 1 done + + # config + rm -r "$pkgdir"/etc/apache2/httpd.conf \ + "$pkgdir"/etc/apache2/extra + install -D -m644 "$srcdir"/httpd.conf "$pkgdir"/etc/apache2/httpd.conf + install -d "$pkgdir"/etc/apache2/conf.d + # init scripts and logrotate install -D -m755 "$srcdir/apache2.initd" \ "$pkgdir/etc/init.d/apache2" || return 1 install -D -m644 "$srcdir/apache2.logrotate" \ @@ -119,15 +132,7 @@ package() { install -d "$pkgdir"/var/www ln -fs /var/log/httpd "$pkgdir/var/www/logs" ln -fs /var/run/httpd "$pkgdir/var/www/run" - ln -fs /usr/lib/httpd/modules "$pkgdir/var/www/modules" - sed -e 's#/usr/lib/httpd/modules/#modules/#' \ - -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|'\ - -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \ - -e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \ - -e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \ - -e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \ - -e 's|/srv/http|/var/www/localhost|g' \ - -i "$pkgdir/etc/apache2/httpd.conf" || return 1 + ln -fs /usr/lib/apache2 "$pkgdir/var/www/modules" } utils() { @@ -148,7 +153,8 @@ d33e39350e987721d50e6fb8e164ab6b 07-base-functionality.patch 9f7a8935f9cabc7b46d0052906634cef 08-max-clients-per-vhost.patch 1b28e3363e1b0d05b738a21e7ddd264f 09-capabilities.patch d9667fcd2ffecc63e446edd4d6666731 10-nice.patch -f3e4f5eed88d97d1bbadd0597562bc28 apache2.confd -d91a9a7196b10ef0bc4ab5b98ea9ccd9 apache2.logrotate +e322b5211e49511cac6e40c86af1b1da apache2.confd +75fe4138b98fcffd01b8c8c077b944f3 apache2.logrotate 0261136ff734c3ae8dcf878a46ed5830 apache2.initd +ea8669bd3b913c4d30f16b5a11c82564 httpd.conf af943bf52cec8088974084639661ba34 alpine.layout" |