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.

72 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2018 The Regents of the University of California
  3. #
  4. # This is free software, licensed under the GNU General Public License v3.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=spoofer
  9. PKG_VERSION:=1.3.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
  13. PKG_HASH:=376f9a4b2d0404de3c37df645672a954b4916ad56508fadfe3f99120e5b0f87e
  14. PKG_LICENSE:=GPL-3.0
  15. PKG_LICENSE_FILES:=LICENSE
  16. HOST_BUILD_DEPENDS:=protobuf/host
  17. include $(INCLUDE_DIR)/host-build.mk
  18. include $(INCLUDE_DIR)/package.mk
  19. $(eval $(call HostBuild))
  20. define Package/spoofer
  21. SECTION:=net
  22. CATEGORY:=Network
  23. TITLE:=Measure your ISP's resistance to spoofed IP packets
  24. URL:=https://spoofer.caida.org/
  25. MAINTAINER:=Ken Keys <spoofer-info@caida.org>
  26. DEPENDS:=+protobuf-lite +libpcap +libpthread +libopenssl
  27. endef
  28. define Package/spoofer/description
  29. The spoofer client is part of a system to measure the Internet's
  30. resistance to packets with a spoofed (forged) source IP address.
  31. This package comes bundled with a small certificate file that allows
  32. secure communication with the spoofer server without depending on
  33. the large ca-certificates package. But if the server's private
  34. certificate ever changes, it will be necessary to either install the
  35. ca-certificates package or install an updated version of this package
  36. that has a newer bundled certificate.
  37. endef
  38. CONFIGURE_ARGS += \
  39. --enable-prober \
  40. --disable-manager
  41. CONFIGURE_VARS += \
  42. PROTOC=$(STAGING_DIR_HOSTPKG)/bin/protoc
  43. EXTRA_CXXFLAGS += -std=gnu++14
  44. SPOOFER_SRC=$(PKG_BUILD_DIR)
  45. define Package/spoofer/install
  46. $(INSTALL_DIR) $(1)/usr/bin
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/prober/spoofer-prober $(1)/usr/bin
  48. $(INSTALL_BIN) $(SPOOFER_SRC)/openwrt-files/spoofer $(1)/usr/bin
  49. $(INSTALL_DIR) $(1)/etc/init.d
  50. $(INSTALL_BIN) $(SPOOFER_SRC)/openwrt-files/initscript $(1)/etc/init.d/spoofer
  51. $(INSTALL_DIR) $(1)/usr/share/spoofer
  52. $(INSTALL_DATA) $(SPOOFER_SRC)/gd_bundle.crt $(1)/usr/share/spoofer
  53. $(INSTALL_DATA) $(SPOOFER_SRC)/openwrt-files/spoofer-lib.sh $(1)/usr/share/spoofer
  54. endef
  55. $(eval $(call BuildPackage,spoofer))