/[gentoo-x86]/eclass/webapp.eclass
Gentoo

Diff of /eclass/webapp.eclass

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

Revision 1.11 Revision 1.13
1# Copyright 1999-2004 Gentoo Technologies, Inc. 1# Copyright 1999-2004 Gentoo Technologies, Inc.
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/webapp.eclass,v 1.11 2004/04/29 10:18:14 stuart Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.13 2004/04/30 08:25:38 stuart Exp $
4# 4#
5# eclass/webapp.eclass 5# eclass/webapp.eclass
6# Eclass for installing applications to run under a web server 6# Eclass for installing applications to run under a web server
7# 7#
8# Part of the implementation of GLEP #11 8# Part of the implementation of GLEP #11
18 18
19ECLASS=webapp 19ECLASS=webapp
20INHERITED="$INHERITED $ECLASS" 20INHERITED="$INHERITED $ECLASS"
21SLOT="${PVR}" 21SLOT="${PVR}"
22IUSE="$IUSE vhosts" 22IUSE="$IUSE vhosts"
23DEPEND="$DEPEND >=net-www/webapp-config-1.5" 23DEPEND="$DEPEND >=net-www/webapp-config-1.6"
24 24
25EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install 25EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install
26 26
27# ------------------------------------------------------------------------ 27# ------------------------------------------------------------------------
28# INTERNAL FUNCTION - USED BY THIS ECLASS ONLY 28# INTERNAL FUNCTION - USED BY THIS ECLASS ONLY
263 dodir ${MY_SQLSCRIPTSDIR} 263 dodir ${MY_SQLSCRIPTSDIR}
264} 264}
265 265
266function webapp_pkg_postinst () 266function webapp_pkg_postinst ()
267{ 267{
268 einfo "webapp_pkg_postinst() called"
269
268 # if 'vhosts' is not set in your USE flags, we install a copy of 270 # if 'vhosts' is not set in your USE flags, we install a copy of
269 # this application in /var/www/localhost/htdocs/${PN}/ for you 271 # this application in /var/www/localhost/htdocs/${PN}/ for you
270 272
271 273
272 if ! use vhosts ; then 274 if ! use vhosts ; then
274 276
275 G_HOSTNAME="localhost" 277 G_HOSTNAME="localhost"
276 . /etc/vhosts/webapp-config 278 . /etc/vhosts/webapp-config
277 279
278 local my_mode=-I 280 local my_mode=-I
279 local my_dir="${VHOST_ROOT}/htdocs/${PN}" 281 local my_dir="/${PN}"
280 282
281 # are we installing afresh - or are we upgrading? 283 # are we installing afresh - or are we upgrading?
282 # find out by looking to see what (if anything) is installed 284 # find out by looking to see what (if anything) is installed
283 # in there already 285 # in there already
284 286
324 fi 326 fi
325 else 327 else
326 einfo "${PN}-${PVR} is not installed - using install mode" 328 einfo "${PN}-${PVR} is not installed - using install mode"
327 fi 329 fi
328 330
329 my_cmd="/usr/sbin/webapp-config $my_mode -u root -d $my_dir ${PN} ${PVR}" 331 my_cmd="/usr/sbin/webapp-config $my_mode -h localhost -u root -d $my_dir ${PN} ${PVR}"
330 einfo "Running $my_cmd" 332 einfo "Running $my_cmd"
331 $my_cmd 333 $my_cmd
332 fi 334 fi
333 335
334 return 0 336 return 0

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20