iptraf-ng-9999.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils git-r3 toolchain-funcs
  5. DESCRIPTION="A console-based network monitoring utility"
  6. HOMEPAGE="http://fedorahosted.org/iptraf-ng/"
  7. EGIT_REPO_URI="https://git.fedorahosted.org/git/iptraf-ng.git"
  8. LICENSE="GPL-2 doc? ( FDL-1.1 )"
  9. SLOT="0"
  10. KEYWORDS=""
  11. IUSE="doc"
  12. RESTRICT="test"
  13. RDEPEND="
  14. >=sys-libs/ncurses-5.7-r7:0=
  15. "
  16. DEPEND="
  17. ${RDEPEND}
  18. virtual/os-headers
  19. !net-analyzer/iptraf
  20. "
  21. src_prepare() {
  22. sed -i \
  23. -e '/^CC =/d' \
  24. -e '/^CFLAGS/s:= -g -O2:+= :' \
  25. -e '/^LDFLAGS =/d' \
  26. -e 's|$(QUIET_[[:alpha:]]*)||g' \
  27. Makefile || die
  28. sed -i \
  29. -e 's|IPTRAF|&-NG|g' \
  30. -e 's|IPTraf|&-NG|g' \
  31. -e 's|iptraf|&-ng|g' \
  32. -e 's|rvnamed|&-ng|g' \
  33. -e 's|RVNAMED|&-NG|g' \
  34. src/*.8 || die
  35. }
  36. # configure does not do very much we do not already control
  37. src_configure() { :; }
  38. src_compile() {
  39. tc-export CC
  40. CFLAGS+=' -DLOCKDIR=\"/run/lock/iptraf-ng\"'
  41. default
  42. }
  43. src_install() {
  44. dosbin {iptraf,rvnamed}-ng
  45. doman src/*.8
  46. dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES
  47. use doc && dohtml -a gif,html,png -r Documentation/*
  48. keepdir /var/{lib,log}/iptraf-ng #376157
  49. }