summaryrefslogtreecommitdiffstats
path: root/main/geoip/APKBUILD
blob: d5f72ef0c90fe1142ffc184f9eab86c25290b261 (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
# Contributor:
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="geoip"
_realname="GeoIP"
pkgver=1.5.0
pkgrel=0
pkgdesc="Lookup countries by IP addresses"
url="http://www.maxmind.com/app/ip-location"
arch="all"
license="GPL"
depends=
makedepends="zlib-dev"
install=
subpackages="$pkgname-dev $pkgname-doc"
source="http://www.maxmind.com/download/geoip/api/c/$_realname-$pkgver.tar.gz"

_builddir="$srcdir"/$_realname-$pkgver

prepare() {
	cd "$_builddir"
	return 0
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc/geoip \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make || return 1
	make check || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	install -m755 -D ../../geoip.cron "$pkgdir"/etc/periodic/monthly/geoip
	rm "$pkgdir"/usr/lib/*.la
}

md5sums="57bc400b5c11057a4cab00e1c5cf3f00  GeoIP-1.5.0.tar.gz"
sha256sums="d1dbd4f27bcf0e760329f0f9c67a5fc81b4c56efbe0666159934c2bcd38caea2  GeoIP-1.5.0.tar.gz"
sha512sums="87bc4972ae438f3f37a1f05e55377862a72437195e0241b7fa1ddf4ebaeb1da50a07a387ae13481dd1ff2a5ec39b9830a808618bb8c825417d25068684540b3f  GeoIP-1.5.0.tar.gz"