This repository has been archived by the owner on Dec 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
Makefile
64 lines (51 loc) · 1.48 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_NAME:=clash
PKG_VERSION:=0.16.3
PKG_MAINTAINER:=frainzy1477
ifeq ($(ARCH),mipsel)
PKG_ARCH:=mipsle
PKG_SOURCE:=clash-linux-$(PKG_ARCH)-softfloat-v$(PKG_VERSION).gz
endif
ifeq ($(ARCH),mips)
PKG_ARCH:=mips
PKG_SOURCE:=clash-linux-$(PKG_ARCH)-softfloat-v$(PKG_VERSION).gz
endif
ifeq ($(ARCH),x86_64)
PKG_ARCH:=amd64
PKG_SOURCE:=clash-linux-$(PKG_ARCH)-v$(PKG_VERSION).gz
endif
ifeq ($(ARCH),arm)
PKG_ARCH:=armv7
PKG_SOURCE:=clash-linux-$(PKG_ARCH)-v$(PKG_VERSION).gz
endif
ifeq ($(ARCH),aarch64)
PKG_ARCH:=armv8
PKG_SOURCE:=clash-linux-$(PKG_ARCH)-v$(PKG_VERSION).gz
endif
PKG_SOURCE_URL:=https://github.com/frainzy1477/clash_dev/releases/download/v$(PKG_VERSION)/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=2. Clash
TITLE:=clash is a cross-platform proxy software
DEPENDS:=
URL:=https://github.com/frainzy1477/clash_dev
endef
define Package/$(PKG_NAME)/description
clash is a cross-platform proxy software
endef
define Build/Prepare
gzip -dc "$(DL_DIR)/$(PKG_SOURCE)" > $(PKG_BUILD_DIR)/clash-linux-$(PKG_ARCH)
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/clash
$(INSTALL_DIR) $(1)/usr/share/clash
$(INSTALL_BIN) $(PKG_BUILD_DIR)/clash-linux-$(PKG_ARCH) $(1)/etc/clash/clash
$(INSTALL_BIN) ./file/core_version $(1)/usr/share/clash/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))