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

Contents of /eclass/base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Sat Sep 29 12:35:38 2001 UTC (12 years, 11 months ago) by danarmak
Branch: MAIN
Changes since 1.3: +19 -3 lines
Eclasses release 2. This time they are supposed to be fully operational.
Bug hunters please!

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

  ViewVC Help
Powered by ViewVC 1.1.20