aboutsummaryrefslogtreecommitdiffstats
path: root/main/geoip/APKBUILD
blob: 32c04b9e71f94667c799c9629a8cd574ee61084e (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
# Contributor:
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="geoip"
_realname="GeoIP"
pkgver=1.6.5
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="https://github.com/maxmind/geoip-api-c/releases/download/v$pkgver/$_realname-$pkgver.tar.gz"

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

prepare() {
	cd "$_builddir"
	# update_config_sub || return 1
	return 0
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/geoip \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1
	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="be57b27082d81543611fcfab2f7d9c7a  GeoIP-1.6.5.tar.gz"
sha256sums="0ae1c95e69ad627d3a45cb897f79ce0c30f13fcd4b4a0dda073be0c9552521b3  GeoIP-1.6.5.tar.gz"
sha512sums="50eee6748ebe88e211ae1ad03ea7e472858a25742579d2b7d1208731fb8416a8c4030ec26758e728f6e22b9b62a66498b097ab7c06e541a62f52f6a15affa8c9  GeoIP-1.6.5.tar.gz"