dev-libs/sing-geoip - 20231012 (chiyuki-overlay)

Search

Package Information

Description:
sing-geoip database
Homepage:
https://github.com/SagerNet/sing-geoip
License:
GPL-3 BSD-3 MIT Apache-2 ISC

Ebuild Details

Version EAPI Keywords Slot
20231012 8 ~amd64 0
View Raw Ebuild
EAPI=8

inherit go-module

DESCRIPTION="sing-geoip database"
HOMEPAGE="https://github.com/SagerNet/sing-geoip"
LICENSE="GPL-3 BSD-3 MIT Apache-2 ISC"

SLOT="0"
KEYWORDS="~amd64"

IUSE="cn hk tw us jp"

BDEPEND="
	>=dev-lang/go-1.18
"

SRC_URI="
https://github.com/SagerNet/sing-geoip/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz
https://github.com/Dreamacro/maxmind-geoip/releases/download/${PV}/Country.mmdb
"
SRC_URI+="
https://github.com/IllyaTheHath/gentoo-overlay/releases/download/${P}/${P}-deps.tar.xz -> ${P}-deps.tar.xz
"

src_unpack() {
	go-module_src_unpack
	cp ${DISTDIR}/Country.mmdb ${S}
}

src_compile() {
	ego run . ${S}/Country.mmdb ${S}/geoip.db
	for i in ${IUSE} ; do
		if use ${i} ; then
			ego run . ${S}/Country.mmdb ${S}/geoip-${i}.db ${i}
		fi
	done
}

src_install() {
	insinto /usr/share/${PN}
	for f in geoip*.db ; do
		[ -e "$f" ] && doins $f
	done
}

USE Flags

cn
hk
tw
us
jp

Dependencies

BDEPEND

	>=dev-lang/go-1.18

Manifest for 20231012

Type File Size Source URLs
DIST Country.mmdb 5890286 bytes https://github.com/Dreamacro/maxmind-geoip/releases/download/20231012/Country.mmdb
DIST sing-geoip-20231012.tar.gz 5834 bytes https://github.com/SagerNet/sing-geoip/archive/refs/tags/20231012.tar.gz