tenshi-0.12.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  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. epatch "${FILESDIR}/${PN}-create-mandir.patch"
  21. epatch "${FILESDIR}/${PN}-openrc-init.patch" #218042
  22. epatch "${FILESDIR}/${PN}-openrc-init-r1.patch" #398987
  23. # Fix for bug #241254
  24. sed -i 's:^docdir =.*:docdir = /usr/share/doc/${PF}:' \
  25. Makefile || die "docdir substitution failed"
  26. }
  27. src_install() {
  28. emake DESTDIR="${D}" install
  29. fowners tenshi:root /etc/tenshi/tenshi.conf
  30. dodir /var/lib/tenshi
  31. fowners tenshi:root /var/lib/tenshi
  32. doman tenshi.8
  33. newinitd tenshi.gentoo-init tenshi
  34. keepdir /var/lib/tenshi
  35. }
  36. pkg_postinst() {
  37. ewarn "The sample config installed to ${ROOT}etc/tenshi/tenshi.conf"
  38. ewarn "monitors /var/log/messages which, by default, can not be read"
  39. ewarn "by the tenshi user. Make sure that the tenshi user has read"
  40. ewarn "permission on all the files that you want tenshi to monitor."
  41. }