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

Contents of /eclass/gems.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Mon Jul 11 15:08:06 2005 UTC (9 years ago) by swegener
Branch: MAIN
Changes since 1.5: +4 -6 lines
QA: Apply whitespace checks from repoman to eclasses.

1 pythonhead 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 swegener 1.6 # $Header: /var/cvsroot/gentoo-x86/eclass/gems.eclass,v 1.5 2005/07/06 20:23:20 agriffis Exp $
4 pythonhead 1.1 #
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 swegener 1.6 # gems-based ruby packagess and their incorporation into
10 pythonhead 1.1 # the Gentoo Linux system.
11     #
12     # - Features:
13 pythonhead 1.2 # gems_location() - Set ${GEMSDIR} with gem install dir and ${GEM_SRC} with path to gem to install
14 pythonhead 1.1 # gems_src_install() - installs a gem into ${D}
15 pythonhead 1.2 # 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 pythonhead 1.1
21    
22     inherit ruby eutils
23    
24    
25     DEPEND=">=dev-ruby/rubygems-0.8.4-r1"
26    
27     S=${WORKDIR}
28    
29    
30     gems_location() {
31     local sitelibdir
32     sitelibdir=`ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]'`
33     export GEMSDIR=${sitelibdir/site_ruby/gems}
34 pythonhead 1.2
35 pythonhead 1.1 }
36    
37     gems_src_unpack() {
38     true
39     }
40    
41     gems_src_install() {
42     gems_location
43 pythonhead 1.2
44     if [ -z "${MY_P}" ]; then
45     GEM_SRC=${DISTDIR}/${P}
46     else
47     GEM_SRC=${DISTDIR}/${MY_P}
48     fi
49    
50 pythonhead 1.1 dodir ${GEMSDIR}
51 pythonhead 1.2 gem install ${GEM_SRC} -v ${PV} -l -i ${D}/${GEMSDIR} || die "gem install failed"
52 swegener 1.6
53     if [ -d ${D}/${GEMSDIR}/bin ] ; then
54 pythonhead 1.1 exeinto /usr/bin
55     for exe in ${D}/${GEMSDIR}/bin/* ; do
56     doexe ${exe}
57     done
58     fi
59     }
60    
61     gems_src_compile() {
62     true
63     }
64    
65 pythonhead 1.2 EXPORT_FUNCTIONS src_unpack src_compile src_install

  ViewVC Help
Powered by ViewVC 1.1.20