aboutsummaryrefslogtreecommitdiffstats
path: root/main/geoip/APKBUILD
blob: 2f73c37127dd68b7610e1bfcb894e4ecf331546c (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
49
50
51
52
# Contributor:
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="geoip"
_realname="GeoIP"
pkgver=1.6.9
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
	geoip.cron"

_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
	mkdir -p "$pkgdir"/usr/share/GeoIP
	install -m755 -D ../../geoip.cron "$pkgdir"/etc/periodic/monthly/geoip
}

md5sums="7475942dc8155046dddb4846f587a7e6  GeoIP-1.6.9.tar.gz
674837e5011389610f1569bbb1a00f76  geoip.cron"
sha256sums="4b446491843de67c1af9b887da17a3e5939e0aeed4826923a5f4bf09d845096f  GeoIP-1.6.9.tar.gz
17e50491df05e50cd9f3186a878567f7eb9492773c90b99f4a8d7bb61386d5e2  geoip.cron"
sha512sums="d9fc385db994d48066fb18e98ebaa882f80c04faf3d3e59004e3f05f455fd8c4b95041aeb5f197f3c2352ffe5c5913c58f0353fa16d2a1780cb0ccb5b7e8b986  GeoIP-1.6.9.tar.gz
5fc4003b57f5a0514c42764a6c6d28c2db926ea244f125accf490648adc9d172215e0d16426f49d79e1c465fea2c71b591636f1038d683c77535d2d93811a73e  geoip.cron"