monit-5.20.0.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit pam systemd
  5. DESCRIPTION="Monitoring and managing daemons or similar programs running on a Unix system"
  6. HOMEPAGE="http://mmonit.com/monit/"
  7. SRC_URI="http://mmonit.com/monit/dist/${P}.tar.gz"
  8. LICENSE="AGPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc ~ppc64 x86 ~amd64-linux"
  11. IUSE="libressl pam ssl"
  12. RDEPEND="
  13. ssl? (
  14. !libressl? ( dev-libs/openssl:0= )
  15. libressl? ( dev-libs/libressl:0= )
  16. )"
  17. DEPEND="${RDEPEND}
  18. sys-devel/flex
  19. sys-devel/bison
  20. pam? ( virtual/pam )"
  21. src_prepare() {
  22. default
  23. sed -i -e '/^INSTALL_PROG/s/-s//' Makefile.in || die "sed failed in Makefile.in"
  24. }
  25. src_configure() {
  26. econf $(use_with ssl) $(use_with pam)
  27. }
  28. src_install() {
  29. default
  30. dodoc README
  31. insinto /etc; insopts -m600; doins monitrc
  32. newinitd "${FILESDIR}"/monit.initd-5.0-r1 monit
  33. systemd_dounit "${FILESDIR}"/${PN}.service
  34. use pam && newpamd "${FILESDIR}"/${PN}.pamd ${PN}
  35. }
  36. pkg_postinst() {
  37. elog "Sample configurations are available at:"
  38. elog "http://mmonit.com/monit/documentation/"
  39. }