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

Contents of /eclass/scsh.eclass

Parent Directory Parent Directory | Revision Log Revision Log


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

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

  ViewVC Help
Powered by ViewVC 1.1.20