channeleditor-1.9.2.1-r1.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. JAVA_PKG_IUSE=source
  5. inherit eutils java-pkg-2 java-ant-2
  6. DESCRIPTION="Editor for VDR channels.conf"
  7. HOMEPAGE="http://www.renier.de/channeleditor"
  8. SRC_URI="mirror://sourceforge/${PN}/${P/-/_}_src.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 x86"
  12. IUSE=""
  13. RDEPEND=">=virtual/jre-1.5"
  14. DEPEND=" >=virtual/jdk-1.5"
  15. S="${WORKDIR}/${PN}"
  16. mainclass() {
  17. # read Main-Class from MANIFEST.MF
  18. sed -n "s/^Main-Class: \([^ ]\+\).*/\1/p" "${S}/MANIFEST.MF" \
  19. || die "reading Main-Class failed"
  20. }
  21. java_prepare() {
  22. # move files out of build and remove stuff not needed in the package
  23. mv build/* "${S}" || die "cleaning build dir failed"
  24. rm -f src/java/org/javalobby/icons/{README,COPYRIGHT} \
  25. || die "removing files failed"
  26. # copy build.xml
  27. cp -f "${FILESDIR}/build-${PV}.xml" build.xml \
  28. || die "copying build.xml failed"
  29. # convert CRLF to LF
  30. edos2unix MANIFEST.MF
  31. # include localisation changes
  32. epatch "${FILESDIR}"/${P}-messages.properties.patch
  33. epatch "${FILESDIR}"/${P}-messages_en.properties.patch
  34. }
  35. src_compile() {
  36. eant build -Dmanifest.mainclass=$(mainclass)
  37. }
  38. src_install() {
  39. java-pkg_dojar dist/${PN}.jar
  40. java-pkg_dolauncher ${PN} --main $(mainclass)
  41. use source && java-pkg_dosrc src
  42. make_desktop_entry channeleditor Channeleditor "" "Utility"
  43. }