Files
github-actions[bot] 9feb8ca7db v2ray-geosite: update to 202512202213 (#551)
Co-authored-by: smallprogram <smallprogram@foxmail.com>
2025-12-21 20:02:02 +08:00

80 lines
1.9 KiB
Makefile

# SPDX-License-Identifier: GPL-3.0-only
#
# Copyright (C) 2021-2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=v2ray-geodata
PKG_RELEASE:=1
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
GEOIP_VER:=202512180020
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
define Download/geoip
URL:=https://github.com/Loyalsoldier/geoip/releases/download/$(GEOIP_VER)/
URL_FILE:=geoip.dat
FILE:=$(GEOIP_FILE)
HASH:=63c20c159aeec8a13d61be9b89d0d1c82fecf4675f1c177db67e97477c89199d
endef
GEOSITE_VER:=202512202213
GEOSITE_FILE:=geosite.dat.$(GEOSITE_VER)
define Download/geosite
URL:=https://github.com/Loyalsoldier/v2ray-rules-dat/releases/download/$(GEOSITE_VER)/
URL_FILE:=geosite.dat
FILE:=$(GEOSITE_FILE)
HASH:=3f43687438bde815719ce0bcd9ed21c7fa807b69caa98ee1c7d6ed8954a8ff1a
endef
define Package/v2ray-geodata/template
SECTION:=net
CATEGORY:=Network
SUBMENU:=IP Addresses and Names
URL:=https://www.v2fly.org
PKGARCH:=all
endef
define Package/v2ray-geoip
$(call Package/v2ray-geodata/template)
TITLE:=GeoIP List for V2Ray
VERSION:=$(GEOIP_VER).$(PKG_RELEASE)
LICENSE:=CC-BY-SA-4.0
endef
define Package/v2ray-geosite
$(call Package/v2ray-geodata/template)
TITLE:=Geosite List for V2Ray
VERSION:=$(GEOSITE_VER).$(PKG_RELEASE)
LICENSE:=MIT
endef
define Build/Prepare
$(call Build/Prepare/Default)
ifneq ($(CONFIG_PACKAGE_v2ray-geoip),)
$(call Download,geoip)
endif
ifneq ($(CONFIG_PACKAGE_v2ray-geosite),)
$(call Download,geosite)
endif
endef
define Build/Compile
endef
define Package/v2ray-geoip/install
$(INSTALL_DIR) $(1)/usr/share/v2ray
$(INSTALL_DATA) $(DL_DIR)/$(GEOIP_FILE) $(1)/usr/share/v2ray/geoip.dat
endef
define Package/v2ray-geosite/install
$(INSTALL_DIR) $(1)/usr/share/v2ray
$(INSTALL_DATA) $(DL_DIR)/$(GEOSITE_FILE) $(1)/usr/share/v2ray/geosite.dat
endef
$(eval $(call BuildPackage,v2ray-geoip))
$(eval $(call BuildPackage,v2ray-geosite))