summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2008-01-27 20:09:17 +0000
committerBenedikt Boehm <hollow@gentoo.org>2008-01-27 20:09:17 +0000
commitdc87186bb1ceeec71bf709f691be968effd80a00 (patch)
tree1cbd0fa5392e8cab1a4ed6abd17c7dc122078a96 /eclass/apache-module.eclass
parentDropped ppc-macos keyword, see you in prefix (diff)
downloadhistorical-dc87186bb1ceeec71bf709f691be968effd80a00.tar.gz
historical-dc87186bb1ceeec71bf709f691be968effd80a00.tar.bz2
historical-dc87186bb1ceeec71bf709f691be968effd80a00.zip
make apache modules configurations newins-able
Diffstat (limited to 'eclass/apache-module.eclass')
-rw-r--r--eclass/apache-module.eclass18
1 files changed, 14 insertions, 4 deletions
diff --git a/eclass/apache-module.eclass b/eclass/apache-module.eclass
index 529729d2a9a5..4dd2e8f8ed00 100644
--- a/eclass/apache-module.eclass
+++ b/eclass/apache-module.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.20 2007/11/25 14:27:52 hollow Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.21 2008/01/27 20:09:17 hollow Exp $
# @ECLASS: apache-module
# @MAINTAINER: apache-devs@gentoo.org
@@ -41,6 +41,11 @@ APACHE2_MOD_FILE=""
# Configuration file installed by src_install
APACHE2_MOD_CONF=""
+# @ECLASS-VARIABLE: APACHE2_VHOSTFILE
+# @DESCRIPTION:
+# Virtual host configuration file installed by src_install
+APACHE2_VHOSTFILE=""
+
# @ECLASS-VARIABLE: APACHE2_MOD_DEFINE
# @DESCRIPTION:
# Name of define (eg FOO) to use in conditional loading of the installed
@@ -173,12 +178,16 @@ apache-module_src_install() {
if [[ -n "${APACHE2_MOD_CONF}" ]] ; then
insinto "${APACHE2_MODULES_CONFDIR}"
- doins "${FILESDIR}/${APACHE2_MOD_CONF}.conf" || die "internal ebuild error: '${FILESDIR}/${APACHE2_MOD_CONF}.conf' not found"
+ set -- ${APACHE2_MOD_CONF}
+ newins "${FILESDIR}/${1}.conf" "$(basename ${2:-$1}).conf" \
+ || die "internal ebuild error: '${FILESDIR}/${1}.conf' not found"
fi
if [[ -n "${APACHE2_VHOSTFILE}" ]] ; then
insinto "${APACHE2_VHOSTDIR}"
- doins "${FILESDIR}/${APACHE2_VHOSTFILE}.conf" || die "internal ebuild error: '${FILESDIR}/${APACHE2_VHOSTFILE}.conf' not found"
+ set -- ${APACHE2_VHOSTFILE}
+ newins "${FILESDIR}/${1}.conf" "$(basename ${2:-$1}).conf " \
+ || die "internal ebuild error: '${FILESDIR}/${1}.conf' not found"
fi
cd "${S}"
@@ -208,9 +217,10 @@ apache-module_pkg_postinst() {
fi
if [[ -n "${APACHE2_MOD_CONF}" ]] ; then
+ set -- ${APACHE2_MOD_CONF}
einfo
einfo "Configuration file installed as"
- einfo " ${APACHE2_MODULES_CONFDIR}/$(basename ${APACHE2_MOD_CONF}).conf"
+ einfo " ${APACHE2_MODULES_CONFDIR}/$(basename $1).conf"
einfo "You may want to edit it before turning the module on in /etc/conf.d/apache2"
einfo
fi