-#!/bin/sh
-set -o errexit
-
-# First argument of this script is the package name
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-# Applying patches (if any)
-apply_patches ${1}
-
-groupadd -f ${APACHE_USER}
-hv_useradd -c WebServer -d /dev/null -g ${APACHE_USER} -s /bin/false ${APACHE_USER}
-
-cd ${LFS_TMP}/${1}-build
-../${1}/configure \
- --enable-layout=FHS \
- --enable-mods-shared=all \
- --enable-ssl \
- --with-z
-# --enable-rewrite \
-# --enable-deflate \
-# --enable-dav \
-make
-make install
-
-# There's a problem with the ISAPI DSO module caused from compiling with GCC-4.1.2.
-# Commenting out the module from the configuration:
-if grep "LoadModule isapi_module" /etc/apache/httpd.conf 1> /dev/null 2>&1; then
- sed -i -e "s/^LoadModule isapi_module/# &/" /etc/apache/httpd.conf
-fi
-
-# Modifying the listening port if an alternate one is specified.
-if [ -n "${HTTPD_PORT}" ]; then
- if ! grep "Listen ${HTTPD_PORT}" /etc/apache/httpd.conf 1> /dev/null 2>&1; then
- # Adding alternate port to default port of 80
- sed -i -e "s%\(Listen 80\)%\1\nListen ${HTTPD_PORT}%" /etc/apache/httpd.conf
+#!/bin/bash
+
+hvconfig_pre()
+{
+ groupadd -f ${APACHE_USER}
+ hv_useradd -c WebServer -d /dev/null -g ${APACHE_USER} -s /bin/false \
+ ${APACHE_USER}
+
+ CONFIGURE_OPTS=" \
+ ${CONFIGURE_OPTS} \
+ --enable-layout=FHS \
+ --enable-mods-shared=all \
+ --enable-ssl \
+ --with-z"
+ # --enable-rewrite \
+ # --enable-deflate \
+ # --enable-dav \
+}
+
+hvbuild_post()
+{
+ # There's a problem with the ISAPI DSO module caused from compiling with
+ # GCC-4.1.2.
+ # Commenting out the module from the configuration:
+ if grep -q "LoadModule isapi_module" /etc/apache/httpd.conf; then
+ sed -i -e "s/^LoadModule isapi_module/# &/" /etc/apache/httpd.conf