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

Diff of /eclass/webapp.eclass

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

Revision 1.18 Revision 1.19
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.18 2004/05/17 22:44:35 stuart Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.19 2004/05/22 18:45:13 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
21 21
22ECLASS=webapp 22ECLASS=webapp
23INHERITED="$INHERITED $ECLASS" 23INHERITED="$INHERITED $ECLASS"
24SLOT="${PVR}" 24SLOT="${PVR}"
25IUSE="$IUSE vhosts" 25IUSE="$IUSE vhosts"
26DEPEND="$DEPEND >=net-www/webapp-config-1.9 app-portage/gentoolkit" 26DEPEND="$DEPEND >=net-www/webapp-config-1.7 app-portage/gentoolkit"
27 27
28EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm 28EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm
29 29
30INSTALL_DIR="/$PN" 30INSTALL_DIR="/$PN"
31IS_UPGRADE=0 31IS_UPGRADE=0
32IS_REPLACE=0 32IS_REPLACE=0
33
34INSTALL_CHECK_FILE="installed_by_webapp_eclass"
33 35
34# ------------------------------------------------------------------------ 36# ------------------------------------------------------------------------
35# INTERNAL FUNCTION - USED BY THIS ECLASS ONLY 37# INTERNAL FUNCTION - USED BY THIS ECLASS ONLY
36# 38#
37# Check whether a specified file exists within the image/ directory 39# Check whether a specified file exists within the image/ directory
299 301
300 keepdir ${MY_PERSISTDIR} 302 keepdir ${MY_PERSISTDIR}
301 fowners root:root ${MY_PERSISTDIR} 303 fowners root:root ${MY_PERSISTDIR}
302 fperms 755 ${MY_PERSISTDIR} 304 fperms 755 ${MY_PERSISTDIR}
303 305
304 HAS_webapp_src_install=1 306 # to test whether or not the ebuild has correctly called this function
307 # we add an empty file to the filesystem
308 #
309 # we used to just set a variable in the shell script, but we can
310 # no longer rely on Portage calling both webapp_src_install() and
311 # webapp_pkg_postinst() within the same shell process
312
313 touch ${D}/${MY_APPDIR}/${INSTALL_CHECK_FILE}
305} 314}
306 315
307# ------------------------------------------------------------------------ 316# ------------------------------------------------------------------------
308# EXPORTED FUNCTION - call from inside your ebuild's pkg_config AFTER 317# EXPORTED FUNCTION - call from inside your ebuild's pkg_config AFTER
309# everything else has run 318# everything else has run
429 438
430function webapp_pkg_postinst () 439function webapp_pkg_postinst ()
431{ 440{
432 # sanity checks, to catch bugs in the ebuild 441 # sanity checks, to catch bugs in the ebuild
433 442
434 if [ "$HAS_webapp_src_install+" == "+" ]; then 443 if [ ! -f ${MY_APPDIR}/${INSTALL_CHECK_FILE} ]; then
435 eerror 444 eerror
436 eerror "This ebuild did not call webapp_src_install() at the end" 445 eerror "This ebuild did not call webapp_src_install() at the end"
437 eerror "of the src_install() function" 446 eerror "of the src_install() function"
438 eerror 447 eerror
439 eerror "Please log a bug on http://bugs.gentoo.org" 448 eerror "Please log a bug on http://bugs.gentoo.org"

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20