-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathMakefile
executable file
·73 lines (62 loc) · 1.66 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
65
66
67
68
69
70
71
72
73
#
# Copyright (C) 2018-2025 honwen <https://github.com/honwen>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-plugin
PKG_VERSION:=5.25.0
PKG_RELEASE:=20250118
PKG_MAINTAINER:=honwen <https://github.com/honwen>
# OpenWrt ARCH: arm, i386, x86_64, mips, mipsel
# Golang ARCH: arm[5-7], 386, amd64, mips, mipsle
PKG_ARCH:=$(ARCH)
BIN_ARCH:=$(ARCH)
ifeq ($(ARCH),mips)
BIN_ARCH:=mips_sf
endif
ifeq ($(ARCH),mipsel)
PKG_ARCH:=mips
BIN_ARCH:=mipsle_sf
endif
ifeq ($(ARCH),i386)
PKG_ARCH:=386
BIN_ARCH:=386
endif
ifeq ($(ARCH),x86_64)
PKG_ARCH:=amd64
BIN_ARCH:=amd64
endif
ifeq ($(ARCH),aarch64)
PKG_ARCH:=arm64
BIN_ARCH:=arm64
endif
ifeq ($(ARCH),arm)
BIN_ARCH:=arm7
endif
PKG_SOURCE:=v2ray-plugin-linux-$(PKG_ARCH)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/teddysun/v2ray-plugin/releases/download/v$(PKG_VERSION)/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/v2ray-plugin
SECTION:=net
CATEGORY:=Network
TITLE:=SIP003 plugin for shadowsocks, based on v2ray
URL:=https://github.com/shadowsocks/v2ray-plugin
endef
define Package/v2ray-plugin/description
Yet another SIP003 plugin for shadowsocks, based on v2ray
endef
define Build/Prepare
gzip -dc "$(DL_DIR)/$(PKG_SOURCE)" | tar -C $(PKG_BUILD_DIR)/ -xf -
endef
define Build/Compile
echo "$(PKG_NAME)Compile Skipped!"
endef
define Package/v2ray-plugin/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/v2ray-plugin_linux_$(BIN_ARCH) $(1)/usr/bin/v2ray-plugin
endef
$(eval $(call BuildPackage,v2ray-plugin))