maven-bin-2.2.1-r2.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit java-pkg-2
  5. MY_PN=apache-${PN%%-bin}
  6. MY_P="${MY_PN}-${PV}"
  7. MY_MV="${PV%%.*}"
  8. DESCRIPTION="Project Management and Comprehension Tool for Java"
  9. SRC_URI="mirror://apache/maven/maven-${MY_MV}/${PV}/binaries/${MY_P}-bin.tar.bz2"
  10. HOMEPAGE="http://maven.apache.org/"
  11. LICENSE="Apache-2.0"
  12. SLOT="2.2"
  13. KEYWORDS="amd64 x86"
  14. IUSE=""
  15. DEPEND="app-eselect/eselect-java"
  16. RDEPEND=">=virtual/jdk-1.5
  17. ${DEPEND}"
  18. S="${WORKDIR}/${MY_P}"
  19. MAVEN=${PN}-${SLOT}
  20. MAVEN_SHARE="/usr/share/${MAVEN}"
  21. java_prepare() {
  22. rm -v "${S}"/bin/*.bat || die
  23. }
  24. # TODO we should use jars from packages, instead of what is bundled
  25. src_install() {
  26. dodir "${MAVEN_SHARE}"
  27. cp -Rp bin boot conf lib "${ED}/${MAVEN_SHARE}" || die "failed to copy"
  28. java-pkg_regjar "${ED}/${MAVEN_SHARE}"/lib/*.jar
  29. dodoc NOTICE.txt README.txt
  30. dodir /usr/bin
  31. dosym "${MAVEN_SHARE}/bin/mvn" /usr/bin/mvn-${SLOT}
  32. # bug #342901
  33. echo "CONFIG_PROTECT=\"${MAVEN_SHARE}/conf\"" > "${T}/25${MAVEN}" || die
  34. doenvd "${T}/25${MAVEN}"
  35. }
  36. pkg_postinst() {
  37. eselect maven update mvn-${SLOT}
  38. }
  39. pkg_postrm() {
  40. eselect maven update
  41. }