aboutsummaryrefslogtreecommitdiffstats
path: root/main/libconfig/APKBUILD
blob: 3698b8ef06486eed9e54a4d5163f16e7a8a2c0fc (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libconfig
pkgver=1.5
pkgrel=3
pkgdesc="A simple library for manipulating structured configuration files"
url="http://www.hyperrealm.com/libconfig/"
arch="all"
license="LGPL"
makedepends="autoconf automake libtool"
source="$pkgname-$pkgver.tar.gz::https://github.com/hyperrealm/$pkgname/archive/v$pkgver.tar.gz"
subpackages="$pkgname-doc $pkgname-dev $pkgname++:_cxx"

builddir="$srcdir/$pkgname-$pkgver"

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

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/
}

sha512sums="f3a0a969d56604c473b004fd15e541569a6b7639a23db896e391d6280060c278f0adbae1da92bc2a9a55431e74a9312d7581cc47dc27d043a9ac3b045ae2a8a0  libconfig-1.5.tar.gz"