wepattack-0.1.3-r3.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. MY_P="WepAttack-${PV}"
  6. DESCRIPTION="WLAN tool for breaking 802.11 WEP keys"
  7. HOMEPAGE="http://wepattack.sourceforge.net/"
  8. SRC_URI="mirror://sourceforge/wepattack/${MY_P}.tar.gz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE="john"
  13. DEPEND="
  14. dev-libs/openssl
  15. net-libs/libpcap
  16. sys-libs/zlib
  17. "
  18. RDEPEND="${DEPEND}
  19. john? ( app-crypt/johntheripper )"
  20. S="${WORKDIR}/${MY_P}"
  21. src_prepare() {
  22. epatch "${FILESDIR}"/${P}-filter-mac-address.patch
  23. epatch "${FILESDIR}"/${P}-missed-string.h-warnings-fix.patch
  24. chmod +x src/wlan
  25. sed -i \
  26. -e "/^CFLAGS=/s:=:=${CFLAGS} :" \
  27. -e 's:-fno-for-scope::g' \
  28. -e "/^CC=/s:gcc:$(tc-getCC):" \
  29. -e "/^LD=/s:gcc:$(tc-getCC):" \
  30. -e 's:log.o\\:log.o \\:' \
  31. src/Makefile || die
  32. sed -i \
  33. -e "s/wordfile:/-wordlist=/" \
  34. run/wepattack_word || die
  35. }
  36. src_compile() {
  37. emake -C src
  38. }
  39. src_install() {
  40. dobin src/wepattack
  41. if use john; then
  42. dosbin run/wepattack_{inc,word}
  43. insinto /etc
  44. doins "${FILESDIR}"/wepattack.conf
  45. fi
  46. dodoc README
  47. }