phantap: update to latest commit
[feed/packages.git] / net / phantap / Makefile
1 # Copyright (C) 2019 Diana Dragusin <diana.dragusin@nccgroup.com>
2 # Copyright (C) 2019 Etienne Champetier <champetier.etienne@gmail.com>
3 #
4 # This is free software, licensed under the GNU General Public License v3.
5 # See <http://www.gnu.org/licenses/> for more information.
6
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=phantap
10 PKG_RELEASE:=1
11
12 PKG_SOURCE_PROTO:=git
13 PKG_SOURCE_URL:=https://github.com/nccgroup/phantap
14 PKG_MIRROR_HASH:=01723a955e975b877f35924d3b5bfa53251f8928abe4657de0ed4c4943d9510c
15 PKG_SOURCE_DATE:=2020.02.09
16 PKG_SOURCE_VERSION:=fb3be84b4f4e081c35b7d0caa977bc659c02f8f1
17
18 PKG_MAINTAINER:=Diana Dragusin <diana.dragusin@nccgroup.com>, \
19 Etienne Champetier <champetier.etienne@gmail.com>
20 PKG_LICENSE:=GPL-3.0-only
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/cmake.mk
24
25 CMAKE_SOURCE_SUBDIR:=src
26
27 define Package/phantap/Default
28 SECTION:=net
29 CATEGORY:=Network
30 URL:=https://github.com/nccgroup/phantap
31 endef
32
33 define Package/phantap
34 $(call Package/phantap/Default)
35 TITLE:=PhanTap
36 PKGARCH:=all
37 DEPENDS:=+ebtables +libpcap +libnl-tiny +ip-full +kmod-br-netfilter +kmod-ebtables-ipv4
38 endef
39
40 define Package/phantap/conffiles
41 /etc/config/phantap
42 endef
43
44 define Package/phantap/description
45 PhanTap or Phantom tap is a small set of scripts and C code that allow you to setup a
46 network tap that automatically impersonate a victim device, allowing you to access
47 internet using the IP & MAC of the victim.
48 endef
49
50 define Package/phantap/install
51 $(INSTALL_DIR) $(1)/etc/config
52 $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/config/phantap $(1)/etc/config/
53 $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
54 $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/hotplug.d/iface/00-phantap $(1)/etc/hotplug.d/iface/
55 $(INSTALL_DIR) $(1)/etc/hotplug.d/net
56 $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/hotplug.d/net/00-phantap $(1)/etc/hotplug.d/net/
57 $(INSTALL_DIR) $(1)/etc/init.d
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/phantap $(1)/etc/init.d/
59 $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/phantap-early $(1)/etc/init.d/
60 $(INSTALL_DIR) $(1)/etc/sysctl.d
61 $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/sysctl.d/12-phantap.conf $(1)/etc/sysctl.d/
62 $(INSTALL_DIR) $(1)/usr/sbin
63 $(INSTALL_BIN) $(PKG_BUILD_DIR)/phantap-learn $(1)/usr/sbin/
64 endef
65
66 $(eval $(call BuildPackage,phantap))