summaryrefslogtreecommitdiffstats
path: root/testing/jsoncpp/APKBUILD
blob: 5d42b6b0a73aedf02d21188f4f40a8f0243ed13d (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=jsoncpp
pkgver=0.5.0
pkgrel=1
pkgdesc="JSON C++ library"
url="http://jsoncpp.sourceforge.net/"
arch="all"
license="PublicDomain"
depends=
depends_dev=
makedepends="$depends_dev scons"
install=""
subpackages="$pkgname-dev"
source="http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/$pkgver/jsoncpp-src-$pkgver.tar.gz"

_builddir="$srcdir"/jsoncpp-src-$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"
	scons platform=linux-gcc || return 1
}

package() {
	cd "$_builddir"

	mkdir -p "$pkgdir"/usr/lib
	cp "$_builddir"/libs/*/libjson*.so "$pkgdir"/usr/lib/libjson.so

	mkdir -p "$pkgdir"/usr/include
	cp -r "$_builddir"/include/json "$pkgdir"/usr/include/
	ln -sf /usr/include/json "$pkgdir"/usr/include/jsoncpp
}

md5sums="24482b67c1cb17aac1ed1814288a3a8f  jsoncpp-src-0.5.0.tar.gz"