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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Wed Nov 30 09:59:22 2005 UTC (8 years, 9 months ago) by chriswhite
Changes since 1.1: +13 -18 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 chriswhite 1.1.1.1 # $Header: /var/cvsroot/gentoo-x86/eclass/scsh.eclass,v 1.5 2005/08/23 15:03:41 swegener Exp $
4 mkennedy 1.1 #
5    
6     inherit eutils
7    
8 chriswhite 1.1.1.1 LICENSE="as-is BSD"
9 mkennedy 1.1 SLOT="0"
10     KEYWORDS="~x86"
11    
12 chriswhite 1.1.1.1 IUSE="scsh"
13 mkennedy 1.1
14     SCSH_SCSH_PATH=/usr/$(get_libdir)/scsh
15    
16     set_layout() {
17 chriswhite 1.1.1.1 if use scsh; then
18 mkennedy 1.1 SCSH_LAYOUT=scsh
19     else
20 chriswhite 1.1.1.1 ewarn "No layout was specified via USE, defaulting to FHS."
21 mkennedy 1.1 SCSH_LAYOUT=fhs
22     fi
23     export SCSH_LAYOUT
24     }
25    
26     set_path_variables() {
27     SCSH_VERSION="$(best_version 'app-shells/scsh')"
28     SCSH_MV="${SCSH_VERSION%*.*}"
29     SCSH_MV="${SCSH_MV//app-shells\/scsh-}"
30     export SCSH_VERSION SCSH_MV
31    
32 chriswhite 1.1.1.1 case ${SCSH_LAYOUT} in
33 mkennedy 1.1 fhs)
34     SCSH_PREFIX=/usr
35 chriswhite 1.1.1.1 SCSH_MODULES_PATH=/usr/share/scsh-${SCSH_MV}/modules
36 mkennedy 1.1 ;;
37     scsh)
38     SCSH_PREFIX=/usr/$(get_libdir)/scsh/modules
39 chriswhite 1.1.1.1 SCSH_MODULES_PATH=/usr/$(get_libdir)/scsh/modules/${SCSH_MV}
40 mkennedy 1.1 ;;
41     esac
42     export SCSH_PREFIX SCSH_MODULES_PATH
43    
44     SCSH_LIB_DIRS='"'${SCSH_MODULES_PATH}'"'" "'"'${SCSH_SCSH_PATH}'"'" "'"'.'"'
45     export SCSH_LIB_DIRS
46     }
47    
48     scsh_src_unpack() {
49     set_layout
50     set_path_variables
51 chriswhite 1.1.1.1 einfo "Using ${SCSH_LAYOUT} layout"
52 mkennedy 1.1 unpack ${A}
53     }
54    
55     scsh_get_layout_conf() {
56 chriswhite 1.1.1.1 SCSH_LAYOUT_CONF=" --build ${CHOST}
57 mkennedy 1.1 --force
58 chriswhite 1.1.1.1 --layout ${SCSH_LAYOUT}
59     --prefix ${SCSH_PREFIX}
60 mkennedy 1.1 --no-user-defaults
61     --dest-dir ${D}"
62     export SCSH_LAYOUT_CONF
63     }
64    
65     scsh_src_compile() {
66     get_layout_conf
67     }
68    
69     scsh_src_install() {
70 chriswhite 1.1.1.1 dodir ${SCSH_MODULES_PATH}
71 mkennedy 1.1 scsh-install-pkg ${SCSH_LAYOUT_CONF} || die "./scsh-install-pkg failed"
72     }
73    
74     EXPORT_FUNCTIONS src_unpack src_compile src_install get_layout_conf

  ViewVC Help
Powered by ViewVC 1.1.20