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

Contents of /eclass/virtual.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Feb 6 20:38:10 2002 UTC (12 years, 10 months ago) by danarmak
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
major eclass cleanup/restructuring. no change ni inheriting ebuilds necessary. more details shortly in updated docs
and in coming up gentoo-dev post.

1 # Copyright 1999-2000 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License, v2 or later
3 # Author Dan Armak <danarmak@gentoo.org>
4 # $Header: /home/cvsroot/gentoo-x86/eclass/virtual.eclass,v 1.4 2001/10/01 13:54:38 danarmak Exp $
5 # All other eclasses, and thus ebuilds, inherit from this. It defines the EXPORT_FUNCTIONS
6 # string, which (should) be eval'd by all other eclasses.
7 inherit debug || die
8
9 # Used by the EXPORT_FUNCTIONS code, and placed at the beginning of the eclass
10 # for elegancy's sake.
11 # Someday the code that processes an ebuild's name and extracts $PN from it
12 # can be adapted to automatically calculate $ECLASS from the filename.
13 # Note that this must come after any inherit lines.
14 ECLASS=virtual
15
16 DESCRIPTION="Based on the $ECLASS eclass."
17
18 virtual_src_unpack() {
19 debug-print-function virtual_src_unpack $*
20 }
21 virtual_src_compile() {
22 debug-print-function virtual_src_compile $*
23 }
24 virtual_src_install() {
25 debug-print-function virtual_src_install $*
26 }
27 virtual_pkg_preinst() {
28 debug-print-function virtual_pkg_preinst $*
29 }
30 virtual_pkg_postinst() {
31 debug-print-function virtual_pkg_postinst $*
32 }
33 virtual_pkg_prerm() {
34 debug-print-function virtual_pkg_prerm $*
35 }
36 virtual_pkg_postrm() {
37 debug-print-function virtual_pkg_postrm $*
38 }
39
40 # EXPORT_FUNCTIONS trick
41 # This is the global part, defined here only.
42
43 EXPORT_FUNCTIONS() {
44
45 while [ "$1" ]; do
46 debug-print "EXPORT_FUNCTIONS: ${1} -> ${ECLASS}_${1}"
47 eval "$1() { ${ECLASS}_$1 ; }" > /dev/null
48 shift
49 done
50
51 }
52
53
54 # This part should be repeated for every eclass inheriting from here.
55 EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_prerm pkg_postrm

  ViewVC Help
Powered by ViewVC 1.1.20