jxplorer-3.3.1.2.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. JAVA_PKG_IUSE="doc source test"
  5. inherit java-pkg-2 java-ant-2 prefix virtualx
  6. DESCRIPTION="A fully functional ldap browser written in Java"
  7. HOMEPAGE="http://jxplorer.org/"
  8. SRC_URI="mirror://sourceforge/${PN}/${P}-project.zip"
  9. LICENSE="CAOSL"
  10. IUSE=""
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  13. RESTRICT="test"
  14. CDEPEND="
  15. >=dev-java/javahelp-2.0.02_p46:0"
  16. RDEPEND="
  17. ${CDEPEND}
  18. >=virtual/jre-1.5"
  19. DEPEND="
  20. ${CDEPEND}
  21. >=virtual/jdk-1.5
  22. test? ( dev-java/junit:0 )"
  23. S="${WORKDIR}/${PN}"
  24. JAVA_ANT_REWRITE_CLASSPATH="yes"
  25. EANT_GENTOO_CLASSPATH="javahelp"
  26. EANT_TEST_ANT_TASKS="ant-junit"
  27. src_prepare() {
  28. epatch "${FILESDIR}"/3.3-disable-jxworkbench.patch
  29. rm -v jars/*.jar || die
  30. sed -i -e 's/<fileset dir="${jasper}.*//g' "${S}/build.xml" || die
  31. if use test; then
  32. EANT_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only junit)
  33. else
  34. find . -iname '*Test*.java' -delete || die
  35. fi
  36. }
  37. src_test() {
  38. VIRTUALX_COMMAND="java-pkg-2_src_test" virtualmake
  39. }
  40. src_install() {
  41. java-pkg_dojar jars/${PN}.jar
  42. insinto /usr/share/${PN}
  43. doins -r icons images htmldocs language templates plugins security.default csvconfig.txt.default
  44. dodoc README*.TXT || die
  45. # By default the config dir is ${HOME}/jxplorer
  46. java-pkg_dolauncher ${PN} \
  47. --main com.ca.directory.jxplorer.JXplorer \
  48. --pwd '"${HOME}/.jxplorer"' \
  49. -pre "${FILESDIR}/${PN}-3-pre"
  50. eprefixify "${ED}/usr/bin/${PN}"
  51. use source && java-pkg_dosrc src/com
  52. use doc && java-pkg_dojavadoc docs/api
  53. make_desktop_entry ${PN} JXplorer /usr/share/jxplorer/images/logo_32_trans.gif System
  54. }