tenshi-0.15.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils user
  5. DESCRIPTION="Log parsing and notification program"
  6. HOMEPAGE="http://dev.inversepath.com/trac/tenshi"
  7. SRC_URI="http://dev.inversepath.com/tenshi/${P}.tar.gz"
  8. LICENSE="ISC"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~ppc ~x86"
  11. IUSE=""
  12. RDEPEND="dev-lang/perl
  13. dev-perl/IO-BufferedSelect
  14. sys-apps/coreutils"
  15. pkg_setup() {
  16. enewgroup tenshi
  17. enewuser tenshi -1 -1 /var/lib/tenshi tenshi
  18. }
  19. src_prepare() {
  20. # Fix for bug #241254
  21. sed -i 's:^docdir =.*:docdir = /usr/share/doc/${PF}:' \
  22. Makefile || die "docdir substitution failed"
  23. }
  24. src_install() {
  25. emake DESTDIR="${D}" install
  26. fowners tenshi:root /etc/tenshi/tenshi.conf
  27. dodir /var/lib/tenshi
  28. fowners tenshi:root /var/lib/tenshi
  29. doman tenshi.8
  30. newinitd tenshi.gentoo-init tenshi
  31. keepdir /var/lib/tenshi
  32. }
  33. cpkg_postinst() {
  34. ewarn "The sample config installed to ${ROOT}etc/tenshi/tenshi.conf"
  35. ewarn "monitors /var/log/messages which, by default, can not be read"
  36. ewarn "by the tenshi user. Make sure that the tenshi user has read"
  37. ewarn "permission on all the files that you want tenshi to monitor."
  38. }