summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartchus2018-01-27 15:26:48 +0100
committerMartchus2018-01-27 15:26:48 +0100
commit32db8a16fe497a3cf20204d920ea89d3e2b2096d (patch)
treeed080df4070ccfc27ff1a8f5ee93e95f1e7cdb03
downloadaur-32db8a16fe497a3cf20204d920ea89d3e2b2096d.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD45
2 files changed, 65 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..08e0289ab9df
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Sat Jan 27 14:26:48 UTC 2018
+pkgbase = mingw-w64-rapidjson
+ pkgdesc = A fast JSON parser/generator for C++ with both SAX/DOM style API (mingw-w64)
+ pkgver = 1.1.0
+ pkgrel = 1
+ url = https://github.com/miloyip/rapidjson
+ arch = any
+ license = MIT
+ makedepends = mingw-w64-gcc
+ makedepends = mingw-w64-cmake
+ options = !buildflags
+ options = staticlibs
+ options = !strip
+ options = !emptydirs
+ source = rapidjson-1.1.0.tar.gz::https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz
+ md5sums = badd12c511e081fec6c89c43a7027bce
+
+pkgname = mingw-w64-rapidjson
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..548c43d44896
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Martchus <martchus@gmx.net>
+# Contributor: Jonathan Steel <jsteel at archlinux.org>
+# Contributor: Yunhui Fu <yhfudev@gmail.com>
+
+_reponame=rapidjson
+pkgname=mingw-w64-$_reponame
+pkgver=1.1.0
+pkgrel=1
+pkgdesc='A fast JSON parser/generator for C++ with both SAX/DOM style API (mingw-w64)'
+arch=('any')
+url='https://github.com/miloyip/rapidjson'
+license=('MIT')
+makedepends=('mingw-w64-gcc' 'mingw-w64-cmake')
+source=($_reponame-$pkgver.tar.gz::https://github.com/miloyip/$_reponame/archive/v$pkgver.tar.gz)
+md5sums=('badd12c511e081fec6c89c43a7027bce')
+options=(!buildflags staticlibs !strip !emptydirs)
+_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
+
+build () {
+ cd "$_reponame-$pkgver"
+ for _arch in ${_architectures}; do
+ mkdir -p "build-${_arch}" && pushd "build-${_arch}"
+ ${_arch}-cmake \
+ -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DCMAKE_CXX_FLAGS:STRING='-Wno-error=implicit-fallthrough' \
+ -DCMAKE_INSTALL_PREFIX:PATH="/usr/${_arch}" \
+ ..
+ make
+ popd
+ done
+}
+
+package() {
+ cd "$_reponame-$pkgver"
+ for _arch in ${_architectures}; do
+ mkdir -p "build-${_arch}" && pushd "build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ # remove examples
+ rm -r "${pkgdir}/usr/${_arch}/share"
+ # put cmake files in right directory
+ mkdir -p "${pkgdir}/usr/${_arch}/lib/cmake/RapidJSON"
+ mv "${pkgdir}/usr/${_arch}/cmake/"* "${pkgdir}/usr/${_arch}/lib/cmake/RapidJSON"
+ popd
+ done
+}