/[gentoo-x86]/eclass/apache-module.eclass
Gentoo

Diff of /eclass/apache-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.21 Revision 1.22
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.21 2008/01/27 20:09:17 hollow Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.22 2008/02/02 12:31:00 hollow Exp $
4 4
5# @ECLASS: apache-module 5# @ECLASS: apache-module
6# @MAINTAINER: apache-devs@gentoo.org 6# @MAINTAINER: apache-devs@gentoo.org
7# @BLURB: Provides a common set of functions for apache modules 7# @BLURB: Provides a common set of functions for apache modules
8# @DESCRIPTION: 8# @DESCRIPTION:
29# @ECLASS-VARIABLE: APXS2_ARGS 29# @ECLASS-VARIABLE: APXS2_ARGS
30# @DESCRIPTION: 30# @DESCRIPTION:
31# Arguments to pass to the apxs tool 31# Arguments to pass to the apxs tool
32APXS2_ARGS="" 32APXS2_ARGS=""
33 33
34# @ECLASS-VARIABLE: APACHE2_MOD_FILE
35# @DESCRIPTION:
36# Name of the module that src_install installs (minus the .so)
37APACHE2_MOD_FILE=""
38
39# @ECLASS-VARIABLE: APACHE2_MOD_CONF 34# @ECLASS-VARIABLE: APACHE2_MOD_CONF
40# @DESCRIPTION: 35# @DESCRIPTION:
41# Configuration file installed by src_install 36# Configuration file installed by src_install
42APACHE2_MOD_CONF="" 37APACHE2_MOD_CONF=""
43
44# @ECLASS-VARIABLE: APACHE2_VHOSTFILE
45# @DESCRIPTION:
46# Virtual host configuration file installed by src_install
47APACHE2_VHOSTFILE=""
48 38
49# @ECLASS-VARIABLE: APACHE2_MOD_DEFINE 39# @ECLASS-VARIABLE: APACHE2_MOD_DEFINE
50# @DESCRIPTION: 40# @DESCRIPTION:
51# Name of define (eg FOO) to use in conditional loading of the installed 41# Name of define (eg FOO) to use in conditional loading of the installed
52# module/it's config file, multiple defines should be space separated 42# module/it's config file, multiple defines should be space separated
53APACHE2_MOD_DEFINE="" 43APACHE2_MOD_DEFINE=""
44
45# @ECLASS-VARIABLE: APACHE2_MOD_FILE
46# @DESCRIPTION:
47# Name of the module that src_install installs (minus the .so)
48APACHE2_MOD_FILE=""
49
50# @ECLASS-VARIABLE: APACHE2_VHOST_CONF
51# @DESCRIPTION:
52# Virtual host configuration file installed by src_install
53APACHE2_VHOST_CONF=""
54 54
55# @ECLASS-VARIABLE: DOCFILES 55# @ECLASS-VARIABLE: DOCFILES
56# @DESCRIPTION: 56# @DESCRIPTION:
57# If the exported src_install() is being used, and ${DOCFILES} is non-zero, some 57# If the exported src_install() is being used, and ${DOCFILES} is non-zero, some
58# sed-fu is applied to split out html documentation (if any) from normal 58# sed-fu is applied to split out html documentation (if any) from normal
141 fi 141 fi
142} 142}
143 143
144# @FUNCTION: apache-module_src_compile 144# @FUNCTION: apache-module_src_compile
145# @DESCRIPTION: 145# @DESCRIPTION:
146# The default action is to call ${APXS2} with the value of ${APXS2_ARGS}. If a 146# The default action is to call ${APXS} with the value of ${APXS2_ARGS}. If a
147# module requires a different build setup than this, use ${APXS2} in your own 147# module requires a different build setup than this, use ${APXS} in your own
148# src_compile routine. 148# src_compile routine.
149apache-module_src_compile() { 149apache-module_src_compile() {
150 debug-print-function $FUNCNAME $* 150 debug-print-function $FUNCNAME $*
151 151
152 CD_DIR=$(apache_cd_dir) 152 CD_DIR=$(apache_cd_dir)
153 cd "${CD_DIR}" || die "cd ${CD_DIR} failed" 153 cd "${CD_DIR}" || die "cd ${CD_DIR} failed"
154 APXS2_ARGS="${APXS2_ARGS:--c ${PN}.c}" 154 APXS2_ARGS="${APXS2_ARGS:--c ${PN}.c}"
155 ${APXS2} ${APXS2_ARGS} || die "${APXS2} ${APXS2_ARGS} failed" 155 ${APXS} ${APXS2_ARGS} || die "${APXS} ${APXS2_ARGS} failed"
156} 156}
157 157
158# @FUNCTION: apache-module_src_install 158# @FUNCTION: apache-module_src_install
159# @DESCRIPTION: 159# @DESCRIPTION:
160# This installs the files into apache's directories. The module is installed 160# This installs the files into apache's directories. The module is installed
170 CD_DIR=$(apache_cd_dir) 170 CD_DIR=$(apache_cd_dir)
171 cd "${CD_DIR}" || die "cd ${CD_DIR} failed" 171 cd "${CD_DIR}" || die "cd ${CD_DIR} failed"
172 172
173 MOD_FILE=$(apache_mod_file) 173 MOD_FILE=$(apache_mod_file)
174 174
175 exeinto "${APACHE2_MODULESDIR}" 175 exeinto "${APACHE_MODULESDIR}"
176 doexe ${MOD_FILE} || die "internal ebuild error: '${MOD_FILE}' not found" 176 doexe ${MOD_FILE} || die "internal ebuild error: '${MOD_FILE}' not found"
177 [[ -n "${APACHE2_EXECFILES}" ]] && doexe ${APACHE2_EXECFILES} 177 [[ -n "${APACHE2_EXECFILES}" ]] && doexe ${APACHE2_EXECFILES}
178 178
179 if [[ -n "${APACHE2_MOD_CONF}" ]] ; then 179 if [[ -n "${APACHE2_MOD_CONF}" ]] ; then
180 insinto "${APACHE2_MODULES_CONFDIR}" 180 insinto "${APACHE_MODULES_CONFDIR}"
181 set -- ${APACHE2_MOD_CONF} 181 set -- ${APACHE2_MOD_CONF}
182 newins "${FILESDIR}/${1}.conf" "$(basename ${2:-$1}).conf" \ 182 newins "${FILESDIR}/${1}.conf" "$(basename ${2:-$1}).conf" \
183 || die "internal ebuild error: '${FILESDIR}/${1}.conf' not found" 183 || die "internal ebuild error: '${FILESDIR}/${1}.conf' not found"
184 fi 184 fi
185 185
186 if [[ -n "${APACHE2_VHOSTFILE}" ]] ; then 186 if [[ -n "${APACHE2_VHOST_CONF}" ]] ; then
187 insinto "${APACHE2_VHOSTDIR}" 187 insinto "${APACHE_VHOSTS_CONFDIR}"
188 set -- ${APACHE2_VHOSTFILE} 188 set -- ${APACHE2_VHOST_CONF}
189 newins "${FILESDIR}/${1}.conf" "$(basename ${2:-$1}).conf " \ 189 newins "${FILESDIR}/${1}.conf" "$(basename ${2:-$1}).conf " \
190 || die "internal ebuild error: '${FILESDIR}/${1}.conf' not found" 190 || die "internal ebuild error: '${FILESDIR}/${1}.conf' not found"
191 fi 191 fi
192 192
193 cd "${S}" 193 cd "${S}"
218 218
219 if [[ -n "${APACHE2_MOD_CONF}" ]] ; then 219 if [[ -n "${APACHE2_MOD_CONF}" ]] ; then
220 set -- ${APACHE2_MOD_CONF} 220 set -- ${APACHE2_MOD_CONF}
221 einfo 221 einfo
222 einfo "Configuration file installed as" 222 einfo "Configuration file installed as"
223 einfo " ${APACHE2_MODULES_CONFDIR}/$(basename $1).conf" 223 einfo " ${APACHE_MODULES_CONFDIR}/$(basename $1).conf"
224 einfo "You may want to edit it before turning the module on in /etc/conf.d/apache2" 224 einfo "You may want to edit it before turning the module on in /etc/conf.d/apache2"
225 einfo 225 einfo
226 fi 226 fi
227 227
228 if [[ -n "${APACHE2_SAFE_MPMS}" ]] ; then 228 if [[ -n "${APACHE2_SAFE_MPMS}" ]] ; then

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

  ViewVC Help
Powered by ViewVC 1.1.20