You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.4 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=aircrack-ng
  9. PKG_VERSION:=1.5.2
  10. PKG_RELEASE:=$(PKG_SOURCE_VERSION)
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_LICENSE_FILES:=LICENSE
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_URL:=https://github.com/aircrack-ng/aircrack-ng.git
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE_VERSION:=42f2b48d7f46b39e0d5d2f2a64cbf63f87416a70
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
  18. PKG_MIRROR_HASH:=17893e05278635675a77a3cb0927202ec4df2fc9a742689a7a88e4a8f27a69b6
  19. PKG_BUILD_PARALLEL:=1
  20. PKG_INSTALL:=1
  21. PKG_MAINTAINER:=Rick Farina <zerochaos@gentoo.org>
  22. PKG_FIXUP:=autoreconf
  23. PKG_CONFIG_DEPENDS:= \
  24. CONFIG_AIRCRACK_NG_GCRYPT \
  25. CONFIG_AIRCRACK_NG_OPENSSL \
  26. \
  27. CONFIG_AIRCRACK_NG_OPTIMIZE_SPEED \
  28. \
  29. CONFIG_AIRCRACK_NG_HWLOC \
  30. CONFIG_AIRCRACK_NG_SQLITE3
  31. include $(INCLUDE_DIR)/uclibc++.mk
  32. include $(INCLUDE_DIR)/package.mk
  33. define Package/aircrack-ng
  34. SECTION:=net
  35. CATEGORY:=Network
  36. DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread $(CXX_DEPENDS)
  37. DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
  38. DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
  39. DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
  40. DEPENDS += +libnl-core +libnl-genl +zlib
  41. TITLE:=WLAN tools (without airmon-ng) for breaking 802.11 WEP/WPA keys
  42. URL:=https://www.aircrack-ng.org/
  43. SUBMENU:=Wireless
  44. endef
  45. define Package/aircrack-ng/description
  46. WLAN tools for breaking 802.11 WEP/WPA keys
  47. endef
  48. define Package/aircrack-ng/config
  49. source "$(SOURCE)/Config.in"
  50. endef
  51. define Package/airmon-ng
  52. SECTION:=net
  53. CATEGORY:=Network
  54. DEPENDS:=+wireless-tools +ethtool +procps-ng +CONFIG_PCI_SUPPORT:pciutils +CONFIG_USB_SUPPORT:usbutils
  55. TITLE:=Bash script designed to turn wireless cards into monitor mode.
  56. URL:=http://www.aircrack-ng.org/
  57. SUBMENU:=Wireless
  58. endef
  59. define Package/airmon-ng/description
  60. Bash script designed to turn wireless cards into monitor mode.
  61. endef
  62. define Build/Prepare
  63. $(call Build/Prepare/Default)
  64. echo "$(PKG_VERSION)_rev$(PKG_SOURCE_VERSION)" > $(PKG_BUILD_DIR)/VERSION
  65. endef
  66. CONFIGURE_ARGS += \
  67. --disable-silent-rules \
  68. --enable-shared \
  69. --with-experimental \
  70. --with-libpcap-include=$(STAGING_DIR)/usr/include \
  71. --with-libpcap-lib=$(STAGING_DIR)/usr/lib \
  72. --without-opt \
  73. \
  74. PYTHON=$(PYTHON) \
  75. \
  76. $(if $(CONFIG_AIRCRACK_NG_OPENSSL),,--without-openssl) \
  77. $(if $(CONFIG_AIRCRACK_NG_GCRYPT),--with-gcrypt,--without-gcrypt) \
  78. $(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \
  79. $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3=$(STAGING_DIR)/usr,--without-sqlite3)
  80. TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections
  81. ifeq ($(CONFIG_AIRCRACK_NG_OPTIMIZE_SPEED),y)
  82. TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
  83. endif
  84. TARGET_LDFLAGS+= \
  85. -Wl,--gc-sections
  86. define Package/aircrack-ng/install
  87. $(INSTALL_DIR) $(1)/usr/bin
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  89. $(INSTALL_DIR) $(1)/usr/sbin
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  91. $(INSTALL_DIR) $(1)/usr/lib
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  93. rm -f $(1)/usr/sbin/airmon-ng
  94. endef
  95. define Package/airmon-ng/install
  96. $(INSTALL_DIR) $(1)/usr/sbin
  97. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/airmon-ng $(1)/usr/sbin/
  98. endef
  99. $(eval $(call BuildPackage,aircrack-ng))
  100. $(eval $(call BuildPackage,airmon-ng))