iptraf-ng-1.1.4-r1.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="A console-based network monitoring utility"
  6. HOMEPAGE="http://fedorahosted.org/iptraf-ng/"
  7. SRC_URI="http://fedorahosted.org/releases/${PN:0:1}/${PN:1:1}/${PN}/${P}.tar.gz"
  8. LICENSE="GPL-2 doc? ( FDL-1.1 )"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
  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. epatch "${FILESDIR}"/${P}-tcplog_flowrate_msg.patch
  36. }
  37. # configure does not do very much we do not already control
  38. src_configure() { :; }
  39. src_compile() {
  40. tc-export CC
  41. CFLAGS+=' -DLOCKDIR=\"/run/lock/iptraf-ng\"'
  42. default
  43. }
  44. src_install() {
  45. dosbin {iptraf,rvnamed}-ng
  46. doman src/*.8
  47. dodoc AUTHORS CHANGES FAQ README* RELEASE-NOTES
  48. use doc && dohtml -a gif,html,png -r Documentation/*
  49. keepdir /var/{lib,log}/iptraf-ng #376157
  50. }