498eb160a8c4e0df4a9cae5857784b3d805976f3
[gentoo.git] / dev-libs / geoip / geoip-1.6.10.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 inherit autotools eutils
6
7 DESCRIPTION="GeoIP Legacy C API"
8 HOMEPAGE="https://github.com/maxmind/geoip-api-c"
9 SRC_URI="
10         https://github.com/maxmind/${PN}-api-c/archive/v${PV}.tar.gz -> ${P}.tar.gz
11 "
12
13 # GPL-2 for md5.c - part of libGeoIPUpdate, MaxMind for GeoLite Country db
14 LICENSE="LGPL-2.1 GPL-2 MaxMind2"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
17 IUSE="static-libs"
18 RESTRICT="test"
19
20 DEPEND="
21         net-misc/wget
22 "
23 RDEPEND="
24         ${DEPEND}
25 "
26
27 S="${WORKDIR}/${PN}-api-c-${PV}"
28
29 src_prepare() {
30         default
31
32         eautoreconf
33 }
34
35 src_configure() {
36         econf $(use_enable static-libs static)
37         sed -e "s|@PREFIX@|${ROOT}|g" "${FILESDIR}"/geoipupdate-r6.sh > geoipupdate.sh || die
38 }
39
40 src_install() {
41         default
42
43         dodoc AUTHORS ChangeLog NEWS.md README*
44
45         prune_libtool_files
46
47         keepdir /usr/share/GeoIP
48
49         dosbin geoipupdate.sh
50 }
51
52 pkg_postinst() {
53         ewarn "WARNING: Databases are no longer installed by this ebuild."
54         elog "Don't forget to run 'geoipupdate.sh -f' (or geoipupdate from"
55         elog "net-misc/geoipupdate) to populate ${ROOT}/usr/share/GeoIP/"
56         elog "with geo-located IP address databases."
57 }