/[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.9 Revision 1.15
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.9 2005/06/04 18:13:05 vericgar Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/apache-module.eclass,v 1.15 2006/06/10 16:19:54 swegener Exp $
5ECLASS=apache-module
6INHERITED="$INHERITED $ECLASS"
7 5
8inherit depend.apache 6inherit depend.apache
9 7
10# This eclass provides a common set of functions for Apache modules. 8# This eclass provides a common set of functions for Apache modules.
9
10# NOTE: If you use this, be sure you use the need_* call after you have
11# defined DEPEND and RDEPEND. Also note that you can not rely on the
12# automatic RDEPEND=DEPEND that portage does if you use this eclass.
13# See bug 107127 for more information.
11 14
12###### 15######
13## Common ebuild variables 16## Common ebuild variables
14###### 17######
15 18
162## This installs the files into apache's directories. The module is installed 165## This installs the files into apache's directories. The module is installed
163## from a directory chosen as above (APXS2_S or ${S}/src). In addition, 166## from a directory chosen as above (APXS2_S or ${S}/src). In addition,
164## this function can also set the executable permission on files listed in EXECFILES. 167## this function can also set the executable permission on files listed in EXECFILES.
165## The configuration file name is listed in APACHE1_MOD_CONF without the .conf extensions, 168## The configuration file name is listed in APACHE1_MOD_CONF without the .conf extensions,
166## so if you configuration is 55_mod_foo.conf, APACHE1_MOD_CONF would be 55_mod_foo. 169## so if you configuration is 55_mod_foo.conf, APACHE1_MOD_CONF would be 55_mod_foo.
167## DOCFILES contains the list of files you want filed as documentation. The name of the 170## DOCFILES contains the list of files you want filed as documentation. The name of the
168## module can also be specified using the APACHE1_MOD_FILE or defaults to 171## module can also be specified using the APACHE1_MOD_FILE or defaults to
169## .libs/${PN}.so. 172## .libs/${PN}.so.
170#### 173####
171apache1_src_install() { 174apache1_src_install() {
172 debug-print-function apache1_src_install 175 debug-print-function apache1_src_install
173 176
174 CD_DIR=$(apache_cd_dir) 177 CD_DIR=$(apache_cd_dir)
182 185
183 if [ -n "${APACHE1_MOD_CONF}" ] ; then 186 if [ -n "${APACHE1_MOD_CONF}" ] ; then
184 insinto ${APACHE1_MODULES_CONFDIR} 187 insinto ${APACHE1_MODULES_CONFDIR}
185 doins ${FILESDIR}/${APACHE1_MOD_CONF}.conf || die "internal ebuild error: '${FILESDIR}/${APACHE1_MOD_CONF}.conf' not found." 188 doins ${FILESDIR}/${APACHE1_MOD_CONF}.conf || die "internal ebuild error: '${FILESDIR}/${APACHE1_MOD_CONF}.conf' not found."
186 fi 189 fi
187 190
188 cd ${S} 191 cd ${S}
189 192
190 if [ -n "${DOCFILES}" ] ; then 193 if [ -n "${DOCFILES}" ] ; then
191 OTHER_DOCS=$(apache_doc_magic) 194 OTHER_DOCS=$(apache_doc_magic)
192 HTML_DOCS=$(apache_doc_magic html) 195 HTML_DOCS=$(apache_doc_magic html)
251 fi 254 fi
252 255
253 fi 256 fi
254 257
255} 258}
256 259
257#### 260####
258## apache2_src_compile 261## apache2_src_compile
259## 262##
260## The default action is to call ${APXS2} with the value of 263## The default action is to call ${APXS2} with the value of
261## ${APXS2_ARGS}. If a module requires a different build setup 264## ${APXS2_ARGS}. If a module requires a different build setup
296 insinto ${APACHE2_MODULES_CONFDIR} 299 insinto ${APACHE2_MODULES_CONFDIR}
297 doins ${FILESDIR}/${APACHE2_MOD_CONF}.conf || die "internal ebuild error: '${FILESDIR}/${APACHE2_MOD_CONF}.conf' not found." 300 doins ${FILESDIR}/${APACHE2_MOD_CONF}.conf || die "internal ebuild error: '${FILESDIR}/${APACHE2_MOD_CONF}.conf' not found."
298 fi 301 fi
299 302
300 if [ -n "${APACHE2_VHOSTFILE}" ]; then 303 if [ -n "${APACHE2_VHOSTFILE}" ]; then
301 insinto ${APACHE2_MODULES_VHOSTDIR} 304 insinto ${APACHE2_VHOSTDIR}
302 doins ${FILESDIR}/${APACHE2_VHOSTFILE}.conf 305 doins ${FILESDIR}/${APACHE2_VHOSTFILE}.conf
303 fi 306 fi
304 307
305 cd ${S} 308 cd ${S}
306 309
337 if ! hasq ${INSTALLED_MPM} ${APACHE2_SAFE_MPMS} ; then 340 if ! hasq ${INSTALLED_MPM} ${APACHE2_SAFE_MPMS} ; then
338 INSTALLED_MPM_UNSAFE="${INSTALLED_MPM_UNSAFE} ${mpm}" 341 INSTALLED_MPM_UNSAFE="${INSTALLED_MPM_UNSAFE} ${mpm}"
339 else 342 else
340 INSTALLED_MPM_SAFE="${INSTALLED_MPM_SAFE} ${mpm}" 343 INSTALLED_MPM_SAFE="${INSTALLED_MPM_SAFE} ${mpm}"
341 fi 344 fi
342 345
343 if [ -n "${INSTALLED_MPM_UNSAFE}" ] ; then 346 if [ -n "${INSTALLED_MPM_UNSAFE}" ] ; then
344 ewarn "You have one or more MPMs installed that will not work with" 347 ewarn "You have one or more MPMs installed that will not work with"
345 ewarn "this module (${PN}). Please make sure that you only enable" 348 ewarn "this module (${PN}). Please make sure that you only enable"
346 ewarn "this module if you are using one of the following MPMs:" 349 ewarn "this module if you are using one of the following MPMs:"
347 ewarn " ${INSTALLED_MPM_SAFE}" 350 ewarn " ${INSTALLED_MPM_SAFE}"
348 fi 351 fi
349 352
350 fi 353 fi
351 354
352
353} 355}
354 356
355###### 357######
356## Apache dual (1.x or 2.x) ebuild functions 358## Apache dual (1.x or 2.x) ebuild functions
357## 359##

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20