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

Contents of /eclass/ruby.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Sep 21 21:13:45 2003 UTC (14 years, 10 months ago) by usata
Branch: MAIN
Changes since 1.3: +4 -4 lines
Reversed the order of Makefile and install.rb for the sake of ReFe (not added to Portage tree yet)

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/eclass/ruby.eclass,v 1.3 2003/09/12 11:56:04 twp Exp $
4 #
5 # Author: Mamoru KOMACHI <usata@gentoo.org>
6 #
7 # The ruby eclass is designed to allow easier installation of ruby
8 # softwares, and their incorporation into the Gentoo Linux system.
9
10 ECLASS=ruby
11 INHERITED="${INHERITED} ${ECLASS}"
12 EXPORT_FUNCTIONS src_compile src_install
13
14 HOMEPAGE="http://raa.ruby-lang.org/list.rhtml?name=${PN}"
15 SRC_URI="mirror://gentoo/${P}.tar.gz"
16
17 SLOT="0"
18 LICENSE="Ruby"
19
20 newdepend ">=dev-lang/ruby-1.6.8"
21
22 ruby_src_compile() {
23 if [ -f extconf.rb ] ; then
24 ruby extconf.rb || die "extconf.rb failed"
25 emake || die "make failed"
26 elif [ -f install.rb ] ; then
27 ruby install.rb config --prefix=/usr \
28 || die "install.rb config failed"
29 ruby install.rb setup \
30 || die "install.rb setup failed"
31 elif [ -f configure ] ; then
32 econf || die "econf failed"
33 emake || die "emake failed"
34 elif [ -f Makefile ] ; then
35 emake || die "emake failed"
36 fi
37 }
38
39 ruby_src_install() {
40 local siteruby rdbase=/usr/share/doc/${PF}/rd
41
42 if [ -f install.rb ] ; then
43 ruby install.rb config --prefix=${D}/usr \
44 || die "install.rb config failed"
45 ruby install.rb install \
46 || die "install.rb install failed"
47 elif [ -f extconf.rb -o -f Makefile ] ; then
48 einstall DESTDIR=${D} || die "einstall failed"
49 else
50 siteruby=$(ruby -r rbconfig -e 'print Config::CONFIG["sitelibdir"]')
51 insinto ${siteruby}/${PN}
52 doins *.rb || "doins failed"
53 fi
54
55 insinto ${rdbase}
56 find . -name '*.rd*' | xargs doins
57 rmdir --ignore-fail-on-non-empty ${D}${rdbase}
58 if [ -d doc -o -d docs -o examples ] ; then
59 dohtml -r doc/* docs/* examples/*
60 else
61 dohtml -r *
62 fi
63 if [ -d sample ] ; then
64 dodir /usr/share/doc/${PF}
65 cp -a sample ${D}/usr/share/doc/${PF} || "cp failed"
66 fi
67 dodoc ChangeLog* [A-Z][A-Z]*
68 }

  ViewVC Help
Powered by ViewVC 1.1.20