summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenat Lumpau <rl03@gentoo.org>2006-01-11 15:19:42 +0000
committerRenat Lumpau <rl03@gentoo.org>2006-01-11 15:19:42 +0000
commit119cc1d11f9caa223ee145669afd874680b044be (patch)
tree3312d9da449491a8a25ee276f809104fca2ab62a /eclass/webapp.eclass
parentMasked nptl/nptlonly for 2.4 (diff)
downloadgentoo-2-119cc1d11f9caa223ee145669afd874680b044be.tar.gz
gentoo-2-119cc1d11f9caa223ee145669afd874680b044be.tar.bz2
gentoo-2-119cc1d11f9caa223ee145669afd874680b044be.zip
webapp.eclass: see http://www.vhost-tools.org/ticket/41
Diffstat (limited to 'eclass/webapp.eclass')
-rw-r--r--eclass/webapp.eclass50
1 files changed, 36 insertions, 14 deletions
diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
index 0de266541520..0533be7def48 100644
--- a/eclass/webapp.eclass
+++ b/eclass/webapp.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.38 2006/01/01 01:14:59 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.39 2006/01/11 15:19:42 rl03 Exp $
#
# eclass/webapp.eclass
# Eclass for installing applications to run under a web server
@@ -9,7 +9,7 @@
#
# Author(s) Stuart Herbert <stuart@gentoo.org>
# Renat Lumpau <rl03@gentoo.org>
-# Gunnar Wrobel <php@gunnarwrobel.org>
+# Gunnar Wrobel <wrobel@gentoo.org>
#
# ------------------------------------------------------------------------
#
@@ -125,13 +125,16 @@ function webapp_strip_cwd ()
function webapp_configfile ()
{
- webapp_checkfileexists "${1}" "${D}"
+ local m=""
+ for m in "$@" ; do
+ webapp_checkfileexists "${m}" "${D}"
- local MY_FILE="$(webapp_strip_appdir ${1})"
- MY_FILE="$(webapp_strip_cwd ${MY_FILE})"
+ local MY_FILE="$(webapp_strip_appdir ${m})"
+ MY_FILE="$(webapp_strip_cwd ${MY_FILE})"
- einfo "(config) ${MY_FILE}"
- echo "${MY_FILE}" >> ${D}/${WA_CONFIGLIST}
+ einfo "(config) ${MY_FILE}"
+ echo "${MY_FILE}" >> ${D}/${WA_CONFIGLIST}
+ done
}
# ------------------------------------------------------------------------
@@ -201,12 +204,31 @@ function webapp_postupgrade_txt ()
function webapp_serverowned ()
{
- webapp_checkfileexists "${1}" "$D"
- local MY_FILE="$(webapp_strip_appdir ${1})"
- MY_FILE="$(webapp_strip_cwd ${MY_FILE})"
-
- einfo "(server owned) ${MY_FILE}"
- echo "${MY_FILE}" >> "${D}/${WA_SOLIST}"
+ local a=""
+ local m=""
+ if [ ${1} = "-R" ]; then
+ shift
+ for m in "$@" ; do
+ for a in $(find ${D}/${m}); do
+ a=${a/${D}\/\///}
+ webapp_checkfileexists "${a}" "$D"
+ local MY_FILE="$(webapp_strip_appdir ${a})"
+ MY_FILE="$(webapp_strip_cwd ${MY_FILE})"
+
+ einfo "(server owned) ${MY_FILE}"
+ echo "${MY_FILE}" >> "${D}/${WA_SOLIST}"
+ done
+ done
+ else
+ for m in "$@" ; do
+ webapp_checkfileexists "${m}" "$D"
+ local MY_FILE="$(webapp_strip_appdir ${m})"
+ MY_FILE="$(webapp_strip_cwd ${MY_FILE})"
+
+ einfo "(server owned) ${MY_FILE}"
+ echo "${MY_FILE}" >> "${D}/${WA_SOLIST}"
+ done
+ fi
}
# ------------------------------------------------------------------------