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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Aug 9 17:59:50 2005 UTC (8 years, 11 months ago) by mkennedy
Branch: MAIN
Initial import.

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

  ViewVC Help
Powered by ViewVC 1.1.20