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.

119 lines
3.3 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:=1
  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)/uclibc++.mk
  30. include $(INCLUDE_DIR)/package.mk
  31. define Package/aircrack-ng
  32. SECTION:=net
  33. CATEGORY:=Network
  34. DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread $(CXX_DEPENDS)
  35. DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
  36. DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
  37. DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
  38. DEPENDS += +libnl-core +libnl-genl +zlib
  39. TITLE:=WLAN tools (without airmon-ng) for breaking 802.11 WEP/WPA keys
  40. URL:=https://www.aircrack-ng.org/
  41. SUBMENU:=Wireless
  42. endef
  43. define Package/aircrack-ng/description
  44. WLAN tools for breaking 802.11 WEP/WPA keys
  45. endef
  46. define Package/aircrack-ng/config
  47. source "$(SOURCE)/Config.in"
  48. endef
  49. define Package/airmon-ng
  50. SECTION:=net
  51. CATEGORY:=Network
  52. DEPENDS:=+wireless-tools +ethtool +procps-ng +CONFIG_PCI_SUPPORT:pciutils +CONFIG_USB_SUPPORT:usbutils
  53. TITLE:=Bash script designed to turn wireless cards into monitor mode.
  54. URL:=http://www.aircrack-ng.org/
  55. SUBMENU:=Wireless
  56. endef
  57. define Package/airmon-ng/description
  58. Bash script designed to turn wireless cards into monitor mode.
  59. endef
  60. define Build/Prepare
  61. $(call Build/Prepare/Default)
  62. echo "$(PKG_VERSION)_rev$(PKG_SOURCE_VERSION)" > $(PKG_BUILD_DIR)/VERSION
  63. endef
  64. CONFIGURE_ARGS += \
  65. --disable-silent-rules \
  66. --enable-shared \
  67. --with-experimental \
  68. --with-libpcap-include=$(STAGING_DIR)/usr/include \
  69. --with-libpcap-lib=$(STAGING_DIR)/usr/lib \
  70. --without-opt \
  71. \
  72. PYTHON=$(PYTHON) \
  73. \
  74. $(if $(CONFIG_AIRCRACK_NG_OPENSSL),,--without-openssl) \
  75. $(if $(CONFIG_AIRCRACK_NG_GCRYPT),--with-gcrypt,--without-gcrypt) \
  76. $(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \
  77. $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3=$(STAGING_DIR)/usr,--without-sqlite3)
  78. TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections
  79. ifeq ($(CONFIG_AIRCRACK_NG_OPTIMIZE_SPEED),y)
  80. TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
  81. endif
  82. TARGET_LDFLAGS+= \
  83. -Wl,--gc-sections
  84. define Package/aircrack-ng/install
  85. $(INSTALL_DIR) $(1)/usr/bin
  86. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  87. $(INSTALL_DIR) $(1)/usr/sbin
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  91. rm -f $(1)/usr/sbin/airmon-ng
  92. endef
  93. define Package/airmon-ng/install
  94. $(INSTALL_DIR) $(1)/usr/sbin
  95. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/airmon-ng $(1)/usr/sbin/
  96. endef
  97. $(eval $(call BuildPackage,aircrack-ng))
  98. $(eval $(call BuildPackage,airmon-ng))