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

Diff of /eclass/webapp.eclass

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

Revision 1.22 Revision 1.23
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.22 2004/06/11 22:06:10 stuart Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.23 2004/06/14 23:35:24 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
51 local my_prefix 51 local my_prefix
52 52
53 [ -n "$2" ] && my_prefix="$2/" || my_prefix= 53 [ -n "$2" ] && my_prefix="$2/" || my_prefix=
54 54
55 if [ ! -e "${my_prefix}$1" ]; then 55 if [ ! -e "${my_prefix}$1" ]; then
56 msg="ebuild fault: file $1 not found" 56 msg="ebuild fault: file '$1' not found"
57 eerror "$msg" 57 eerror "$msg"
58 eerror "Please report this as a bug at http://bugs.gentoo.org/" 58 eerror "Please report this as a bug at http://bugs.gentoo.org/"
59 die "$msg" 59 die "$msg"
60 fi 60 fi
61} 61}
122 echo $1 122 echo $1
123 local MY_FILE="`webapp_strip_appdir \"$1\"`" 123 local MY_FILE="`webapp_strip_appdir \"$1\"`"
124 echo $MY_FILE 124 echo $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
130# ------------------------------------------------------------------------ 130# ------------------------------------------------------------------------
131# EXPORTED FUNCTION - FOR USE IN EBUILDS 131# EXPORTED FUNCTION - FOR USE IN EBUILDS
132# 132#
136# @param $1 - the script to run 136# @param $1 - the script to run
137# ------------------------------------------------------------------------ 137# ------------------------------------------------------------------------
138 138
139function webapp_hook_script () 139function webapp_hook_script ()
140{ 140{
141 webapp_checkfileexists "$2" 141 webapp_checkfileexists "$1"
142 142
143 einfo "(hook) $1" 143 einfo "(hook) $1"
144 cp "$1" "${D}${MY_HOOKSCRIPTSDIR}/`basename $1`" || die "Unable to install $1 into ${D}${MY_HOOKSCRIPTSDIR}/" 144 cp "$1" "${D}${MY_HOOKSCRIPTSDIR}/`basename $1`" || die "Unable to install $1 into ${D}${MY_HOOKSCRIPTSDIR}/"
145 chmod 555 "${D}${MY_HOOKSCRIPTSDIR}/`basename $1`" 145 chmod 555 "${D}${MY_HOOKSCRIPTSDIR}/`basename $1`"
146} 146}
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 205
206 einfo "(server owned) $MY_FILE" 206 einfo "(server owned) $MY_FILE"
207 echo "\"$MY_FILE\"" >> "${D}${WA_SOLIST}" 207 echo "$MY_FILE" >> "${D}${WA_SOLIST}"
208} 208}
209 209
210# ------------------------------------------------------------------------ 210# ------------------------------------------------------------------------
211# EXPORTED FUNCTION - FOR USE IN EBUILDS 211# EXPORTED FUNCTION - FOR USE IN EBUILDS
212# 212#

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

  ViewVC Help
Powered by ViewVC 1.1.20