* [gentoo-java] new jruby ebuild
@ 2006-08-30 1:39 Sean McEligot
2006-08-31 2:49 ` Joshua Nichols
0 siblings, 1 reply; 4+ messages in thread
From: Sean McEligot @ 2006-08-30 1:39 UTC (permalink / raw
To: gentoo-java
I updated the jruby ebuild for my first gentoo project. It's nearly
complete. I just have to test a few things. I added /usr/bin/jruby and
/usr/bin/jirb and some others. I also added /usr/share/jruby. I also
created an ebuild for jvyaml, a new dependancy in jruby. I tried to
contact the last maintainer (luckyduck@gentoo.org) but the email
bounced. I'd like to get some help checking over my work. I'd also like
to know the steps involved to get this into main. Here's the ebuilds:
== jruby-0.9.0.ebuild ==
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $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 $
inherit base java-pkg-2
DESCRIPTION="Java based ruby interpreter implementation"
HOMEPAGE="http://jruby.sourceforge.net/"
SRC_URI="mirror://sourceforge/jruby/${PN}-src-${PV}.tar.gz"
#SRC_URI="http://dist.codehaus.org/jruby/jruby-src-${PV}.tar.gz
KEYWORDS="x86 amd64"
LICENSE="GPL-2"
SLOT="0"
IUSE="doc examples jikes junit source"
RDEPEND=">=virtual/jre-1.4
=dev-java/jvyaml-0.1*
=dev-java/bsf-2.3*
=dev-java/jakarta-oro-2.0*
=dev-java/gnu-regexp-1.1*"
DEPEND=">=virtual/jdk-1.4
${RDEPEND}
>=dev-java/ant-1.4
jikes? ( dev-java/jikes )
junit? ( dev-java/junit )
source? ( app-arch/zip )"
src_unpack() {
unpack ${A}
cd ${S}/lib
rm -rf *.jar
java-pkg_jar-from bsf-2.3
java-pkg_jar-from jakarta-oro-2.0
java-pkg_jar-from gnu-regexp-1
java-pkg_jar-from jvyaml
use junit && java-pkg_jar-from junit
}
src_compile() {
local antflags="jar"
use doc && antflags="${antflags} create-apidocs"
use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
use junit && antflags="${antflags} test"
ant ${antflags} || die "Compile Failed"
}
src_install() {
java-pkg_dojar ${S}/lib/jruby.jar
use doc && java-pkg_dohtml -r docs/api/*
if use examples; then
dodir /usr/share/doc/${PF}/examples
cp -r samples/* ${D}/usr/share/doc/${PF}/examples
fi
use source && java-pkg_dosrc src/org
java-pkg_dolauncher jruby \
--main 'org.jruby.Main' \
--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'
insinto /usr/share/${PN}
doins -r lib
exeinto /usr/bin
newexe ${S}/bin/gem jgem
newexe ${S}/bin/gem_server jgem_server
newexe ${S}/bin/gemlock jgem_lock
newexe ${S}/bin/gemri jgemri
newexe ${S}/bin/gemwhich jgemwhich
newexe ${S}/bin/update_rubygems jupdate_rubygems
newexe ${S}/bin/generate_yaml_index.rb jgenerate_yaml_index.rb
newexe ${S}/bin/index_gem_repository.rb jindex_gem_repository.rb
doexe ${S}/bin/jirb
}
== jvyaml-0.1.ebuild ==
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $
inherit java-pkg-2 java-ant-2 eutils
DESCRIPTION="Java YAML parser and emitter"
HOMEPAGE="https://jvyaml.dev.java.net/"
SRC_URI="https://${PN}.dev.java.net/files/documents/5215/35811/${PN}-src-${PV}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="doc examples source"
DEPEND=">=virtual/jdk-1.3
sys-apps/sed
dev-java/ant-core
source? ( app-arch/zip )"
RDEPEND=">=virtual/jre-1.3"
S="${WORKDIR}/${PN}-${PV}"
src_unpack() {
unpack ${A}
}
src_compile() {
local antflags="jar"
use doc && antflags="${antflags} javadoc"
eant ${antflags} || die "compilation failed"
}
src_install() {
java-pkg_dojar lib/${PN}.jar
if use doc; then
dodoc README
java-pkg_dohtml -r www/*
java-pkg_dohtml -r doc/api
fi
use source && java-pkg_dosrc src/*
#newenvd ${FILESDIR}/jvyaml-${PV} 22jvyaml
}
--
gentoo-java@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-java] new jruby ebuild
@ 2006-08-30 16:37 Sean McEligot
0 siblings, 0 replies; 4+ messages in thread
From: Sean McEligot @ 2006-08-30 16:37 UTC (permalink / raw
To: gentoo-java
[-- Attachment #1: Type: text/plain, Size: 4159 bytes --]
I updated the jruby ebuild for my first gentoo project. It's nearly
complete. I just have to test a few things. I added /usr/bin/jruby and
/usr/bin/jirb and some others. I also added /usr/share/jruby. I also
created an ebuild for jvyaml, a new dependancy in jruby. I tried to
contact the last maintainer (luckyduck@gentoo.org) but the email
bounced. I'd like to get some help checking over my work. I'd also like
to know the steps involved to get this into main. Here's the ebuilds:
== jruby-0.9.0.ebuild ==
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $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 $
inherit base java-pkg-2
DESCRIPTION="Java based ruby interpreter implementation"
HOMEPAGE="http://jruby.sourceforge.net/"
SRC_URI="mirror://sourceforge/jruby/${PN}-src-${PV}.tar.gz"
#SRC_URI="http://dist.codehaus.org/jruby/jruby-src-${PV}.tar.gz
KEYWORDS=<http://dist.codehaus.org/jruby/jruby-src-$%7BPV%7D.tar.gzKEYWORDS=>"x86
amd64"
LICENSE="GPL-2"
SLOT="0"
IUSE="doc examples jikes junit source"
RDEPEND=">=virtual/jre-1.4
=dev-java/jvyaml-0.1*
=dev-java/bsf-2.3*
=dev-java/jakarta-oro-2.0*
=dev-java/gnu-regexp-1.1*"
DEPEND=">=virtual/jdk-1.4
${RDEPEND}
>=dev-java/ant-1.4
jikes? ( dev-java/jikes )
junit? ( dev-java/junit )
source? ( app-arch/zip )"
src_unpack() {
unpack ${A}
cd ${S}/lib
rm -rf *.jar
java-pkg_jar-from bsf-2.3
java-pkg_jar-from jakarta-oro-2.0
java-pkg_jar-from gnu-regexp-1
java-pkg_jar-from jvyaml
use junit && java-pkg_jar-from junit
}
src_compile() {
local antflags="jar"
use doc && antflags="${antflags} create-apidocs"
use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
use junit && antflags="${antflags} test"
ant ${antflags} || die "Compile Failed"
}
src_install() {
java-pkg_dojar ${S}/lib/jruby.jar
use doc && java-pkg_dohtml -r docs/api/*
if use examples; then
dodir /usr/share/doc/${PF}/examples
cp -r samples/* ${D}/usr/share/doc/${PF}/examples
fi
use source && java-pkg_dosrc src/org
java-pkg_dolauncher jruby \
--main 'org.jruby.Main' \
--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'
insinto /usr/share/${PN}
doins -r lib
exeinto /usr/bin
newexe ${S}/bin/gem jgem
newexe ${S}/bin/gem_server jgem_server
newexe ${S}/bin/gemlock jgem_lock
newexe ${S}/bin/gemri jgemri
newexe ${S}/bin/gemwhich jgemwhich
newexe ${S}/bin/update_rubygems jupdate_rubygems
newexe ${S}/bin/generate_yaml_index.rb jgenerate_yaml_index.rb
newexe ${S}/bin/index_gem_repository.rb jindex_gem_repository.rb
doexe ${S}/bin/jirb
}
== jvyaml-0.1.ebuild ==
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: Exp $
inherit java-pkg-2 java-ant-2 eutils
DESCRIPTION="Java YAML parser and emitter"
HOMEPAGE="https://jvyaml.dev.java.net/"
SRC_URI="https://${PN}.dev.java.net/files/documents/5215/35811/${PN}-src-${PV}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="doc examples source"
DEPEND=">=virtual/jdk-1.3
sys-apps/sed
dev-java/ant-core
source? ( app-arch/zip )"
RDEPEND=">=virtual/jre-1.3"
S="${WORKDIR}/${PN}-${PV}"
src_unpack() {
unpack ${A}
}
src_compile() {
local antflags="jar"
use doc && antflags="${antflags} javadoc"
eant ${antflags} || die "compilation failed"
}
src_install() {
java-pkg_dojar lib/${PN}.jar
if use doc; then
dodoc README
java-pkg_dohtml -r www/*
java-pkg_dohtml -r doc/api
fi
use source && java-pkg_dosrc src/*
#newenvd ${FILESDIR}/jvyaml-${PV} 22jvyaml
}
[-- Attachment #2: Type: text/html, Size: 6882 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-java] new jruby ebuild
2006-08-30 1:39 [gentoo-java] new jruby ebuild Sean McEligot
@ 2006-08-31 2:49 ` Joshua Nichols
2006-08-31 14:23 ` Sean McEligot
0 siblings, 1 reply; 4+ messages in thread
From: Joshua Nichols @ 2006-08-31 2:49 UTC (permalink / raw
To: gentoo-java
Hi Sean,
Sean McEligot wrote:
> I updated the jruby ebuild for my first gentoo project. It's nearly
> complete. I just have to test a few things. I added /usr/bin/jruby and
> /usr/bin/jirb and some others. I also added /usr/share/jruby. I also
> created an ebuild for jvyaml, a new dependancy in jruby. I tried to
> contact the last maintainer (luckyduck@gentoo.org) but the email
> bounced. I'd like to get some help checking over my work. I'd also like
> to know the steps involved to get this into main. Here's the ebuilds:
>
>
luckyduck is actually retired, so that would explain the bounce. The
proper way to get the ball rolling is to file a version bump request in
bugzilla for jruby, and a new package request in bugzilla for jvyaml.
Your ebuilds need a little bit of cleaning up, so I'm going to comment
inline.
> == jruby-0.9.0.ebuild ==
> # Copyright 1999-2005 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $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 $
>
> inherit base java-pkg-2
>
>
I don't see anything using functionality from base, so you probably
don't need to inherit. And since you're using ant, you should inherit
java-ant-2
> DESCRIPTION="Java based ruby interpreter implementation"
> HOMEPAGE="http://jruby.sourceforge.net/"
> SRC_URI="mirror://sourceforge/jruby/${PN}-src-${PV}.tar.gz"
> #SRC_URI="http://dist.codehaus.org/jruby/jruby-src-${PV}.tar.gz
>
You should probably removed commented code that isn't being used.
> KEYWORDS="x86 amd64"
>
New versions should always be keyworded with unstable keywords.
> LICENSE="GPL-2"
> SLOT="0"
> IUSE="doc examples jikes junit source"
>
jikes is a deprecated used flag. We have other mechanisms for
controlling the compiler.
test should be used instead of junit.
> RDEPEND=">=virtual/jre-1.4
> =dev-java/jvyaml-0.1*
> =dev-java/bsf-2.3*
> =dev-java/jakarta-oro-2.0*
> =dev-java/gnu-regexp-1.1*"
> DEPEND=">=virtual/jdk-1.4
> ${RDEPEND}
> >=dev-java/ant-1.4
> jikes? ( dev-java/jikes )
> junit? ( dev-java/junit )
> source? ( app-arch/zip )"
>
>
Lose the jikes, as mentioned above. Ditto on junit -> test.
> src_unpack() {
> unpack ${A}
> cd ${S}/lib
> rm -rf *.jar
> java-pkg_jar-from bsf-2.3
> java-pkg_jar-from jakarta-oro-2.0
> java-pkg_jar-from gnu-regexp-1
> java-pkg_jar-from jvyaml
> use junit && java-pkg_jar-from junit
> }
>
> src_compile() {
> local antflags="jar"
> use doc && antflags="${antflags} create-apidocs"
> use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
> use junit && antflags="${antflags} test"
> ant ${antflags} || die "Compile Failed"
> }
>
>
Testing should be done in src_test.
You should be using eant instead of ant directly. This can be slimmed
down to:
eant jar $(use_doc create-apidocs)
use_doc will check if using doc flag, and if so, will print the args you
pass to it... or 'javadoc' if you don't give it any args.
> src_install() {
> java-pkg_dojar ${S}/lib/jruby.jar
>
> use doc && java-pkg_dohtml -r docs/api/*
> if use examples; then
> dodir /usr/share/doc/${PF}/examples
> cp -r samples/* ${D}/usr/share/doc/${PF}/examples
> fi
> use source && java-pkg_dosrc src/org
> java-pkg_dolauncher jruby \
> --main 'org.jruby.Main' \
> --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'
> insinto /usr/share/${PN}
> doins -r lib
> exeinto /usr/bin
> newexe ${S}/bin/gem jgem
> newexe ${S}/bin/gem_server jgem_server
> newexe ${S}/bin/gemlock jgem_lock
> newexe ${S}/bin/gemri jgemri
> newexe ${S}/bin/gemwhich jgemwhich
> newexe ${S}/bin/update_rubygems jupdate_rubygems
> newexe ${S}/bin/generate_yaml_index.rb jgenerate_yaml_index.rb
> newexe ${S}/bin/index_gem_repository.rb jindex_gem_repository.rb
> doexe ${S}/bin/jirb
> }
> == jvyaml-0.1.ebuild ==
> # Copyright 1999-2006 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: Exp $
>
> inherit java-pkg-2 java-ant-2 eutils
>
> DESCRIPTION="Java YAML parser and emitter"
> HOMEPAGE="https://jvyaml.dev.java.net/"
> SRC_URI="https://${PN}.dev.java.net/files/documents/5215/35811/${PN}-src-${PV}.tar.gz"
> LICENSE="MIT"
> SLOT="0"
> KEYWORDS="~amd64 ~ppc ~x86"
> IUSE="doc examples source"
> DEPEND=">=virtual/jdk-1.3
> sys-apps/sed
> dev-java/ant-core
> source? ( app-arch/zip )"
> RDEPEND=">=virtual/jre-1.3"
>
> S="${WORKDIR}/${PN}-${PV}"
>
This S is unnecessary, since that is what the default value of S is.
> src_unpack() {
> unpack ${A}
> }
>
>
This src_unpack is unnecessary, because that is the default src_unpack
> src_compile() {
> local antflags="jar"
> use doc && antflags="${antflags} javadoc"
> eant ${antflags} || die "compilation failed"
> }
>
>
This can be rewritten as:
eant jar $(use_doc)
> src_install() {
> java-pkg_dojar lib/${PN}.jar
>
> if use doc; then
> dodoc README
> java-pkg_dohtml -r www/*
> java-pkg_dohtml -r doc/api
> fi
>
README should generally always be installed. doc is traditionally used
for generating and installing documantation that may take more time /
space to process/install
> use source && java-pkg_dosrc src/*
>
> #newenvd ${FILESDIR}/jvyaml-${PV} 22jvyaml
>
Should remove uncommented code.
> }
>
>
Hope this doesn't come off to harsh :)
Some resources that would be of interest:
The Java development guide:
http://www.gentoo.org/proj/en/java/java-devel.xml
The Gentoo Developer Handbook:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml
The Devmanual:
http://devmanual.gentoo.org/
Regards,
--
Joshua Nichols
Gentoo/Java Project Lead
--
gentoo-java@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-java] new jruby ebuild
2006-08-31 2:49 ` Joshua Nichols
@ 2006-08-31 14:23 ` Sean McEligot
0 siblings, 0 replies; 4+ messages in thread
From: Sean McEligot @ 2006-08-31 14:23 UTC (permalink / raw
To: gentoo-java
On Wed, Aug 30, 2006 at 10:49:25PM -0400, Joshua Nichols wrote:
> Hope this doesn't come off to harsh :)
Not harsh at all. That's what I was looking for. Thanks. I'll take this
over to bugzilla as soon as I've run a few more tests.
>
> Some resources that would be of interest:
> The Java development guide:
> http://www.gentoo.org/proj/en/java/java-devel.xml
> The Gentoo Developer Handbook:
> http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml
> The Devmanual:
> http://devmanual.gentoo.org/
>
> Regards,
>
> --
> Joshua Nichols
> Gentoo/Java Project Lead
> --
> gentoo-java@gentoo.org mailing list
--
gentoo-java@gentoo.org mailing list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-08-31 14:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-30 1:39 [gentoo-java] new jruby ebuild Sean McEligot
2006-08-31 2:49 ` Joshua Nichols
2006-08-31 14:23 ` Sean McEligot
-- strict thread matches above, loose matches on Subject: below --
2006-08-30 16:37 Sean McEligot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox