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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Aug 9 18:09:33 2005 UTC (9 years ago) by mkennedy
Branch: MAIN
Changes since 1.2: +2 -2 lines
*** empty log message ***

1 mkennedy 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mkennedy 1.3 # $Header: /var/cvsroot/gentoo-x86/eclass/scsh.eclass,v 1.2 2005/08/09 18:07:53 mkennedy Exp $
4 mkennedy 1.1 #
5    
6     inherit eutils
7    
8     ECLASS=scsh
9     INHERITED="$INHERITED $ECLASS"
10    
11 mkennedy 1.3 LICENSE="|| ( as-is BSD )"
12 mkennedy 1.1 SLOT="0"
13     KEYWORDS="~x86"
14    
15 mkennedy 1.2 IUSE="scsh"
16 mkennedy 1.1
17     SCSH_SCSH_PATH=/usr/$(get_libdir)/scsh
18    
19     set_layout() {
20 mkennedy 1.2 if use scsh; then
21 mkennedy 1.1 SCSH_LAYOUT=scsh
22     else
23 mkennedy 1.2 ewarn "No layout was specified via USE, defaulting to FHS."
24 mkennedy 1.1 SCSH_LAYOUT=fhs
25     fi
26     export SCSH_LAYOUT
27     }
28    
29     set_path_variables() {
30     SCSH_VERSION="$(best_version 'app-shells/scsh')"
31     SCSH_MV="${SCSH_VERSION%*.*}"
32     SCSH_MV="${SCSH_MV//app-shells\/scsh-}"
33     export SCSH_VERSION SCSH_MV
34    
35     case $SCSH_LAYOUT in
36     fhs)
37     SCSH_PREFIX=/usr
38     SCSH_MODULES_PATH=/usr/share/scsh-$SCSH_MV/modules
39     ;;
40     scsh)
41     SCSH_PREFIX=/usr/$(get_libdir)/scsh/modules
42     SCSH_MODULES_PATH=/usr/$(get_libdir)/scsh/modules/$SCSH_MV
43     ;;
44     esac
45     export SCSH_PREFIX SCSH_MODULES_PATH
46    
47     SCSH_LIB_DIRS='"'${SCSH_MODULES_PATH}'"'" "'"'${SCSH_SCSH_PATH}'"'" "'"'.'"'
48     export SCSH_LIB_DIRS
49     }
50    
51     scsh_src_unpack() {
52     set_layout
53     set_path_variables
54     einfo "Using $SCSH_LAYOUT layout"
55     unpack ${A}
56     }
57    
58     scsh_get_layout_conf() {
59     SCSH_LAYOUT_CONF=" --build $CHOST
60     --force
61     --layout $SCSH_LAYOUT
62     --prefix $SCSH_PREFIX
63     --no-user-defaults
64     --dest-dir ${D}"
65     export SCSH_LAYOUT_CONF
66     }
67    
68     scsh_src_compile() {
69     get_layout_conf
70     }
71    
72     scsh_src_install() {
73     dodir $SCSH_MODULES_PATH
74     scsh-install-pkg ${SCSH_LAYOUT_CONF} || die "./scsh-install-pkg failed"
75     }
76    
77     EXPORT_FUNCTIONS src_unpack src_compile src_install get_layout_conf

  ViewVC Help
Powered by ViewVC 1.1.20