blob: eeedc3970bee94ed2942cc225b312f5e03bba900 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit go-module
DESCRIPTION="Performs automatic updates of GeoIP2 and GeoIP Legacy binary databases"
HOMEPAGE="https://github.com/maxmind/geoipupdate"
SRC_URI="https://github.com/maxmind/geoipupdate/archive/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-deps.tar.xz"
LICENSE="BSD MIT Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
BDEPEND="dev-go/go-md2man"
DOCS=( README.md CHANGELOG.md doc/GeoIP.conf.md doc/geoipupdate.md )
PATCHES=(
"${FILESDIR}/geoipupdate-6.0.0-use-go-md2man-instead-of-pandoc.patch"
)
src_compile() {
# Do not let these leak from outside into the package
unset GOBIN GOPATH GOCODE
# the horror, the horror ... but it's all automagic
export CONFFILE=/etc/GeoIP.conf
export DATADIR=/usr/share/GeoIP
export VERSION=${PV}
default
}
src_install() {
dobin build/geoipupdate
keepdir /usr/share/GeoIP
insinto /etc
doins build/GeoIP.conf
doman build/GeoIP.conf.5 build/geoipupdate.1
einstalldocs
}
|