summaryrefslogtreecommitdiff
path: root/eclass
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
commitee146176ad218e4f1adefe814a0262c6d3aeae47 (patch)
tree435edde0a4a946dfab76143dbfce8536fe4a1427 /eclass
parentDropped ppc-macos keyword, see you in prefix (diff)
downloadgentoo-2-ee146176ad218e4f1adefe814a0262c6d3aeae47.tar.gz
gentoo-2-ee146176ad218e4f1adefe814a0262c6d3aeae47.tar.bz2
gentoo-2-ee146176ad218e4f1adefe814a0262c6d3aeae47.zip
make apache modules configurations newins-able
Diffstat (limited to '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