aboutsummaryrefslogtreecommitdiff
path: root/net/spoofer/Makefile
blob: 1cb4a1e7b2fa91f6945ee3f57e0b06009c214011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#
# Copyright (C) 2018-2020 The Regents of the University of California
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=spoofer
PKG_VERSION:=1.4.8
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.caida.org/projects/spoofer/downloads
PKG_HASH:=9e94810b8b84db6005d78bd1db13d7f4c1307e50c28824e27e0629c5abfd317c

PKG_MAINTAINER:=Ken Keys <spoofer-info@caida.org>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=protobuf/host

include $(INCLUDE_DIR)/package.mk

define Package/spoofer
  SECTION:=net
  CATEGORY:=Network
  TITLE:=Measure your ISP's resistance to spoofed IP packets
  URL:=https://spoofer.caida.org/
  DEPENDS:=+protobuf-lite +libpcap +libpthread +libopenssl
endef

define Package/spoofer/description
The spoofer client is part of a system to measure the Internet's
resistance to packets with a spoofed (forged) source IP address.

This package comes bundled with small certificate files that allow
secure communication with the spoofer server without depending on
the large ca-certificates package.  But if the server's private
certificate ever changes, it will be necessary to either install the
ca-certificates package or install an updated version of this package
that has a newer bundled certificate.

endef

CONFIGURE_ARGS += \
	--enable-prober \
	--disable-manager

CONFIGURE_VARS += \
	PROTOC=$(STAGING_DIR_HOSTPKG)/bin/protoc

define Package/spoofer/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin//spoofer-prober $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt-files/spoofer $(1)/usr/bin
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt-files/initscript $(1)/etc/init.d/spoofer
	$(INSTALL_DIR) $(1)/usr/share/spoofer
	$(INSTALL_DATA) $(PKG_BUILD_DIR)/gd_bundle.crt $(1)/usr/share/spoofer
	$(INSTALL_DATA) $(PKG_BUILD_DIR)/letsencrypt_bundle.pem.txt $(1)/usr/share/spoofer
	$(INSTALL_DATA) $(PKG_BUILD_DIR)/openwrt-files/spoofer-lib.sh $(1)/usr/share/spoofer
endef

$(eval $(call BuildPackage,spoofer))