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.

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