upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / rapidjson / repos / community-any / PKGBUILD
blob37cb2ed9a5f014eb9d9c78451915046d3dfa440e
1 # Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
2 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
3 # Contributor: Jonathan Steel <jsteel at archlinux.org>
4 # Contributor: Yunhui Fu <yhfudev@gmail.com>
6 pkgname=rapidjson
7 pkgver=1.1.0
8 pkgrel=5
9 pkgdesc="Fast JSON parser/generator for C++ with both SAX/DOM style API"
10 arch=('any')
11 url="https://github.com/miloyip/rapidjson"
12 license=('MIT')
13 makedepends=('cmake')
14 checkdepends=('gtest' 'valgrind')
15 source=(https://github.com/miloyip/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
16 sha512sums=('2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff')
18 prepare() {
19   cd $pkgname-$pkgver
20   find -name CMakeLists.txt | xargs sed -e 's|-Werror||' -i # Don't use -Werror
23 build () {
24   cd $pkgname-$pkgver
26   mkdir -p build
27   cd build
29   cmake \
30       -DCMAKE_BUILD_TYPE=None \
31       -DCMAKE_INSTALL_PREFIX:PATH=/usr \
32       -DRAPIDJSON_HAS_STDSTRING=ON \
33       -DRAPIDJSON_BUILD_CXX11=ON \
34       -DRAPIDJSON_ENABLE_INSTRUMENTATION_OPT=OFF \
35       -DDOC_INSTALL_DIR=/usr/share/doc/${pkgname} \
36       ..
38   make
41 check() {
42   cd $pkgname-$pkgver/build
43   ctest -j 2 -V
46 package() {
47   cd $pkgname-$pkgver
49   DESTDIR="$pkgdir" make -C build install
51   install -Dm644 license.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt
54 # vim: ts=2 sw=2 et: