1 # SPDX-License-Identifier: GPL-3.0-only
3 # Copyright (C) 2021-2022 ImmortalWrt.org
5 include $(TOPDIR
)/rules.mk
7 PKG_NAME
:=v2ray-geodata
8 PKG_RELEASE
:=$(AUTORELEASE
)
10 PKG_LICENSE_FILES
:=LICENSE
11 PKG_MAINTAINER
:=Tianling Shen
<cnsztl@immortalwrt.org
>
13 include $(INCLUDE_DIR
)/package.mk
15 GEOIP_VER
:=202208250104
16 GEOIP_FILE
:=geoip.dat.
$(GEOIP_VER
)
18 URL
:=https
://github.com
/v2fly
/geoip
/releases
/download
/$(GEOIP_VER
)/
21 HASH
:=8fadefdcbb973c5294f81a2142ffcfb0d138e6f8285e643f929d2fe035096075
24 GEOSITE_VER
:=20220829045350
25 GEOSITE_FILE
:=dlc.dat.
$(GEOSITE_VER
)
26 define Download
/geosite
27 URL
:=https
://github.com
/v2fly
/domain-list-community
/releases
/download
/$(GEOSITE_VER
)/
30 HASH
:=107a52601a94baf02fe0d877f0a0f469606c87b9a0df2b7569630004dcb8f86e
33 define Package
/v2ray-geodata
/template
36 SUBMENU
:=IP Addresses and Names
37 URL
:=https
://www.v2fly.org
41 define Package
/v2ray-geoip
42 $(call Package
/v2ray-geodata
/template
)
43 TITLE
:=GeoIP List for V2Ray
44 PROVIDES
:=v2ray-geodata xray-geodata xray-geoip
45 VERSION
:=$(GEOIP_VER
)-$(PKG_RELEASE
)
49 define Package
/v2ray-geosite
50 $(call Package
/v2ray-geodata
/template
)
51 TITLE
:=Geosite List for V2Ray
52 PROVIDES
:=v2ray-geodata xray-geodata xray-geosite
53 VERSION
:=$(GEOSITE_VER
)-$(PKG_RELEASE
)
58 $(call Build
/Prepare
/Default
)
59 ifneq ($(CONFIG_PACKAGE_v2ray-geoip
),)
60 $(call Download
,geoip
)
62 ifneq ($(CONFIG_PACKAGE_v2ray-geosite
),)
63 $(call Download
,geosite
)
70 define Package
/v2ray-geoip
/install
71 $(INSTALL_DIR
) $(1)/usr
/share
/v2ray
$(1)/usr
/share
/xray
72 $(INSTALL_DATA
) $(DL_DIR
)/$(GEOIP_FILE
) $(1)/usr
/share
/v2ray
/geoip.dat
73 $(LN
) ..
/v2ray
/geoip.dat
$(1)/usr
/share
/xray
/geoip.dat
76 define Package
/v2ray-geosite
/install
77 $(INSTALL_DIR
) $(1)/usr
/share
/v2ray
$(1)/usr
/share
/xray
78 $(INSTALL_DATA
) $(DL_DIR
)/$(GEOSITE_FILE
) $(1)/usr
/share
/v2ray
/geosite.dat
79 $(LN
) ..
/v2ray
/geosite.dat
$(1)/usr
/share
/xray
/geosite.dat
82 $(eval
$(call BuildPackage
,v2ray-geoip
))
83 $(eval
$(call BuildPackage
,v2ray-geosite
))