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

Diff of /eclass/webapp.eclass

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

Revision 1.37 Revision 1.38
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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/webapp.eclass,v 1.37 2005/11/20 12:26:22 stuart Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.38 2006/01/01 01:14:59 swegener 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
192# Identify a file which must be owned by the webserver's user:group 192# Identify a file which must be owned by the webserver's user:group
193# settings. 193# settings.
194# 194#
195# The ownership of the file is NOT set until the application is installed 195# The ownership of the file is NOT set until the application is installed
196# using the webapp-config tool. 196# using the webapp-config tool.
197# 197#
198# @param $1 - file to be owned by the webserver user:group combo 198# @param $1 - file to be owned by the webserver user:group combo
199# 199#
200# ------------------------------------------------------------------------ 200# ------------------------------------------------------------------------
201 201
202function webapp_serverowned () 202function webapp_serverowned ()
203{ 203{
204 webapp_checkfileexists "${1}" "$D" 204 webapp_checkfileexists "${1}" "$D"
205 local MY_FILE="$(webapp_strip_appdir ${1})" 205 local MY_FILE="$(webapp_strip_appdir ${1})"
206 MY_FILE="$(webapp_strip_cwd ${MY_FILE})" 206 MY_FILE="$(webapp_strip_cwd ${MY_FILE})"
207 207
208 einfo "(server owned) ${MY_FILE}" 208 einfo "(server owned) ${MY_FILE}"
209 echo "${MY_FILE}" >> "${D}/${WA_SOLIST}" 209 echo "${MY_FILE}" >> "${D}/${WA_SOLIST}"
210} 210}
211 211
212# ------------------------------------------------------------------------ 212# ------------------------------------------------------------------------
239 239
240 # warning: 240 # warning:
241 # 241 #
242 # do NOT change the naming convention used here without changing all 242 # do NOT change the naming convention used here without changing all
243 # the other scripts that also rely upon these names 243 # the other scripts that also rely upon these names
244 244
245 einfo "(${1}) config file '${my_file}'" 245 einfo "(${1}) config file '${my_file}'"
246 cp "${2}" "${D}/${MY_SERVERCONFIGDIR}/${my_file}" 246 cp "${2}" "${D}/${MY_SERVERCONFIGDIR}/${my_file}"
247} 247}
248 248
249# ------------------------------------------------------------------------ 249# ------------------------------------------------------------------------
273 273
274 # warning: 274 # warning:
275 # 275 #
276 # do NOT change the naming convention used here without changing all 276 # do NOT change the naming convention used here without changing all
277 # the other scripts that also rely upon these names 277 # the other scripts that also rely upon these names
278 278
279 # are we dealing with an 'upgrade'-type script? 279 # are we dealing with an 'upgrade'-type script?
280 if [ -n "${3}" ]; then 280 if [ -n "${3}" ]; then
281 # yes we are 281 # yes we are
282 einfo "(${1}) upgrade script from ${PN}-${PVR} to ${3}" 282 einfo "(${1}) upgrade script from ${PN}-${PVR} to ${3}"
283 cp "${2}" "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql" 283 cp "${2}" "${D}${MY_SQLSCRIPTSDIR}/${1}/${3}_to_${PVR}.sql"
454 die "Ebuild did not call webapp_src_install() - report to http://bugs.gentoo.org" 454 die "Ebuild did not call webapp_src_install() - report to http://bugs.gentoo.org"
455 fi 455 fi
456 456
457 # if 'vhosts' is not set in your USE flags, we install a copy of 457 # if 'vhosts' is not set in your USE flags, we install a copy of
458 # this application in ${ROOT}/var/www/localhost/htdocs/${PN}/ for you 458 # this application in ${ROOT}/var/www/localhost/htdocs/${PN}/ for you
459 459
460 if ! use vhosts ; then 460 if ! use vhosts ; then
461 echo 461 echo
462 einfo "vhosts USE flag not set - auto-installing using webapp-config" 462 einfo "vhosts USE flag not set - auto-installing using webapp-config"
463 463
464 webapp_getinstalltype 464 webapp_getinstalltype
474 einfo "${REMOVE_PKG} is already installed - upgrading" 474 einfo "${REMOVE_PKG} is already installed - upgrading"
475 my_mode=-U 475 my_mode=-U
476 else 476 else
477 einfo "${PN}-${PVR} is not installed - using install mode" 477 einfo "${PN}-${PVR} is not installed - using install mode"
478 fi 478 fi
479 479
480 my_cmd="${WEBAPP_CONFIG} ${my_mode} -h localhost -u root -d ${INSTALL_DIR} ${PN} ${PVR}" 480 my_cmd="${WEBAPP_CONFIG} ${my_mode} -h localhost -u root -d ${INSTALL_DIR} ${PN} ${PVR}"
481 einfo "Running ${my_cmd}" 481 einfo "Running ${my_cmd}"
482 ${my_cmd} 482 ${my_cmd}
483 483
484 # remove the old version 484 # remove the old version

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20