summaryrefslogtreecommitdiffstats
path: root/main/libmaxminddb/APKBUILD
blob: b3ecf69b80adad478bf2c9865951a3358150ea9f (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=1.0.2
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="2b6985305c0bbf74d08431e333c03ffb  libmaxminddb-1.0.2.tar.gz
3866d16335eeaa8573cf625981979a56  libmaxminddb.cron
f86fba9d801d5f9c76166c11c224f474  libmaxminddb.confd"
sha256sums="61ea977e4801a76ab7a832f343dc4d11dbb81dd4d2f12d9376ca60d213d48a00  libmaxminddb-1.0.2.tar.gz
34f32f544f0537e37783de61f09e4b5b7b080aaa2e9514afe1eaea8425f547e9  libmaxminddb.cron
f8af67264b8711ab40f99d364e4987c14f4928932624993c72188f59203526be  libmaxminddb.confd"
sha512sums="9963f04d3c57a22848c0e72e3aa444e2cff23d630e93db2e605deaeeed328c2ea0730f367ffb85514a0c2078e759acffe31e089879baffddd4e1006b591ae7b8  libmaxminddb-1.0.2.tar.gz
1feb1f2dd57991d729b6f9d29834f43d7405038cdbdfb0113a0e8f8f951a74c5e40651f9d241460f110acdd300196cf580b370e6cec56985cca797ba5610e622  libmaxminddb.cron
5f8dc6dad84cb1d188504a22470acf89542755c0bb3a78e4d3ae4e5bfa49fe64a7d2ee17441084db2710115463d39361df060a74b3a48fc4d8fc5e802afd2099  libmaxminddb.confd"