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

Diff of /eclass/webapp.eclass

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

Revision 1.23 Revision 1.29
1# Copyright 1999-2004 Gentoo Technologies, Inc. 1# Copyright 1999-2004 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.23 2004/06/14 23:35:24 stuart Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.29 2004/07/22 14:07:01 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
117# ------------------------------------------------------------------------ 117# ------------------------------------------------------------------------
118 118
119function webapp_configfile () 119function webapp_configfile ()
120{ 120{
121 webapp_checkfileexists "$1" "$D" 121 webapp_checkfileexists "$1" "$D"
122 echo $1 122
123 local MY_FILE="`webapp_strip_appdir \"$1\"`" 123 local MY_FILE="`webapp_strip_appdir \"$1\"`"
124 echo $MY_FILE 124 MY_FILE="`webapp_strip_cwd \"$MY_FILE\"`"
125 125
126 einfo "(config) $MY_FILE" 126 einfo "(config) $MY_FILE"
127 echo "$MY_FILE" >> ${D}${WA_CONFIGLIST} 127 echo "$MY_FILE" >> ${D}${WA_CONFIGLIST}
128} 128}
129 129
200 200
201function webapp_serverowned () 201function webapp_serverowned ()
202{ 202{
203 webapp_checkfileexists "$1" "$D" 203 webapp_checkfileexists "$1" "$D"
204 local MY_FILE="`webapp_strip_appdir \"$1\"`" 204 local MY_FILE="`webapp_strip_appdir \"$1\"`"
205 MY_FILE="`webapp_strip_cwd \"$MY_FILE\"`"
205 206
206 einfo "(server owned) $MY_FILE" 207 einfo "(server owned) $MY_FILE"
207 echo "$MY_FILE" >> "${D}${WA_SOLIST}" 208 echo "$MY_FILE" >> "${D}${WA_SOLIST}"
208} 209}
209 210
219# NOTE: 220# NOTE:
220# this function will automagically prepend $1 to the front of your 221# this function will automagically prepend $1 to the front of your
221# config file's name 222# config file's name
222# ------------------------------------------------------------------------ 223# ------------------------------------------------------------------------
223 224
224function webapp_server_config () 225function webapp_server_configfile ()
225{ 226{
226 webapp_checkfileexists "$2" 227 webapp_checkfileexists "$2"
227 228
228 # sort out what the name will be of the config file 229 # sort out what the name will be of the config file
229 230
428 dodir "${MY_HOSTROOTDIR}" 429 dodir "${MY_HOSTROOTDIR}"
429 dodir "${MY_CGIBINDIR}" 430 dodir "${MY_CGIBINDIR}"
430 dodir "${MY_ICONSDIR}" 431 dodir "${MY_ICONSDIR}"
431 dodir "${MY_ERRORSDIR}" 432 dodir "${MY_ERRORSDIR}"
432 dodir "${MY_SQLSCRIPTSDIR}" 433 dodir "${MY_SQLSCRIPTSDIR}"
434 dodir "${MY_HOOKSCRIPTSDIR}"
435 dodir "${MY_SERVERCONFIGDIR}"
433} 436}
434 437
435function webapp_pkg_postinst () 438function webapp_pkg_postinst ()
436{ 439{
437 . "${ETC_CONFIG}" 440 . "${ETC_CONFIG}"
465 468
466 local my_mode=-I 469 local my_mode=-I
467 470
468 if [ "$IS_REPLACE" = "1" ]; then 471 if [ "$IS_REPLACE" = "1" ]; then
469 einfo "${PN}-${PVR} is already installed - replacing" 472 einfo "${PN}-${PVR} is already installed - replacing"
470 /usr/sbin/webapp-config -C -d "$INSTALL_DIR" 473 my_mode=-I
471 elif [ "$IS_UPGRADE" = "1" ]; then 474 elif [ "$IS_UPGRADE" = "1" ]; then
472 einfo "$REMOVE_PKG is already installed - upgrading" 475 einfo "$REMOVE_PKG is already installed - upgrading"
473 my_mode=-U 476 my_mode=-U
474 else 477 else
475 einfo "${PN}-${PVR} is not installed - using install mode" 478 einfo "${PN}-${PVR} is not installed - using install mode"
491 # the user is relying on portage to do the magical thing for it 494 # the user is relying on portage to do the magical thing for it
492 495
493 if [ "$IS_UPGRADE" = "1" ] ; then 496 if [ "$IS_UPGRADE" = "1" ] ; then
494 einfo "Removing old version $REMOVE_PKG" 497 einfo "Removing old version $REMOVE_PKG"
495 498
496 emerge -C "$CATEGORY/$REMOVE_PKG" 499 emerge -C "$REMOVE_PKG"
497 fi 500 fi
498 else 501 else
499 # vhosts flag is on 502 # vhosts flag is on
500 # 503 #
501 # let's tell the administrator what to do next 504 # let's tell the administrator what to do next

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20