aboutsummaryrefslogtreecommitdiffstats
path: root/main/libconfig/APKBUILD
blob: 18c529221f14297050fee030cedfe433182a6e08 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libconfig
pkgver=1.7.2
pkgrel=0
pkgdesc="A simple library for manipulating structured configuration files"
url="http://www.hyperrealm.com/libconfig/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="automake autoconf libtool texinfo"
subpackages="$pkgname-static $pkgname-doc $pkgname-dev $pkgname++:_cxx"
source="$pkgname-$pkgver.tar.gz::https://github.com/hyperrealm/$pkgname/archive/v$pkgver.tar.gz"

prepare() {
	cd "$builddir"
	default_prepare
	autoreconf -fi
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir/" install
}

_cxx() {
	pkgdesc="C++ bindings for libconfig"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libconfig++.so.* "$subpkgdir"/usr/lib/
}

static() {
	depends=""
	pkgdesc="$pkgdesc (static libraries)"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib
}

sha512sums="9df57355c2d08381b4a0a6366f0db3633fbe8f73c2bb8c370c040b0bae96ce89ee4ac6c17a5a247fed855d890fa383e5b70cb5573fc9cfc62194d5b94e161cee  libconfig-1.7.2.tar.gz"