summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Grande2021-01-12 15:56:41 -0500
committerVincent Grande2021-01-12 15:56:41 -0500
commit907f4278cb13632ef1d427a367bd06ecb628b8be (patch)
treec935a88d0480bb79fcfbb0d6af59cddb1cc4fa0a
downloadaur-907f4278cb13632ef1d427a367bd06ecb628b8be.tar.gz
initial upload
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD53
2 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2d899dd0fc6b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = json-c-git
+ pkgdesc = A JSON implementation in C
+ pkgver = 0.15
+ pkgrel = 1
+ url = https://github.com/json-c/json-c/wiki
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cmake
+ depends = glibc
+ provides = libjson-c.so
+ provides = json-c
+ conflicts = json-c
+ source = git+https://github.com/json-c/json-c
+ sha256sums = SKIP
+
+pkgname = json-c-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9412d3d0ceec
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Vincent Grande <shoober420@gmail.com>
+# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
+# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
+# Contributor: congyiwu <congyiwu AT gmail DOT com>
+
+pkgname=json-c-git
+pkgver=0.15
+pkgrel=1
+pkgdesc="A JSON implementation in C"
+url="https://github.com/json-c/json-c/wiki"
+license=(MIT)
+arch=(x86_64)
+depends=(glibc)
+makedepends=(git cmake)
+provides=(libjson-c.so json-c)
+conflicts=(json-c)
+source=("git+https://github.com/json-c/json-c")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd json-c
+ local tag="$(git describe --tags --abbrev=0)"
+ local ver="$(git describe --tags)"
+ echo "${tag%-*}${ver#$tag}" | sed 's/^json-c-//;s/-/+/g'
+}
+
+prepare() {
+ cd json-c
+}
+
+build() {
+ CFLAGS+=" $CPPFLAGS"
+ CXXFLAGS+=" $CPPFLAGS"
+
+ cmake -Hjson-c -Bbuild \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DENABLE_THREADING=ON \
+ -DENABLE_RDRAND=OFF
+ cmake --build build
+}
+
+#check() {
+# cmake --build build --target test
+#}
+
+package() {
+ DESTDIR="$pkgdir" cmake --build build --target install
+ install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 json-c/COPYING
+}
+
+# vim:set sw=2 et: