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.

143 lines
3.5 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. #TODO
  7. #
  8. # * uClibcpp not supported, performance +100x slower. libstdcpp is being used. https://bugs.busybox.net/show_bug.cgi?id=2545
  9. # * liblua is still not recognized/blindly accepted. Impossible to compile with support
  10. #
  11. include $(TOPDIR)/rules.mk
  12. PKG_NAME:=nmap
  13. PKG_VERSION:=7.00
  14. PKG_RELEASE:=1
  15. PKG_MAINTAINER=Nuno Goncalves <nunojpg@gmail.com>
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  17. PKG_SOURCE_URL:=http://nmap.org/dist/
  18. PKG_MD5SUM:=6cdf5d03cc3294b99d69dfca83f2f2ee
  19. PKG_LICENSE:=GPL-2.0
  20. PKG_LICENSE_FILES:=COPYING
  21. PKG_INSTALL:=1
  22. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  23. include $(INCLUDE_DIR)/package.mk
  24. NMAP_DEPENDS:=+libpcap +libstdcpp
  25. NCAT_DEPENDS:=+libpcap
  26. NPING_DEPENDS:=+libpcap +libpthread +libstdcpp
  27. NDIFF_DEPENDS:=+python
  28. define Package/nmap/default
  29. SUBMENU:=NMAP Suite
  30. SECTION:=net
  31. CATEGORY:=Network
  32. URL:=http://nmap.org/
  33. endef
  34. define Package/nmap
  35. $(call Package/nmap/default)
  36. DEPENDS:=$(NMAP_DEPENDS)
  37. VARIANT:=nossl
  38. TITLE:=Utility for network exploration or security auditing
  39. endef
  40. define Package/nmap-ssl
  41. $(call Package/nmap/default)
  42. DEPENDS:=$(NMAP_DEPENDS) +libopenssl
  43. VARIANT:=ssl
  44. TITLE:=Nmap (with OpenSSL support)
  45. endef
  46. define Package/ncat
  47. $(call Package/nmap/default)
  48. DEPENDS:=$(NCAT_DEPENDS)
  49. VARIANT:=nossl
  50. TITLE:=Much-improved reimplementation of Netcat
  51. endef
  52. define Package/ncat-ssl
  53. $(call Package/nmap/default)
  54. DEPENDS:=$(NCAT_DEPENDS) +libopenssl
  55. VARIANT:=ssl
  56. TITLE:=Ncat (with OpenSSL support)
  57. endef
  58. define Package/nping
  59. $(call Package/nmap/default)
  60. DEPENDS:=$(NPING_DEPENDS)
  61. VARIANT:=nossl
  62. TITLE:=Network packet generation tool / ping utility
  63. endef
  64. define Package/ndiff
  65. $(call Package/nmap/default)
  66. DEPENDS:=$(NDIFF_DEPENDS)
  67. VARIANT:=nossl
  68. TITLE:=Utility to compare the results of Nmap scans
  69. endef
  70. CONFIGURE_ARGS += \
  71. --with-libdnet=included \
  72. --with-libpcre=included \
  73. --with-libpcap="$(STAGING_DIR)/usr" \
  74. --without-liblua \
  75. --without-zenmap
  76. CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-builtin"
  77. ifeq ($(BUILD_VARIANT),ssl)
  78. CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr"
  79. else
  80. CONFIGURE_ARGS += --without-openssl
  81. endif
  82. define Package/nmap/install
  83. $(INSTALL_DIR) $(1)/usr/bin
  84. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
  85. $(INSTALL_DIR) $(1)/usr/share/nmap
  86. $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
  87. endef
  88. define Package/nmap-ssl/install
  89. $(INSTALL_DIR) $(1)/usr/bin
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
  91. $(INSTALL_DIR) $(1)/usr/share/nmap
  92. $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
  93. endef
  94. define Package/ncat/install
  95. $(INSTALL_DIR) $(1)/usr/bin
  96. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
  97. endef
  98. define Package/ncat-ssl/install
  99. $(INSTALL_DIR) $(1)/usr/bin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
  101. $(INSTALL_DIR) $(1)/usr/share/ncat
  102. $(CP) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/
  103. endef
  104. define Package/ndiff/install
  105. $(INSTALL_DIR) $(1)/usr/bin
  106. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/
  107. endef
  108. define Package/nping/install
  109. $(INSTALL_DIR) $(1)/usr/bin
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nping $(1)/usr/bin/
  111. endef
  112. $(eval $(call BuildPackage,nmap))
  113. $(eval $(call BuildPackage,nmap-ssl))
  114. $(eval $(call BuildPackage,ncat))
  115. $(eval $(call BuildPackage,ncat-ssl))
  116. $(eval $(call BuildPackage,nping))
  117. $(eval $(call BuildPackage,ndiff))