/[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.1 Revision 1.2
1# Copyright 2004 Gentoo Foundation 1# Copyright 2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License, v2 or later 2# Distributed under the terms of the GNU General Public License, v2 or later
3# Author Michael Tindal <urilith@gentoo.org> 3# Author Michael Tindal <urilith@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.1 2004/11/21 01:51:58 urilith Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.2 2005/01/09 10:10:24 vericgar Exp $
5ECLASS=apache-module 5ECLASS=apache-module
6INHERITED="$INHERITED $ECLASS" 6INHERITED="$INHERITED $ECLASS"
7 7
8inherit depend.apache 8inherit depend.apache
9 9
145## apache1_src_compile 145## apache1_src_compile
146## The default action is to call ${APXS11} with the value of 146## The default action is to call ${APXS11} with the value of
147## ${APXS1_ARGS}. If a module requires a different build setup 147## ${APXS1_ARGS}. If a module requires a different build setup
148## than this, use ${APXS1} in your own src_compile routine. 148## than this, use ${APXS1} in your own src_compile routine.
149#### 149####
150apache1_src_compile () { 150apache1_src_compile() {
151 debug-print-function apache1_src_compile 151 debug-print-function apache1_src_compile
152 152
153 CD_DIR=$(apache_cd_dir) 153 CD_DIR=$(apache_cd_dir)
154 cd ${CD_DIR} || die "cd ${CD_DIR} failed" 154 cd ${CD_DIR} || die "cd ${CD_DIR} failed"
155 APXS1_ARGS="${APXS1_ARGS:--c ${PN}.c}" 155 APXS1_ARGS="${APXS1_ARGS:--c ${PN}.c}"
181 [ -n "${APACHE1_EXECFILES}" ] && doexe ${APACHE1_EXECFILES} 181 [ -n "${APACHE1_EXECFILES}" ] && doexe ${APACHE1_EXECFILES}
182 182
183 if [ -n "${APACHE1_MOD_CONF}" ] ; then 183 if [ -n "${APACHE1_MOD_CONF}" ] ; then
184 insinto ${APACHE1_MODULES_CONFDIR} 184 insinto ${APACHE1_MODULES_CONFDIR}
185 doins ${FILESDIR}/${APACHE1_MOD_CONF}.conf || die "internal ebuild error: \'${APACHE2_MOD_CONF}.conf\' not found." 185 doins ${FILESDIR}/${APACHE1_MOD_CONF}.conf || die "internal ebuild error: \'${APACHE2_MOD_CONF}.conf\' not found."
186
187 einfo
188 einfo "Configuration file installed as ${APACHE1_MODULES_CONFDIR}/${APACHE1_MOD_CONF}.conf"
189 einfo "You may want to edit it before turning the module on in /etc/conf.d/apache"
190 einfo
191 fi 186 fi
192 187
193 cd ${S} 188 cd ${S}
194 189
195 if [ -n "${DOCFILES}" ] ; then 190 if [ -n "${DOCFILES}" ] ; then
213 einfo 208 einfo
214 einfo "To enable ${PN}, you need to edit your /etc/conf.d/apache file and" 209 einfo "To enable ${PN}, you need to edit your /etc/conf.d/apache file and"
215 einfo "add '-D ${APACHE1_MOD_DEFINE}' to APACHE_OPTS." 210 einfo "add '-D ${APACHE1_MOD_DEFINE}' to APACHE_OPTS."
216 einfo 211 einfo
217 fi 212 fi
213 if [ -n "${APACHE1_MOD_CONF}" ] ; then
214 einfo
215 einfo "Configuration file installed as ${APACHE1_MODULES_CONFDIR}/${APACHE1_MOD_CONF}.conf"
216 einfo "You may want to edit it before turning the module on in /etc/conf.d/apache"
217 einfo
218 fi
218} 219}
219 220
220###### 221######
221## Apache 2.x ebuild functions 222## Apache 2.x ebuild functions
222###### 223######
226## 227##
227## Checks to see if APACHE2_MT_UNSAFE is set to anything other than "no". If it is, then 228## Checks to see if APACHE2_MT_UNSAFE is set to anything other than "no". If it is, then
228## we check what the MPM style used by Apache is, if it isnt prefork, we let the user 229## we check what the MPM style used by Apache is, if it isnt prefork, we let the user
229## know they need prefork, and then exit the build. 230## know they need prefork, and then exit the build.
230#### 231####
231apache2_pkg_setup () { 232apache2_pkg_setup() {
232 debug-print-function apache2_pkg_setup 233 debug-print-function apache2_pkg_setup
233 234
234 if [ -n "${APACHE2_MT_UNSAFEE}" ]; then 235 if [ -n "${APACHE2_MT_UNSAFEE}" ]; then
235 if [ "x${APACHE2_MT_UNSAFE}" != "no" ]; then 236 if [ "x${APACHE2_MT_UNSAFE}" != "no" ]; then
236 APACHE2_MPM_STYLE=`/usr/sbin/apxs2 -q MPM_NAME` 237 APACHE2_MPM_STYLE=`/usr/sbin/apxs2 -q MPM_NAME`
256## 257##
257## The default action is to call ${APXS2} with the value of 258## The default action is to call ${APXS2} with the value of
258## ${APXS2_ARGS}. If a module requires a different build setup 259## ${APXS2_ARGS}. If a module requires a different build setup
259## than this, use ${APXS2} in your own src_compile routine. 260## than this, use ${APXS2} in your own src_compile routine.
260#### 261####
261apache2_src_compile () { 262apache2_src_compile() {
262 debug-print-function apache2_src_compile 263 debug-print-function apache2_src_compile
263 264
264 CD_DIR=$(apache_cd_dir) 265 CD_DIR=$(apache_cd_dir)
265 cd ${CD_DIR} || die "cd ${CD_DIR} failed" 266 cd ${CD_DIR} || die "cd ${CD_DIR} failed"
266 APXS2_ARGS="${APXS2_ARGS:--c ${PN}.c}" 267 APXS2_ARGS="${APXS2_ARGS:--c ${PN}.c}"
290 [ -n "${APACHE2_EXECFILES}" ] && doexe ${APACHE2_EXECFILES} 291 [ -n "${APACHE2_EXECFILES}" ] && doexe ${APACHE2_EXECFILES}
291 292
292 if [ -n "${APACHE2_MOD_CONF}" ] ; then 293 if [ -n "${APACHE2_MOD_CONF}" ] ; then
293 insinto ${APACHE2_MODULES_CONFDIR} 294 insinto ${APACHE2_MODULES_CONFDIR}
294 doins ${FILESDIR}/${APACHE2_MOD_CONF}.conf || die "internal ebuild error: \'${APACHE2_MOD_CONF}.conf\' not found." 295 doins ${FILESDIR}/${APACHE2_MOD_CONF}.conf || die "internal ebuild error: \'${APACHE2_MOD_CONF}.conf\' not found."
295
296 einfo
297 einfo "Configuration file installed as ${APACHE2_MODULES_CONFDIR}/${APACHE2_MOD_CONF}.conf"
298 einfo "You may want to edit it before turning the module on in /etc/conf.d/apache2"
299 einfo
300 fi 296 fi
301 297
302 if [ -n "${APACHE2_VHOSTFILE}" ]; then 298 if [ -n "${APACHE2_VHOSTFILE}" ]; then
303 insinto ${APACHE2_MODULES_VHOSTDIR} 299 insinto ${APACHE2_MODULES_VHOSTDIR}
304 doins ${FILESDIR}/${APACHE2_VHOSTFILE}.conf 300 doins ${FILESDIR}/${APACHE2_VHOSTFILE}.conf
320 316
321 if [ -n "${APACHE2_MOD_DEFINE}" ]; then 317 if [ -n "${APACHE2_MOD_DEFINE}" ]; then
322 einfo 318 einfo
323 einfo "To enable ${PN}, you need to edit your /etc/conf.d/apache2 file and" 319 einfo "To enable ${PN}, you need to edit your /etc/conf.d/apache2 file and"
324 einfo "add '-D ${APACHE2_MOD_DEFINE}' to APACHE2_OPTS." 320 einfo "add '-D ${APACHE2_MOD_DEFINE}' to APACHE2_OPTS."
321 einfo
322 fi
323 if [ -n "${APACHE2_MOD_CONF}" ] ; then
324 einfo
325 einfo "Configuration file installed as ${APACHE2_MODULES_CONFDIR}/${APACHE2_MOD_CONF}.conf"
326 einfo "You may want to edit it before turning the module on in /etc/conf.d/apache2"
325 einfo 327 einfo
326 fi 328 fi
327} 329}
328 330
329###### 331######

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20