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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide annotations) (download)
Tue Nov 27 12:50:40 2012 UTC (21 months, 2 weeks ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -2 lines
Drop default LICENSE assignment.

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

  ViewVC Help
Powered by ViewVC 1.1.20