java-wakeonlan-1.0.0-r2.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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"
  5. inherit java-pkg-2 java-ant-2
  6. DESCRIPTION="A wakeonlan commandline tool and Java library"
  7. SRC_URI="http://www.moldaner.de/wakeonlan/download/wakeonlan-${PV}.zip"
  8. HOMEPAGE="http://www.moldaner.de/wakeonlan/"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE="test"
  13. CDEPEND="dev-java/jsap:0
  14. dev-java/junit:4"
  15. RDEPEND=">=virtual/jre-1.6
  16. ${CDEPEND}"
  17. DEPEND=">=virtual/jdk-1.6
  18. app-arch/unzip
  19. test? (
  20. dev-java/ant-junit:0
  21. )
  22. ${CDEPEND}"
  23. S=${WORKDIR}/wakeonlan-${PV}
  24. EANT_GENTOO_CLASSPATH="jsap"
  25. EANT_BUILD_TARGET="deploy"
  26. JAVA_ANT_CLASSPATH_TAGS+=" javadoc"
  27. src_unpack() {
  28. unpack ${A}
  29. }
  30. java_prepare() {
  31. cd "${S}"
  32. epatch "${FILESDIR}"/${P}-build.xml.patch
  33. find -name "*.jar" | xargs rm -v
  34. java-ant_rewrite-classpath
  35. }
  36. EANT_TEST_CLASSPATH="${EANT_GENTOO_CLASSPATH},junit-4"
  37. EANT_TEST_TARGET="test"
  38. src_test() {
  39. java-pkg-2_src_test
  40. }
  41. src_install() {
  42. java-pkg_dojar deploy/wakeonlan.jar
  43. java-pkg_dolauncher ${PN} --main wol.WakeOnLan
  44. dodoc doc/README
  45. use doc && java-pkg_dojavadoc deploy/doc/javadoc
  46. use source && java-pkg_dosrc src/wol
  47. }