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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Oct 1 11:04:22 2001 UTC (13 years ago) by danarmak
Branch: MAIN
Changes since 1.4: +5 -1 lines
eclasses v3. read the gentoo-dev announcement, and news.txt and howto.*
in doc/.

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/base.eclass,v 1.4 2001/09/29 12:35:38 danarmak Exp $
5 # The base eclass defines some default functions and variables. Nearly everything
6 # else inherits from here.
7 . /usr/portage/eclass/inherit.eclass || die
8 inherit virtual || die
9 ECLASS=base
10
11 S=${WORKDIR}/${P}
12 DESCRIPTION="Based on the $ECLASS eclass"
13
14 base_src_unpack() {
15
16 echo "in base_src_unpack, 1st parameter is $1"
17 [ -z "$1" ] && base_src_unpack all
18
19 while [ "$1" ]; do
20
21 case $1 in
22 unpack)
23 echo "in base_src_unpack, action unpack"
24 unpack ${A}
25 ;;
26 patch)
27 cd ${S}
28 patch -p0 < ${FILESDIR}/${P}-gentoo.diff
29 ;;
30 all)
31 echo "in base_src_unpack, action all"
32 base_src_unpack unpack
33 ;;
34 esac
35
36 shift
37 done
38
39 }
40
41 base_src_compile() {
42
43 echo "in base_src_compile, 1st parameter is $1"
44 [ -z "$1" ] && base_src_compile all
45
46 while [ "$1" ]; do
47
48 case $1 in
49 configure)
50 echo "in base_src_compile, action configure"
51 ./configure || die
52 ;;
53 make)
54 echo "in base_src_compile, action make"
55 make || die
56 ;;
57 all)
58 echo "in base_src_compile, action all"
59 base_src_compile configure make
60 ;;
61 esac
62
63 shift
64 done
65
66 }
67
68 base_src_install() {
69
70 echo "in base_src_install, 1st parameter is $1"
71 [ -z "$1" ] && base_src_install all
72
73 while [ "$1" ]; do
74
75 case $1 in
76 make)
77 echo "in base_src_install, action make"
78 make DESTDIR=${D} install || die
79 ;;
80 all)
81 echo "in base_src_install, action all"
82 base_src_install make
83 ;;
84 esac
85
86 shift
87 done
88
89 }
90
91 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20