-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (62 loc) · 1.67 KB
/
Makefile
File metadata and controls
73 lines (62 loc) · 1.67 KB
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-2021 honwen <https://github.com/tianlichunhong>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=xray-plugin
PKG_VERSION:=1.4.2
PKG_RELEASE:=20210402
PKG_MAINTAINER:=tianlichunhong <https://github.com/tianlichunhong>
# 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:=xray-plugin-linux-$(PKG_ARCH)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/teddysun/xray-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/xray-plugin
SECTION:=net
CATEGORY:=Network
TITLE:=SIP003 plugin for shadowsocks, based on xray
URL:=https://github.com/teddysun/xray-plugin
endef
define Package/xray-plugin/description
Yet another SIP003 plugin for shadowsocks, based on xray
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/xray-plugin/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/xray-plugin_linux_$(BIN_ARCH) $(1)/usr/bin/xray-plugin
endef
$(eval $(call BuildPackage,xray-plugin))