logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

yacy-1.922.20191013.9964.ebuild (1605B)


  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils java-pkg-2 java-ant-2 systemd versionator user
  5. MAJOR_PV="$(get_version_component_range 1-2)"
  6. REL_PV="$(get_version_component_range 3)"
  7. SVN_PV="$(get_version_component_range 4)"
  8. DESCRIPTION="YaCy - p2p based distributed web-search engine"
  9. HOMEPAGE="http://www.yacy.net/"
  10. SRC_URI="http://www.yacy.net/release/yacy_v${MAJOR_PV}_${REL_PV}_${SVN_PV}.tar.gz"
  11. LICENSE="GPL-2"
  12. SLOT="0"
  13. KEYWORDS="~amd64 ~x86"
  14. IUSE=""
  15. DEPEND=">=virtual/jdk-1.8"
  16. RDEPEND="${DEPEND}"
  17. S="${WORKDIR}/${PN}"
  18. EANT_BUILD_TARGET="all"
  19. pkg_setup() {
  20. enewgroup yacy
  21. enewuser yacy -1 -1 /var/lib/yacy yacy
  22. }
  23. src_install() {
  24. # remove win-only stuff
  25. find "${S}" -name "*.bat" -exec rm '{}' \; || die
  26. # remove init-scripts
  27. rm ${S}/*.sh || die
  28. # remove sources
  29. rm -r "${S}/source" || die
  30. rm ${S}/build.properties ${S}/build.xml
  31. dodoc AUTHORS NOTICE && rm AUTHORS NOTICE COPYRIGHT gpl.txt
  32. yacy_home="${EROOT}usr/share/${PN}"
  33. dodir ${yacy_home}
  34. cp -r ${S}/* ${D}${yacy_home} || die
  35. rm -r ${D}${yacy_home}/lib/*License
  36. dodir /var/log/yacy || die
  37. chown yacy:yacy "${D}/var/log/yacy" || die
  38. rmdir "$D/$yacy_home/DATA"
  39. dosym /var/lib/yacy /${yacy_home}/DATA
  40. exeinto /etc/init.d
  41. newexe "${FILESDIR}/yacy.rc" yacy
  42. insinto /etc/conf.d
  43. newins "${FILESDIR}/yacy.confd" yacy
  44. systemd_newunit "${FILESDIR}"/${PN}-ipv6.service ${PN}.service
  45. }
  46. pkg_postinst() {
  47. einfo "yacy.logging will write logfiles into /var/lib/yacy/LOG"
  48. einfo "To setup YaCy, open http://localhost:8090 in your browser."
  49. }