Gentoo Archives: gentoo-java

From: Sean McEligot <sean.mceligot@×××××.com>
To: gentoo-java@l.g.o
Subject: [gentoo-java] new jruby ebuild
Date: Wed, 30 Aug 2006 01:40:53
Message-Id: 20060830013824.GA9966@oak
1 I updated the jruby ebuild for my first gentoo project. It's nearly
2 complete. I just have to test a few things. I added /usr/bin/jruby and
3 /usr/bin/jirb and some others. I also added /usr/share/jruby. I also
4 created an ebuild for jvyaml, a new dependancy in jruby. I tried to
5 contact the last maintainer (luckyduck@g.o) but the email
6 bounced. I'd like to get some help checking over my work. I'd also like
7 to know the steps involved to get this into main. Here's the ebuilds:
8
9 == jruby-0.9.0.ebuild ==
10 # Copyright 1999-2005 Gentoo Foundation
11 # Distributed under the terms of the GNU General Public License v2
12 # $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-0.7.0-r1.ebuild,v 1.3 2005/07/16 14:28:28 axxo Exp $
13
14 inherit base java-pkg-2
15
16 DESCRIPTION="Java based ruby interpreter implementation"
17 HOMEPAGE="http://jruby.sourceforge.net/"
18 SRC_URI="mirror://sourceforge/jruby/${PN}-src-${PV}.tar.gz"
19 #SRC_URI="http://dist.codehaus.org/jruby/jruby-src-${PV}.tar.gz
20 KEYWORDS="x86 amd64"
21 LICENSE="GPL-2"
22 SLOT="0"
23 IUSE="doc examples jikes junit source"
24 RDEPEND=">=virtual/jre-1.4
25 =dev-java/jvyaml-0.1*
26 =dev-java/bsf-2.3*
27 =dev-java/jakarta-oro-2.0*
28 =dev-java/gnu-regexp-1.1*"
29 DEPEND=">=virtual/jdk-1.4
30 ${RDEPEND}
31 >=dev-java/ant-1.4
32 jikes? ( dev-java/jikes )
33 junit? ( dev-java/junit )
34 source? ( app-arch/zip )"
35
36 src_unpack() {
37 unpack ${A}
38 cd ${S}/lib
39 rm -rf *.jar
40 java-pkg_jar-from bsf-2.3
41 java-pkg_jar-from jakarta-oro-2.0
42 java-pkg_jar-from gnu-regexp-1
43 java-pkg_jar-from jvyaml
44 use junit && java-pkg_jar-from junit
45 }
46
47 src_compile() {
48 local antflags="jar"
49 use doc && antflags="${antflags} create-apidocs"
50 use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
51 use junit && antflags="${antflags} test"
52 ant ${antflags} || die "Compile Failed"
53 }
54
55 src_install() {
56 java-pkg_dojar ${S}/lib/jruby.jar
57
58 use doc && java-pkg_dohtml -r docs/api/*
59 if use examples; then
60 dodir /usr/share/doc/${PF}/examples
61 cp -r samples/* ${D}/usr/share/doc/${PF}/examples
62 fi
63 use source && java-pkg_dosrc src/org
64 java-pkg_dolauncher jruby \
65 --main 'org.jruby.Main' \
66 --java_args '-Djruby.base=/usr/share/jruby -Djruby.home=/usr/share/jruby -Djruby.lib=/usr/share/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh'
67 insinto /usr/share/${PN}
68 doins -r lib
69 exeinto /usr/bin
70 newexe ${S}/bin/gem jgem
71 newexe ${S}/bin/gem_server jgem_server
72 newexe ${S}/bin/gemlock jgem_lock
73 newexe ${S}/bin/gemri jgemri
74 newexe ${S}/bin/gemwhich jgemwhich
75 newexe ${S}/bin/update_rubygems jupdate_rubygems
76 newexe ${S}/bin/generate_yaml_index.rb jgenerate_yaml_index.rb
77 newexe ${S}/bin/index_gem_repository.rb jindex_gem_repository.rb
78 doexe ${S}/bin/jirb
79 }
80 == jvyaml-0.1.ebuild ==
81 # Copyright 1999-2006 Gentoo Foundation
82 # Distributed under the terms of the GNU General Public License v2
83 # $Header: Exp $
84
85 inherit java-pkg-2 java-ant-2 eutils
86
87 DESCRIPTION="Java YAML parser and emitter"
88 HOMEPAGE="https://jvyaml.dev.java.net/"
89 SRC_URI="https://${PN}.dev.java.net/files/documents/5215/35811/${PN}-src-${PV}.tar.gz"
90 LICENSE="MIT"
91 SLOT="0"
92 KEYWORDS="~amd64 ~ppc ~x86"
93 IUSE="doc examples source"
94 DEPEND=">=virtual/jdk-1.3
95 sys-apps/sed
96 dev-java/ant-core
97 source? ( app-arch/zip )"
98 RDEPEND=">=virtual/jre-1.3"
99
100 S="${WORKDIR}/${PN}-${PV}"
101
102 src_unpack() {
103 unpack ${A}
104 }
105
106 src_compile() {
107 local antflags="jar"
108 use doc && antflags="${antflags} javadoc"
109 eant ${antflags} || die "compilation failed"
110 }
111
112 src_install() {
113 java-pkg_dojar lib/${PN}.jar
114
115 if use doc; then
116 dodoc README
117 java-pkg_dohtml -r www/*
118 java-pkg_dohtml -r doc/api
119 fi
120 use source && java-pkg_dosrc src/*
121
122 #newenvd ${FILESDIR}/jvyaml-${PV} 22jvyaml
123 }
124
125 --
126 gentoo-java@g.o mailing list

Replies

Subject Author
Re: [gentoo-java] new jruby ebuild Joshua Nichols <nichoj@g.o>