-
Notifications
You must be signed in to change notification settings - Fork 34
/
Makefile
64 lines (51 loc) · 1.44 KB
/
Makefile
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
include $(TOPDIR)/rules.mk
PKG_SOURCE_URL:=https://github.com/MuJJus/n2n
PKG_SOURCE_VERSION:=8347c66
PKG_NAME:=n2n
PKG_VERSION:=2.1_git$(PKG_SOURCE_VERSION)
PKG_RELEASE:=1
PKG_LICENSE:=GPLv3
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
PKG_SOURCE_PROTO:=git
include $(INCLUDE_DIR)/package.mk
define Package/n2n/Default
SECTION:=net
CATEGORY:=Network
TITLE:=N2N VPN tunneling daemon(V2)
URL:=http://www.ntop.org/n2n/
SUBMENU:=VPN
DEPENDS:=+kmod-tun +resolveip
endef
define Package/n2n-edge
$(call Package/n2n/Default)
endef
define Package/n2n-supernode
$(call Package/n2n/Default)
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
INSTALL_PROG=":"
endef
define Package/n2n-edge/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/edge $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/lib/netifd/proto
$(INSTALL_BIN) ./files/n2n.sh $(1)/lib/netifd/proto
endef
define Package/n2n-supernode/conffiles
/etc/config/n2n
endef
define Package/n2n-supernode/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/supernode $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/n2n.init $(1)/etc/init.d/n2n
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DATA) ./files/n2n.config $(1)/etc/config/n2n
endef
$(eval $(call BuildPackage,n2n-edge))
$(eval $(call BuildPackage,n2n-supernode))