aboutsummaryrefslogtreecommitdiffstats
path: root/main/geoip/APKBUILD
blob: ab8cac734af4d6d9c311216d4c9ec6db73403f30 (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
# Contributor:
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="geoip"
_realname="GeoIP"
pkgver=1.4.8
pkgrel=2
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="05b7300435336231b556df5ab36f326d  GeoIP-1.4.8.tar.gz"