aboutsummaryrefslogtreecommitdiffstats
path: root/main/libmaxminddb/APKBUILD
blob: b3331e0f063ad062f015d1fcb5592960298bdab8 (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
60
61
62
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=libmaxminddb
pkgver=0.5.5
pkgrel=0
pkgdesc="Maxmind GeoIP2 database library"
url="https://github.com/maxmind/$pkgname"
arch="all"
license="ASL 2.0"
depends="curl"
makedepends="automake autoconf libtool"
install=""
options=""
subpackages="$pkgname-dev"
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
	rm -rf "$pkgdir"/usr/lib/*.la || return 0

	# 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="6cbc4dfe1fe710d2475237179c1a6dee  libmaxminddb-0.5.5.tar.gz
3866d16335eeaa8573cf625981979a56  libmaxminddb.cron
f86fba9d801d5f9c76166c11c224f474  libmaxminddb.confd"
sha256sums="d37a630afe0426a727fed2c9d680099e2d276d9c4dbaa910704cd5ac6df2fefe  libmaxminddb-0.5.5.tar.gz
34f32f544f0537e37783de61f09e4b5b7b080aaa2e9514afe1eaea8425f547e9  libmaxminddb.cron
f8af67264b8711ab40f99d364e4987c14f4928932624993c72188f59203526be  libmaxminddb.confd"
sha512sums="a6ce910294fbe14a98e0fcce02f03995a9697c5ca61b33b2df21adadc640cdce6f8c5aa1e1e581cb9f632d82bab22a8c6cd065cc7bc8a4172cfb44e89f416f59  libmaxminddb-0.5.5.tar.gz
1feb1f2dd57991d729b6f9d29834f43d7405038cdbdfb0113a0e8f8f951a74c5e40651f9d241460f110acdd300196cf580b370e6cec56985cca797ba5610e622  libmaxminddb.cron
5f8dc6dad84cb1d188504a22470acf89542755c0bb3a78e4d3ae4e5bfa49fe64a7d2ee17441084db2710115463d39361df060a74b3a48fc4d8fc5e802afd2099  libmaxminddb.confd"