# Template file for 'apache' pkgname=apache version=2.4.20 revision=2 wrksrc=httpd-${version} build_style=gnu-configure configure_args="--prefix= --sbindir=/usr/bin --enable-pie --enable-modules=all --enable-mods-shared=all --enable-authn-dbm --enable-authn-anon --enable-authn-dbd --enable-authn-alias --enable-authz-dbm --enable-http2 --enable-authz-owner --enable-authnz-ldap --enable-auth-digest -enable-isapi --enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache --enable-dbd --enable-bucketeer --enable-dumpio --enable-echo --enable-reqtimeout --enable-ext-filter --enable-substitute --enable-deflate --enable-charset-lite --enable-ldap --enable-log-forensic --enable-logio --enable-mime-magic --enable-cern-meta --enable-expires --enable-headers --enable-ident --enable-usertrack --enable-unique-id --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-proxy-scgi --enable-proxy-ajp --enable-proxy-balancer --enable-ssl --enable-http --enable-speling --enable-dav --enable-info --enable-cgi --enable-cgid --enable-dav-fs --enable-dav-lock --enable-vhost-alias --enable-imagemap --enable-so --enable-rewrite --with-pcre=/usr --enable-layout=XBPS --sysconfdir=/etc/${pkgname} --enable-mpms-shared=all" hostmakedepends="pkg-config perl" makedepends="zlib-devel libuuid-devel pcre-devel nghttp2-devel libressl-devel db-devel gdbm-devel expat-devel libldap-devel apr-util-devel" conf_files=" /etc/${pkgname}/extra/*.conf /etc/${pkgname}/httpd.conf /etc/${pkgname}/magic /etc/${pkgname}/mime.types" short_desc="The Number One HTTP Server On The Internet" maintainer="Juan RP " homepage="http://httpd.apache.org/" license="Apache-2.0" distfiles="http://www.apache.org/dist/httpd/httpd-${version}.tar.bz2" checksum=0e76a375ed3dbac636f50ac39de966ece443751fe4d62392f9a360a19d94d0da system_accounts="_$pkgname" _apache_homedir="/srv/www/$pkgname" pre_configure() { # set default user sed -e 's#User daemon#User _apache#' \ -e 's#Group daemon#Group _apache#' \ -i docs/conf/httpd.conf.in cat ${FILESDIR}/xbps.layout >> config.layout } post_install() { # Set a working ServerRoot # # Load modules: # * mod_include.so # * mod_slotmem_shm.so # * mod_negotiation.so # * mod_userdir.so # # Avoid loading modules: # * mod_unique_id.so # # Set and enable ServerName to 127.0.0.1. # # include extras: # * httpd-multilang-errordoc.conf # * httpd-autoindex.conf # * httpd-languages.conf # * httpd-userdir.conf # * httpd-default.conf # sed \ -e 's|ServerRoot ""|ServerRoot "/srv/www/apache"|' \ -e 's|#\(LoadModule include_module /usr/libexec/httpd/mod_include.so\)|\1|' \ -e 's|\(LoadModule unique_id_module /usr/libexec/httpd/mod_unique_id.so\)|#\1|' \ -e 's|#\(LoadModule slotmem_shm_module /usr/libexec/httpd/mod_slotmem_shm.so\)|\1|' \ -e 's|#\(LoadModule negotiation_module /usr/libexec/httpd/mod_negotiation.so\)|\1|' \ -e 's|#\(LoadModule userdir_module /usr/libexec/httpd/mod_userdir.so\)|\1|' \ -e 's|#ServerName www.example.com:80|ServerName 127.0.0.1:80|' \ -e 's|#\(Include /etc/apache/extra/httpd-multilang-errordoc.conf\)|\1|' \ -e 's|#\(Include /etc/apache/extra/httpd-autoindex.conf\)|\1|' \ -e 's|#\(Include /etc/apache/extra/httpd-languages.conf\)|\1|' \ -e 's|#\(Include /etc/apache/extra/httpd-userdir.conf\)|\1|' \ -e 's|#\(Include /etc/apache/extra/httpd-default.conf\)|\1|' \ -i "${DESTDIR}/etc/apache/httpd.conf" # Remove unused stuff. vmkdir usr/share/apache/webroot mv ${DESTDIR}/srv/www/$pkgname/cgi-bin ${DESTDIR}/usr/share/apache/webroot rm -rf ${DESTDIR}/srv rm -rf ${DESTDIR}/etc/$pkgname/original vinstall ${FILESDIR}/apache.logrotate 644 etc/logrotate.d apache vsv apache } apache-devel_package() { depends="apr-devel apr-util-devel perl" short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/share/apache/webroot/build vmove usr/bin/apxs vmove "usr/share/man/man1/apxs*" } }