summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abs/extra/rapidjson/PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/abs/extra/rapidjson/PKGBUILD b/abs/extra/rapidjson/PKGBUILD
new file mode 100644
index 0000000..27612a6
--- /dev/null
+++ b/abs/extra/rapidjson/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Jonathan Steel <jsteel at archlinux.org>
+# Contributor: Yunhui Fu <yhfudev@gmail.com>
+
+pkgname=rapidjson
+pkgver=1.1.0
+pkgrel=3
+pkgdesc="A fast JSON parser/generator for C++ with both SAX/DOM style API"
+arch=('any')
+url="https://github.com/miloyip/rapidjson"
+license=('MIT')
+makedepends=('gcc' 'cmake')
+source=($pkgname-$pkgver.tar.gz::https://github.com/miloyip/$pkgname/archive/v$pkgver.tar.gz)
+md5sums=('badd12c511e081fec6c89c43a7027bce')
+
+prepare() {
+ cd $pkgname-$pkgver
+ find -name CMakeLists.txt | xargs sed -e 's|-Werror||' -i # Don't use -Werror
+}
+
+build () {
+ cd $pkgname-$pkgver
+
+ mkdir -p build
+ cd build
+
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
+
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver/build
+
+ DESTDIR="$pkgdir" make install
+
+ install -Dm644 ../license.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt
+}