2023-04-27 11:32:17 +08:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#
|
2023-09-08 02:10:38 +08:00
|
|
|
# Copyright (C) 2021-2023 ImmortalWrt.org
|
2023-04-27 11:32:17 +08:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=v2ray-geodata
|
2023-09-08 02:10:38 +08:00
|
|
|
PKG_RELEASE:=2
|
2023-04-27 11:32:17 +08:00
|
|
|
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2023-09-28 20:16:03 +08:00
|
|
|
GEOIP_VER:=202309280037
|
2023-04-27 11:32:17 +08:00
|
|
|
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
|
|
|
|
define Download/geoip
|
|
|
|
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
|
|
|
|
URL_FILE:=geoip.dat
|
|
|
|
FILE:=$(GEOIP_FILE)
|
2023-09-28 20:16:03 +08:00
|
|
|
HASH:=32ce0b6333d03234ad8c43c3c91645cb28fca4f6176e69f4d08bbbc7ea7b7835
|
2023-04-27 11:32:17 +08:00
|
|
|
endef
|
|
|
|
|
2023-10-01 20:14:45 +08:00
|
|
|
GEOSITE_VER:=20231001063004
|
2023-04-27 11:32:17 +08:00
|
|
|
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
|
|
|
|
define Download/geosite
|
|
|
|
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
|
|
|
|
URL_FILE:=dlc.dat
|
|
|
|
FILE:=$(GEOSITE_FILE)
|
2023-10-01 20:14:45 +08:00
|
|
|
HASH:=c126f8c26d17ca67080203619cdad3b613f8ada52b99253ac145e5ecd78e30e9
|
2023-04-27 11:32:17 +08:00
|
|
|
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/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
|
|
|
|
|
2023-09-08 02:10:38 +08:00
|
|
|
$(eval $(call Download,geoip))
|
|
|
|
$(eval $(call Download,geosite))
|
2023-04-27 11:32:17 +08:00
|
|
|
$(eval $(call BuildPackage,v2ray-geoip))
|
|
|
|
$(eval $(call BuildPackage,v2ray-geosite))
|