mirror of
https://github.com/kenzok8/small-package
synced 2025-01-09 19:47:46 +08:00
48 lines
1.4 KiB
Makefile
48 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-3.0-only
|
|
#
|
|
# Copyright (C) 2021 ImmortalWrt.org
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=CloudflareSpeedTest
|
|
PKG_VERSION:=2.0.3
|
|
PKG_RELEASE:=$(AUTORELEASE)
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=https://codeload.github.com/XIU2/CloudflareSpeedTest/tar.gz/v$(PKG_VERSION)?
|
|
PKG_HASH:=faee35e74a651717e903517369ea0bd67968ba22522a64a34040d9bcd3ca5879
|
|
|
|
PKG_LICENSE:=GPL-3.0-only
|
|
PKG_LICENSE_FILE:=LICENSE
|
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
|
|
PKG_BUILD_DEPENDS:=golang/host
|
|
PKG_BUILD_PARALLEL:=1
|
|
PKG_USE_MIPS16:=0
|
|
|
|
GO_PKG:=CloudflareSpeedTest
|
|
GO_PKG_LDFLAGS_X:=main.version=v$(PKG_VERSION)
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
|
|
|
define Package/cdnspeedtest
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
TITLE:=Getting the fastest ips to your network of CDN
|
|
URL:=https://github.com/XIU2/CloudflareSpeedTest
|
|
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
|
endef
|
|
|
|
define Package/cdnspeedtest/install
|
|
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/CloudflareSpeedTest $(1)/usr/bin/cdnspeedtest
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/CloudflareSpeedTest
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ip.txt $(1)/usr/share/CloudflareSpeedTest/
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/ipv6.txt $(1)/usr/share/CloudflareSpeedTest/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,cdnspeedtest))
|