diff options
author | Britney Fransen <brfransen@gmail.com> | 2020-10-04 15:34:55 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2020-10-04 15:34:55 (GMT) |
commit | c9ba162645be16baa58ef72fb27388516fb4cc24 (patch) | |
tree | 74bb85c3d6447f653867d014f71b362e659fa757 /abs/core/json-c/PKGBUILD | |
parent | 6fd74d8dbdee455d63c717cf2af1080f774014e7 (diff) | |
download | linhes_pkgbuild-c9ba162645be16baa58ef72fb27388516fb4cc24.zip linhes_pkgbuild-c9ba162645be16baa58ef72fb27388516fb4cc24.tar.gz linhes_pkgbuild-c9ba162645be16baa58ef72fb27388516fb4cc24.tar.bz2 |
json-c: update to 0.15
Diffstat (limited to 'abs/core/json-c/PKGBUILD')
-rw-r--r-- | abs/core/json-c/PKGBUILD | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/abs/core/json-c/PKGBUILD b/abs/core/json-c/PKGBUILD new file mode 100644 index 0000000..decb89b --- /dev/null +++ b/abs/core/json-c/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org> +# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr> +# Contributor: congyiwu <congyiwu AT gmail DOT com> + +pkgname=json-c +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) +_commit=9021cdcdd01fc9dbcbe1f06391848c2ac915212f # tags/json-c-0.15-20200726^0 +source=("git+https://github.com/json-c/json-c#commit=$_commit") +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: |