ganglia-web-3.5.10-r1.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. WEBAPP_MANUAL_SLOT="yes"
  5. inherit webapp eutils
  6. DESCRIPTION="Web frontend for sys-cluster/ganglia"
  7. HOMEPAGE="http://ganglia.sourceforge.net"
  8. SRC_URI="mirror://sourceforge/ganglia/${PN}/${PV}/${P}.tar.gz"
  9. LICENSE="BSD"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~ppc ~x86"
  12. IUSE="vhosts"
  13. DEPEND="net-misc/rsync"
  14. RDEPEND="
  15. ${DEPEND}
  16. ${WEBAPP_DEPEND}
  17. >=sys-cluster/ganglia-3.3.7[-minimal]
  18. dev-lang/php[gd,xml,ctype,cgi]
  19. media-fonts/dejavu"
  20. src_configure() {
  21. return 0
  22. }
  23. src_compile() {
  24. return 0
  25. }
  26. src_prepare() {
  27. epatch "${FILESDIR}"/CVE-2013-6395-fix-xss.patch
  28. }
  29. src_install() {
  30. webapp_src_preinst
  31. cd "${S}"
  32. emake \
  33. GDESTDIR="${MY_HTDOCSDIR}" \
  34. DESTDIR="${D}" \
  35. APACHE_USER=nobody \
  36. install || die
  37. webapp_configfile "${MY_HTDOCSDIR}"/conf_default.php
  38. webapp_src_install
  39. fowners -R nobody:nobody /var/lib/ganglia-web/dwoo
  40. fperms -R 777 /var/lib/ganglia-web/dwoo
  41. dodoc AUTHORS README TODO || die
  42. }
  43. pkg_postinst() {
  44. webapp_pkg_postinst
  45. # upgrade from < 3.5.6
  46. if [ -d "${ROOT}"/var/lib/ganglia/dwoo ]; then
  47. rm -rf "${ROOT}"/var/lib/ganglia/dwoo || die
  48. fi
  49. }