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.

142 lines
3.5 KiB

  1. #
  2. # Copyright (C) 2006-2014 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:=6.47
  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:=edfe81f6763223c0a29bfa15a8526e2a
  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. CONFIGURE_VARS += CXXFLAGS="$$$$CXXFLAGS -fno-builtin"
  76. ifeq ($(BUILD_VARIANT),ssl)
  77. CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr"
  78. else
  79. CONFIGURE_ARGS += --without-openssl
  80. endif
  81. define Package/nmap/install
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
  84. $(INSTALL_DIR) $(1)/usr/share/nmap
  85. $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
  86. endef
  87. define Package/nmap-ssl/install
  88. $(INSTALL_DIR) $(1)/usr/bin
  89. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmap $(1)/usr/bin/
  90. $(INSTALL_DIR) $(1)/usr/share/nmap
  91. $(CP) $(PKG_INSTALL_DIR)/usr/share/nmap/* $(1)/usr/share/nmap/
  92. endef
  93. define Package/ncat/install
  94. $(INSTALL_DIR) $(1)/usr/bin
  95. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
  96. endef
  97. define Package/ncat-ssl/install
  98. $(INSTALL_DIR) $(1)/usr/bin
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ncat $(1)/usr/bin/
  100. $(INSTALL_DIR) $(1)/usr/share/ncat
  101. $(CP) $(PKG_INSTALL_DIR)/usr/share/ncat/ca-bundle.crt $(1)/usr/share/ncat/
  102. endef
  103. define Package/ndiff/install
  104. $(INSTALL_DIR) $(1)/usr/bin
  105. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ndiff $(1)/usr/bin/
  106. endef
  107. define Package/nping/install
  108. $(INSTALL_DIR) $(1)/usr/bin
  109. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nping $(1)/usr/bin/
  110. endef
  111. $(eval $(call BuildPackage,nmap))
  112. $(eval $(call BuildPackage,nmap-ssl))
  113. $(eval $(call BuildPackage,ncat))
  114. $(eval $(call BuildPackage,ncat-ssl))
  115. $(eval $(call BuildPackage,nping))
  116. $(eval $(call BuildPackage,ndiff))