forked from liuran001/openwrt-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
88 lines (65 loc) · 1.64 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#
# Copyright (C) 2019 OpenWrt.org
#
# KFERMercer <[email protected]>
#
# This is free software, licensed under the GNU General Public License v3.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=baidupcs-web
PKG_VERSION:=3.7.1
PKG_RELEASE:=2
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=net
CATEGORY:=Network
TITLE:=BaiduPCS-Web is a web controller for BaiduPCS-Go
URL:=https://github.com/Erope/baidupcs-web
endef
define Package/$(PKG_NAME)/description
BaiduPCS-Web is a web controller for BaiduPCS-Go
endef
# 禁止OpenWrt对二进制文件进行strip
STRIP:=true
ifeq ($(ARCH),i386)
PKG_ARCH_BAIDUPCS-WEB:=386
endif
ifeq ($(ARCH),x86_64)
PKG_ARCH_BAIDUPCS-WEB:=amd64
endif
ifeq ($(ARCH),mipsel)
PKG_ARCH_BAIDUPCS-WEB:=mipsle
endif
ifeq ($(ARCH),mips)
PKG_ARCH_BAIDUPCS-WEB:=mipsle
endif
ifeq ($(ARCH),arm)
ifeq ($(BOARD),bcm53xx)
PKG_ARCH_BAIDUPCS-WEB:=armv5
else ifeq ($(BOARD),kirkwood)
PKG_ARCH_BAIDUPCS-WEB:=armv5
else
PKG_ARCH_BAIDUPCS-WEB:=armv7
endif
endif
ifeq ($(ARCH),aarch64)
PKG_ARCH_BAIDUPCS-WEB:=arm64
endif
PKG_SOURCE:=BaiduPCS-Go-v$(PKG_VERSION)-linux-$(PKG_ARCH_BAIDUPCS-WEB).zip
PKG_SOURCE_URL:=https://github.com/coolsnowwolf/baidupcs-web/raw/master/
UNZIP_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)-unzip
PKG_HASH:=skip
define Build/Prepare
mkdir -vp $(UNZIP_DIR)
unzip -od $(UNZIP_DIR) $(DL_DIR)/$(PKG_SOURCE)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(UNZIP_DIR)/*/BaiduPCS-Go $(1)/usr/bin/$(PKG_NAME)
chmod 755 $(1)/usr/bin/$(PKG_NAME)
endef
$(eval $(call BuildPackage,$(PKG_NAME)))