blob: a8a1a36d2e7ce6d2fcbfa17708c6f3b060bb7198 (
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
63
64
65
66
67
68
69
70
71
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Jonahtan Schaeffer <joschaeffer@gmail.com>
# COntributor: Drake Arconis <lightdrake@gmail.com>
pkgbase=jsoncpp
pkgname=('jsoncpp' 'jsoncpp-doc')
pkgver=1.8.4
pkgrel=2
pkgdesc='C++ library for interacting with JSON'
url='https://github.com/open-source-parsers/jsoncpp'
arch=('x86_64')
license=('MIT' 'custom:Public_Domain')
makedepends=('gcc-libs' 'doxygen' 'graphviz' 'python' 'meson')
checkdepends=('python2')
options=('staticlibs')
source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/open-source-parsers/${pkgbase}/archive/${pkgver}.tar.gz)
sha256sums=('c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6')
sha512sums=('f70361a3263dd8b9441374a9a409462be1426c0d6587c865171a80448ab73b3f69de2b4d70d2f0c541764e1e6cccc727dd53178347901f625ec6fb54fb94f4f1')
prepare() {
cd ${pkgbase}-${pkgver}
mkdir -p build
}
build() {
cd ${pkgbase}-${pkgver}
msg2 "Building docs..."
python doxybuild.py \
--doxygen="$(which doxygen)" \
--with-dot
msg2 "Building shared library..."
arch-meson --default-library shared build
ninja -C build
msg2 "Building static library..."
arch-meson --default-library static build-static
ninja -C build-static
}
check() {
cd ${pkgbase}-${pkgver}
ninja -C build test
cd test
python2 runjsontests.py ../build/jsontestrunner
python2 rununittests.py ../build/jsoncpp_test
}
package_jsoncpp() {
depends=('gcc-libs')
optdepends=('jsoncpp-doc: documentation')
cd ${pkgbase}-${pkgver}
DESTDIR="${pkgdir}" ninja -C build install
DESTDIR="${pkgdir}" ninja -C build-static install
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}
package_jsoncpp-doc() {
pkgdesc+=' (documentation)'
optdepends=('jsoncpp')
cd ${pkgbase}-${pkgver}
install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -dm 755 "${pkgdir}/usr/share/doc/${pkgbase}"
cp -a dist/doxygen/jsoncpp-api-html-${pkgver} "${pkgdir}/usr/share/doc/${pkgbase}/html"
}
# vim: ts=2 sw=2 et:
|