qmrtg-2.1-r1.ebuild 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. DESCRIPTION="A tool to analyze qmail activity with the goal to graph everything through MRTG"
  6. HOMEPAGE="http://dev.publicshout.org/qmrtg"
  7. SRC_URI="${HOMEPAGE}/download/${P}.tar.gz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="doc"
  12. RDEPEND="net-analyzer/mrtg"
  13. src_prepare() {
  14. sed -i \
  15. -e 's|^CFLAGS =|CFLAGS ?=|g' \
  16. analyzers/Makefile.in filters/Makefile.in || die
  17. epatch "${FILESDIR}"/mrtg.cfg.patch
  18. epatch "${FILESDIR}"/qmrtg.conf.sample.patch
  19. epatch "${FILESDIR}"/${P}-TAI_STR_LEN.patch
  20. }
  21. DOCS=( INSTALL.txt )
  22. src_install () {
  23. default
  24. keepdir /var/lib/qmrtg
  25. if use doc ; then
  26. docinto txt
  27. dodoc doc/*.txt
  28. docinto html
  29. dohtml -r html/*
  30. fi
  31. insinto /usr/share/qmrtg2
  32. doins examples/*
  33. }
  34. pkg_postinst () {
  35. elog
  36. elog "You need to configure manually qmrtg in order to run it."
  37. elog "The configuration templates in /usr/share/qmrtg2/ and"
  38. elog "the INSTALL file in /usr/share/doc/qmrtg-2.1/"
  39. elog "will be useful."
  40. elog
  41. }