net-im/deepin-wine-wecom: new package, add 4.1.6.6017
[gentoo-zh.git] / dev-util / v2ray-geoip-generator / v2ray-geoip-generator-9999.ebuild
blobdb05a8801d68a70a0f5f69b27c948208b26b112d
1 # Copyright 2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
6 inherit git-r3 go-module
8 DESCRIPTION="GeoIP generator for V2Ray."
9 HOMEPAGE="https://github.com/v2fly/geoip http://www.maxmind.com/"
10 EGIT_REPO_URI="https://github.com/v2fly/geoip.git"
12 LICENSE="CC-BY-SA-4.0"
13 SLOT="0"
15 DEPEND=""
16 RDEPEND="${DEPEND}"
17 BDEPEND=">=dev-lang/go-1.16:="
19 src_unpack() {
20 git-r3_src_unpack
21 #TODO: Looking for a more elegant way to download deps
22 export GOPROXY="https://goproxy.cn,direct" || die
23 go-module_live_vendor
26 src_compile() {
27 go build -v -work -o ${PN} -trimpath ./main.go || die
30 src_install() {
31 exeinto /usr/bin
32 doexe ${PN}
35 pkg_postinst() {
36 if [[ -z ${REPLACING_VERSIONS} ]]; then
37 elog
38 elog "run:"
39 elog " ${PN} -help"
40 elog "to check the usage."
41 elog
42 elog "The original data files can be downloaded from:"
43 elog "https://dev.maxmind.com/geoip/geoip2/geolite2/"
44 elog "You need to sign up a maxmind account."
45 elog