aboutsummaryrefslogtreecommitdiffstats
path: root/main/geoip/APKBUILD
blob: e8e6fa5ae33f463088b39a0c2eb2b394eaf339c5 (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.2
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="5dbc1de47220c8b345049bc7187f1cc3  GeoIP-1.6.2.tar.gz"
sha256sums="8ef059ee3680b39db967248331ec41188f4b45f86a4a77e39247ff41b61efd7c  GeoIP-1.6.2.tar.gz"
sha512sums="66ed37f940084121064c898f36cf9ef4bf0052bf200611fdd440f171851a0cbb73290d43ff626acfb04872adc2ec6a1e8c147c0b883d396b279aeac132f78e23  GeoIP-1.6.2.tar.gz"