geoip-1.6.9.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils
  5. DESCRIPTION="GeoIP Legacy C API"
  6. HOMEPAGE="https://github.com/maxmind/geoip-api-c"
  7. SRC_URI="
  8. https://github.com/maxmind/${PN}-api-c/archive/v${PV}.tar.gz -> ${P}.tar.gz
  9. "
  10. # GPL-2 for md5.c - part of libGeoIPUpdate, MaxMind for GeoLite Country db
  11. LICENSE="LGPL-2.1 GPL-2 MaxMind2"
  12. SLOT="0"
  13. 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"
  14. IUSE="static-libs"
  15. RESTRICT="test"
  16. DEPEND="net-misc/wget"
  17. RDEPEND="${DEPEND}"
  18. S="${WORKDIR}/${PN}-api-c-${PV}"
  19. src_prepare() {
  20. eautoreconf
  21. }
  22. src_configure() {
  23. econf $(use_enable static-libs static)
  24. sed -e "s|@PREFIX@|${ROOT}|g" "${FILESDIR}"/geoipupdate-r5.sh > geoipupdate.sh || die
  25. }
  26. src_install() {
  27. default
  28. dodoc AUTHORS ChangeLog NEWS.md README*
  29. prune_libtool_files
  30. keepdir /usr/share/GeoIP
  31. dosbin geoipupdate.sh
  32. }
  33. pkg_postinst() {
  34. ewarn "WARNING: Databases are no longer installed by this ebuild."
  35. elog "Don't forget to run 'geoipupdate.sh -f' (or geoipupdate from"
  36. elog "net-misc/geoipupdate) to populate ${ROOT}/usr/share/GeoIP/"
  37. elog "with geo-located IP address databases."
  38. }