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

Contents of /eclass/gems.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Wed Jul 6 20:20:03 2005 UTC (9 years, 9 months ago) by agriffis
Branch: MAIN
Changes since 1.3: +1 -2 lines
Remove ECLASS= and INHERITED= which haven't been necessary for a long time now

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/gems.eclass,v 1.3 2005/03/31 00:47:05 pythonhead Exp $
4 #
5 # Author: Rob Cakebread <pythonhead@gentoo.org>
6 # Current Maintainer: Rob Cakebread <pythonhead@gentoo.org>
7 #
8 # The gems eclass is designed to allow easier installation of
9 # gems-based ruby packagess and their incorporation into
10 # the Gentoo Linux system.
11 #
12 # - Features:
13 # gems_location() - Set ${GEMSDIR} with gem install dir and ${GEM_SRC} with path to gem to install
14 # gems_src_install() - installs a gem into ${D}
15 # gems_src_unpack() - Does nothing.
16 # gems_src_compile() - Does nothing.
17 #
18 # NOTE:
19 # See http://dev.gentoo.org/~pythonhead/ruby/gems.html for notes on using gems with portage
20
21
22 inherit ruby eutils
23
24 INHERITED="$INHERITED $ECLASS"
25
26 DEPEND=">=dev-ruby/rubygems-0.8.4-r1"
27
28 S=${WORKDIR}
29
30
31 gems_location() {
32 local sitelibdir
33 sitelibdir=`ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]'`
34 export GEMSDIR=${sitelibdir/site_ruby/gems}
35
36 }
37
38 gems_src_unpack() {
39 true
40 }
41
42 gems_src_install() {
43 gems_location
44
45 if [ -z "${MY_P}" ]; then
46 GEM_SRC=${DISTDIR}/${P}
47 else
48 GEM_SRC=${DISTDIR}/${MY_P}
49 fi
50
51 dodir ${GEMSDIR}
52 gem install ${GEM_SRC} -v ${PV} -l -i ${D}/${GEMSDIR} || die "gem install failed"
53
54 if [ -d ${D}/${GEMSDIR}/bin ] ; then
55 exeinto /usr/bin
56 for exe in ${D}/${GEMSDIR}/bin/* ; do
57 doexe ${exe}
58 done
59 fi
60 }
61
62 gems_src_compile() {
63 true
64 }
65
66
67 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20