diff options
Diffstat (limited to 'abs/core-testing/apache')
-rw-r--r-- | abs/core-testing/apache/PKGBUILD | 81 | ||||
-rw-r--r-- | abs/core-testing/apache/arch.layout | 22 | ||||
-rwxr-xr-x | abs/core-testing/apache/httpd | 40 | ||||
-rw-r--r-- | abs/core-testing/apache/httpd.install | 16 | ||||
-rw-r--r-- | abs/core-testing/apache/httpd.logrotate | 5 |
5 files changed, 164 insertions, 0 deletions
diff --git a/abs/core-testing/apache/PKGBUILD b/abs/core-testing/apache/PKGBUILD new file mode 100644 index 0000000..0bd3936 --- /dev/null +++ b/abs/core-testing/apache/PKGBUILD @@ -0,0 +1,81 @@ +# $Id: PKGBUILD 4776 2008-07-09 21:51:30Z pierre $ +# Maintainer: Pierre Schmitz <pierre@archlinux.de> + +pkgname=apache +pkgver=2.2.9 +pkgrel=4 +pkgdesc="A high performance Unix-based HTTP server" +arch=('i686' 'x86_64') +options=('!libtool') +url='http://www.apache.org/dist/httpd' +license=('APACHE') +backup=(etc/httpd/conf/httpd.conf + etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf + etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf + etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf) +depends=('openssl>=0.9.8b' 'zlib' 'apr-util>=1.3.2-2' 'db>=4.7' 'pcre') +install='httpd.install' +source=("http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2" + 'httpd.logrotate' 'httpd' 'arch.layout') +md5sums=('3afa8137dc1999be695a20b62fdf032b' + 'f4d627c64024c1b7b95efb5ffbaa625e' + 'fb6baeced65b7cf5b80083f278adebba' + '3d659d41276ba3bfcb20c231eb254e0c') + +build() { + cd ${srcdir}/httpd-${pkgver} + + # set default user + sed -e 's#User daemon#User http#' \ + -e 's#Group daemon#Group http#' \ + -i docs/conf/httpd.conf.in || return 1 + + cat ${srcdir}/arch.layout >> config.layout + ./configure --enable-layout=Arch \ + --enable-modules=all \ + --enable-mods-shared=all \ + --enable-so \ + --enable-suexec \ + --with-suexec-caller=http \ + --with-suexec-docroot=/srv/http \ + --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 || return 1 + + make || return 1 + + make DESTDIR=${pkgdir} install || return 1 + install -D -m755 ${srcdir}/httpd ${pkgdir}/etc/rc.d/httpd + install -D -m644 ${srcdir}/httpd.logrotate ${pkgdir}/etc/logrotate.d/httpd + + # symlinks for /etc/httpd + ln -fs /var/log/httpd ${pkgdir}/etc/httpd/logs + ln -fs /var/run/httpd ${pkgdir}/etc/httpd/run + ln -fs /usr/lib/httpd/modules ${pkgdir}/etc/httpd/modules + ln -fs /usr/lib/httpd/build ${pkgdir}/etc/httpd/build + + # set sane defaults + 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|' \ + -i ${pkgdir}/etc/httpd/conf/httpd.conf || return 1 + + # cleanup + rm -rf ${pkgdir}/usr/share/httpd/manual + rm -rf ${pkgdir}/etc/httpd/conf/original + rm -rf ${pkgdir}/srv/http/* + rmdir ${pkgdir}/usr/bin +} diff --git a/abs/core-testing/apache/arch.layout b/abs/core-testing/apache/arch.layout new file mode 100644 index 0000000..ab59db8 --- /dev/null +++ b/abs/core-testing/apache/arch.layout @@ -0,0 +1,22 @@ +<Layout Arch> + prefix: /etc/httpd + exec_prefix: /usr + bindir: /usr/bin + sbindir: /usr/sbin + libdir: /usr/lib/httpd + libexecdir: /usr/lib/httpd/modules + mandir: /usr/share/man + sysconfdir: /etc/httpd/conf + datadir: /usr/share/httpd + installbuilddir: /usr/lib/httpd/build + errordir: /usr/share/httpd/error + iconsdir: /usr/share/httpd/icons + htdocsdir: /srv/http + manualdir: /usr/share/httpd/manual + cgidir: /srv/http/cgi-bin + includedir: /usr/include/httpd + localstatedir: /var + runtimedir: /var/run/httpd + logfiledir: /var/log/httpd + proxycachedir: /var/cache/httpd +</Layout>
\ No newline at end of file diff --git a/abs/core-testing/apache/httpd b/abs/core-testing/apache/httpd new file mode 100755 index 0000000..da4de25 --- /dev/null +++ b/abs/core-testing/apache/httpd @@ -0,0 +1,40 @@ +#!/bin/bash + +# general config +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting HTTP Daemon" + /usr/sbin/apachectl start &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon httpd + stat_done + fi + ;; + stop) + stat_busy "Stopping HTTP Daemon" + /usr/sbin/apachectl stop &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon httpd + stat_done + fi + ;; + restart) + $0 stop + sleep 3 + $0 start + ;; + reload) + if [ -f /var/run/httpd/httpd.pid ]; then + status "Reloading HTTP Configuration" kill -HUP `cat /var/run/httpd/httpd.pid` + fi + ;; + *) + echo "usage: $0 {start|stop|restart|reload}" +esac diff --git a/abs/core-testing/apache/httpd.install b/abs/core-testing/apache/httpd.install new file mode 100644 index 0000000..f72141a --- /dev/null +++ b/abs/core-testing/apache/httpd.install @@ -0,0 +1,16 @@ +post_upgrade() { + if [ $(vercmp '2.2.8' $2) -ge 0 ]; then + echo ' + ==> New default DocumentRoot + + Apache httpd uses /srv/http as default DocumentRoot. + You can still use your current DocumentRoot + + ==> New default user and group + + Instead of "nobody" apache runs as user/group "http" by default now. You might + want to adjust your httpd.conf according to this change. But you can still + run httpd as nobody. + ' + fi +}
\ No newline at end of file diff --git a/abs/core-testing/apache/httpd.logrotate b/abs/core-testing/apache/httpd.logrotate new file mode 100644 index 0000000..3f9298c --- /dev/null +++ b/abs/core-testing/apache/httpd.logrotate @@ -0,0 +1,5 @@ +/var/log/httpd/*log { + postrotate + /bin/kill -HUP `cat /var/run/httpd/httpd.pid 2>/dev/null` 2> /dev/null || true + endscript +} |