airtraf-1.1-r3.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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="AirTraf 802.11b Wireless traffic sniffer"
  6. LICENSE="GPL-2"
  7. HOMEPAGE="http://www.elixar.com/"
  8. SRC_URI="${HOMEPAGE}${P}.tar.gz"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. RDEPEND="
  12. net-libs/libpcap
  13. sys-libs/ncurses:=
  14. "
  15. DEPEND="
  16. ${RDEPEND}
  17. virtual/pkgconfig
  18. "
  19. src_prepare() {
  20. epatch \
  21. "${FILESDIR}"/${P}-sniffd.patch \
  22. "${FILESDIR}"/${P}-off-by-one.patch \
  23. "${FILESDIR}"/${P}-fprintf-format.patch
  24. sed -i \
  25. -e '/^LIBS/s|=.*|= $(shell $(PKG_CONFIG) --libs panel)|' \
  26. src/libncurses/Makefile || die
  27. sed -i \
  28. -e 's|-lpanel -lncurses|$(shell $(PKG_CONFIG) --libs ncurses panel)|' \
  29. src/sniffd/Makefile || die
  30. tc-export PKG_CONFIG
  31. }
  32. src_compile() {
  33. # parallel make (bug #297331)
  34. emake -C src -j1 \
  35. CC=$(tc-getCC) \
  36. CXX=$(tc-getCXX) \
  37. CFLAGS="${CFLAGS}" \
  38. CXXFLAGS="${CXXFLAGS}" \
  39. LDFLAGS="${LDFLAGS}" \
  40. || die
  41. }
  42. src_install () {
  43. dobin src/airtraf
  44. dodoc Authors COMPATIBILITY docs/airtraf_doc.html
  45. }