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

Diff of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.1.1

  ViewVC Help
Powered by ViewVC 1.1.20