aboutsummaryrefslogtreecommitdiffstats
path: root/main/libmaxminddb/APKBUILD
blob: 3e0d83f2401771e00f73dfaf5788a1486bfdce6f (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
53
54
55
56
57
58
59
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libmaxminddb
pkgver=1.2.0
pkgrel=0
pkgdesc="Maxmind GeoIP2 database library"
url="https://github.com/maxmind/libmaxminddb"
arch="all"
license="ASL 2.0"
depends="curl"
makedepends="automake autoconf libtool"
install=""
options=""
subpackages="$pkgname-dev $pkgname-doc"
source="$url/releases/download/$pkgver/$pkgname-$pkgver.tar.gz
	libmaxminddb.cron
	libmaxminddb.confd
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-pic \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make install DESTDIR="$pkgdir" || return 1

	# install alpine specifics
	mkdir -p "$pkgdir"/var/lib/libmaxminddb
	install -m755 -D "$srcdir"/libmaxminddb.cron "$pkgdir"/etc/periodic/weekly/libmaxminddb
	install -m755 -D "$srcdir"/libmaxminddb.confd "$pkgdir"/etc/conf.d/libmaxminddb
}

md5sums="fae9021779dffe1b87f038d21f8afd56  libmaxminddb-1.2.0.tar.gz
3866d16335eeaa8573cf625981979a56  libmaxminddb.cron
f86fba9d801d5f9c76166c11c224f474  libmaxminddb.confd"
sha256sums="1fe859ed714f94fc902a145453f7e1b5cd928718179ba4c4fcb7f6ae0df7ad37  libmaxminddb-1.2.0.tar.gz
34f32f544f0537e37783de61f09e4b5b7b080aaa2e9514afe1eaea8425f547e9  libmaxminddb.cron
f8af67264b8711ab40f99d364e4987c14f4928932624993c72188f59203526be  libmaxminddb.confd"
sha512sums="ebfa358c3f9cae8b13ca52d47e26d5e3e036e8455432b9fa250b13c59d71addf7748ab112ac926a177b646706b27651b733810dde497786fe65c9d150e621af9  libmaxminddb-1.2.0.tar.gz
1feb1f2dd57991d729b6f9d29834f43d7405038cdbdfb0113a0e8f8f951a74c5e40651f9d241460f110acdd300196cf580b370e6cec56985cca797ba5610e622  libmaxminddb.cron
5f8dc6dad84cb1d188504a22470acf89542755c0bb3a78e4d3ae4e5bfa49fe64a7d2ee17441084db2710115463d39361df060a74b3a48fc4d8fc5e802afd2099  libmaxminddb.confd"