-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
57 lines (47 loc) · 1.93 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
include $(TOPDIR)/rules.mk
PKG_NAME:=natmap
PKG_VERSION:=20240813
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/heiher/natmap/releases/download/$(PKG_VERSION)
PKG_HASH:=2fd89d286b19b9235d5e3477699c3752911bc5e80840ea1ed6930bfe98f47248
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=License
PKG_BUILD_FLAGS:=no-mips16
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/natmap
SECTION:=net
CATEGORY:=Network
TITLE:=TCP/UDP port mapping tool for full cone NAT
URL:=https://github.com/heiher/natmap
DEPENDS:=+jq +curl
endef
MAKE_FLAGS += REV_ID="$(PKG_VERSION)"
define Package/natmap/conffiles
/etc/config/natmap
endef
define Package/natmap/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/natmap $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/lib/natmap/
$(INSTALL_BIN) ./files/natmap-update.sh $(1)/usr/lib/natmap/update.sh
$(INSTALL_BIN) ./files/natmap-notify.sh $(1)/usr/lib/natmap/notify.sh
$(INSTALL_BIN) ./files/natmap-forward.sh $(1)/usr/lib/natmap/forward.sh
$(INSTALL_DIR) $(1)/usr/lib/natmap/plugin-notify
$(INSTALL_BIN) ./files/telegram_bot.sh $(1)/usr/lib/natmap/plugin-notify
$(INSTALL_BIN) ./files/pushplus.sh $(1)/usr/lib/natmap/plugin-notify
$(INSTALL_DIR) $(1)/usr/lib/natmap/plugin
$(INSTALL_BIN) ./files/qb.sh $(1)/usr/lib/natmap/plugin
$(INSTALL_BIN) ./files/tr.sh $(1)/usr/lib/natmap/plugin
$(INSTALL_BIN) ./files/emby.sh $(1)/usr/lib/natmap/plugin
$(INSTALL_BIN) ./files/cloudflare_origin_rule.sh $(1)/usr/lib/natmap/plugin
$(INSTALL_BIN) ./files/cloudflare_redirect_rule.sh $(1)/usr/lib/natmap/plugin
$(INSTALL_BIN) ./files/proxy_port.sh $(1)/usr/lib/natmap/plugin
$(INSTALL_DIR) $(1)/etc/config/
$(INSTALL_CONF) ./files/natmap.config $(1)/etc/config/natmap
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) ./files/natmap.init $(1)/etc/init.d/natmap
endef
$(eval $(call BuildPackage,natmap))