# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic java-pkg versionator DESCRIPTION="A mature Java-based RSS/RDF/Atom Newsreader with advanced features." HOMEPAGE="http://www.rssowl.org/" LICENSE="EPL-1.0" MY_P="${PN}_$(replace_all_version_separators '_' ${PV/.1_p*/})_src" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" SLOT="0" KEYWORDS="~x86" IUSE="doc mozilla" S=${WORKDIR}/${MY_P} DEPEND=">=dev-java/ant-core-1.5.4 >=dev-java/swt-3.2" RDEPEND=">=virtual/jre-1.4 >=dev-java/swt-3.2_rc2 mozilla? ( >=www-client/seamonkey-1.0.2 ) virtual/x11" pkg_setup() { if use mozilla && ! built_with_use dev-java/swt mozilla; then ewarn "dev-java/swt should be compiled with the mozilla use flag" ewarn "when you have the mozilla use flag set" die fi } src_unpack() { unpack ${A} cd ${S}/lib java-pkg_jar-from swt-3 } src_compile() { cd ${S}/src ant deploy_linux || die "compile failed" if use doc ; then ant javadoc || die "Javadoc generation failed" fi } src_install() { java-pkg_dojar ${PN}.jar # Create program launcher if use mozilla ; then echo -e "#!/bin/sh\nexport MOZILLA_FIVE_HOME=/usr/lib/seamonkey\nexec java -Dnet.sourceforge.rssowl.noSplash -Djava.library.path=/usr/lib/ -jar /usr/share/${PN}/lib/${PN}.jar \"\$@\"" > ./${PN} else echo -e "#!/bin/sh\nexec java -Dnet.sourceforge.rssowl.noSplash -Djava.library.path=/usr/lib/ -jar /usr/share/${PN}/lib/${PN}.jar \"\$@\"" > ./${PN} fi dobin ${PN} doicon img/${PN}.xpm make_desktop_entry rssowl "RSSOwl" rssowl use doc && java-pkg_dohtml -r doc/api/* dodoc doc/{CHANGELOG.txt,README.txt} }