# Maintainer: Natanael Copa pkgname=apache2 pkgver=2.4.3 pkgrel=2 pkgdesc="A high performance Unix-based HTTP server" url="http://httpd.apache.org/" arch="all" license="APACHE" depends="" pkgusers="apache" pkggroups="apache" makedepends="openssl-dev zlib-dev apr-util-dev apr-dev pcre-dev sed lua-dev autoconf automake" subpackages="$pkgname-dev $pkgname-doc $pkgname-utils $pkgname-ssl $pkgname-ldap $pkgname-webdav $pkgname-proxy-html:proxy_html $pkgname-proxy $pkgname-lua:_lua" source="http://archive.apache.org/dist/httpd/httpd-$pkgver.tar.bz2 apache2.confd apache2.logrotate apache2.initd httpd.conf ssl.conf ldap.conf proxy-html.conf proxy.conf lua.conf alpine.layout " _builddir="$srcdir"/httpd-$pkgver prepare() { cd "$srcdir"/httpd-$pkgver cat "$srcdir/alpine.layout" >> config.layout } build() { cd "$srcdir"/httpd-$pkgver ./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 \ --enable-mods-shared=all \ --enable-mpms-shared=all \ --enable-ssl --with-ssl \ --enable-proxy \ --enable-cache \ --enable-disk-cache \ --enable-mem-cache \ --enable-file-cache \ --enable-ldap --enable-authnz-ldap \ --enable-cgid --enable-cgi \ --enable-authn-anon --enable-authn-alias \ --disable-imagemap \ --enable-proxy-connect \ --enable-proxy-http \ --enable-proxy-ftp \ --enable-deflate \ --enable-dbd \ --enable-exception-hook \ --enable-dav \ --enable-dav-fs \ --enable-dav-lock \ || return 1 make || return 1 } package() { cd "$srcdir"/httpd-$pkgver make -j1 DESTDIR="$pkgdir" install || return 1 # config rm -r "$pkgdir"/etc/apache2/httpd.conf \ "$pkgdir"/etc/apache2/extra install -D -m644 "$srcdir"/httpd.conf "$pkgdir"/etc/apache2/httpd.conf \ || return 1 install -d "$pkgdir"/etc/apache2/conf.d || return 1 # init scripts and logrotate install -D -m755 "$srcdir"/apache2.initd \ "$pkgdir"/etc/init.d/apache2 || return 1 install -D -m644 "$srcdir"/apache2.logrotate \ "$pkgdir"/etc/logrotate.d/apache2 || return 1 install -D -m644 "$srcdir"/apache2.confd \ "$pkgdir"/etc/conf.d/apache2 || return 1 install -d "$pkgdir"/var/www || return 1 ln -fs /var/log/apache2 "$pkgdir"/var/www/logs ln -fs /var/run/apache2 "$pkgdir"/var/www/run ln -fs /usr/lib/apache2 "$pkgdir"/var/www/modules ln -fs /etc/apache2/conf.d "$pkgdir"/var/www/conf.d } # include the builddir and apxs in -dev package dev() { local _mpm local _file default_dev depends="$depends perl apr-util-dev" arch="noarch" # install apxs utility install -d "$subpkgdir"/usr/bin || return 1 mv "$pkgdir"/usr/bin/apxs \ "$subpkgdir"/usr/bin/apxs || return 1 install -d "$subpkgdir"/usr/share/apache2/build mv "$pkgdir"/usr/share/apache2/build/* \ "$subpkgdir"/usr/share/apache2/build/ || return 1 } utils() { local _bin pkgdesc="Apache utility programs for webservers" install -d "$subpkgdir"/usr/sbin || return 1 mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ for i in checkgid htcacheclean rotatelogs; do mv "$pkgdir"/usr/sbin/$i "$subpkgdir"/usr/sbin/ || return 1 done } ssl() { pkgdesc="SSL/TLS module for the Apache HTTP Server" install="apache2-ssl.post-install" depends="apache2 openssl" install -d "$subpkgdir"/usr/lib/apache2 || return 1 mv "$pkgdir"/usr/lib/apache2/mod_ssl.so \ "$subpkgdir"/usr/lib/apache2/mod_ssl.so || return 1 install -D -m644 "$srcdir"/ssl.conf \ "$subpkgdir"/etc/apache2/conf.d/ssl.conf || return 1 install -d "$subpkgdir"/etc/ssl/apache2 || return 1 } ldap() { pkgdesc="LDAP authentication/authorization module for the Apache HTTP Server" url="http://httpd.apache.org/docs/2.4/mod/mod_authnz_ldap.html" depends="apache2" install -d "$subpkgdir"/usr/lib/apache2 || return 1 mv "$pkgdir"/usr/lib/apache2/mod_*ldap.so \ "$subpkgdir"/usr/lib/apache2/ || return 1 install -D -m644 "$srcdir"/ldap.conf \ "$subpkgdir"/etc/apache2/conf.d/ldap.conf || return 1 } webdav() { pkgdesc="WebDAV support for the Apache HTTP Server" depends="apache2" replaces="apache2" install -d "$subpkgdir"/usr/lib/apache2 || return 1 mv "$pkgdir"/usr/lib/apache2/mod_*dav.so \ "$pkgdir"/usr/lib/apache2/mod_dav_*.so \ "$subpkgdir"/usr/lib/apache2/ || return 1 install -D -m644 "$_builddir"/docs/conf/extra/httpd-dav.conf \ "$subpkgdir"/etc/apache2/conf.d/http-dav.conf || return 1 } proxy_html() { pkgdesc="HTML and XML content filters for the Apache HTTP Server" depends="apache2" install -d "$subpkgdir"/usr/lib/apache2 || return 1 mv "$pkgdir"/usr/lib/apache2/*_proxy_html.so \ "$pkgdir"/usr/lib/apache2/*xml2enc*.so \ "$subpkgdir"/usr/lib/apache2/ || return 1 install -D -m644 "$srcdir"/proxy-html.conf \ "$subpkgdir"/etc/apache2/conf.d/proxy-html.conf || return 1 } proxy() { pkgdesc="Proxy modules for the Apache HTTP Server" depends="apache2" install -d "$subpkgdir"/usr/lib/apache2 || return 1 mv "$pkgdir"/usr/lib/apache2/*_proxy*.so \ "$pkgdir"/usr/lib/apache2/*_lbmethod*.so \ "$subpkgdir"/usr/lib/apache2/ || return 1 install -D -m644 "$srcdir"/proxy.conf \ "$subpkgdir"/etc/apache2/conf.d/proxy.conf || return 1 } _lua() { pkgdesc="Lua support for the Apache HTTP server" depends="apache2" install -d "$subpkgdir"/usr/lib/apache2 || return 1 mv "$pkgdir"/usr/lib/apache2/*_lua.so \ "$subpkgdir"/usr/lib/apache2/ || return 1 install -D -m644 "$srcdir"/lua.conf \ "$subpkgdir"/etc/apache2/conf.d/lua.conf || return 1 } md5sums="87aaf7bc7e8715f0455997bb8c6791aa httpd-2.4.3.tar.bz2 e322b5211e49511cac6e40c86af1b1da apache2.confd 75fe4138b98fcffd01b8c8c077b944f3 apache2.logrotate 7105fc70298b24bfca6dba517f7486d7 apache2.initd cceb6f5c3949326b48e0fcf196a2495d httpd.conf 5d0d024ca43571b863874ab871b2c109 ssl.conf b70fe826486043e3953cfe21f9e6fa16 ldap.conf fe26a0a70f572eb256a3c6c183a62223 proxy-html.conf 96eddccfca1ec0349f844e2460cf655b proxy.conf 449a4aea60473ac4a16f025fca4463e3 lua.conf c66ff5f70260d5266e6803a59b39bd7f alpine.layout"