[arch-commits] Commit in lib32-json-c/trunk (PKGBUILD)

Jan Steffens heftig at archlinux.org
Mon Apr 20 18:52:04 UTC 2020


    Date: Monday, April 20, 2020 @ 18:52:03
  Author: heftig
Revision: 617075

0.14-1

Modified:
  lib32-json-c/trunk/PKGBUILD

----------+
 PKGBUILD |   37 ++++++++++++++++---------------------
 1 file changed, 16 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-20 18:26:51 UTC (rev 617074)
+++ PKGBUILD	2020-04-20 18:52:03 UTC (rev 617075)
@@ -1,15 +1,16 @@
 # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
 
 pkgname=lib32-json-c
-pkgver=0.13.1
-pkgrel=2
+pkgver=0.14
+pkgrel=1
 pkgdesc="A JSON implementation in C (32-bit)"
 url="https://github.com/json-c/json-c/wiki"
 license=(MIT)
 arch=(x86_64)
 depends=(lib32-glibc json-c)
-makedepends=(git)
-_commit=985c46fec39d1d3043f98e8d8cdb9d040131b3bb  # tags/json-c-0.13.1-20180305^0
+makedepends=(git cmake)
+provides=(libjson-c.so)
+_commit=bae2f10c436eaf0d95746cbc5f1c1f0ecb866a8e  # tags/json-c-0.14-20200419^0
 source=("git+https://github.com/json-c/json-c#commit=$_commit")
 sha256sums=('SKIP')
 
@@ -22,36 +23,30 @@
 
 prepare() {
   cd json-c
-  NOCONFIGURE=1 ./autogen.sh
 }
 
 build() {
-  cd json-c
-
   export CC="gcc -m32"
   export CXX="g++ -m32"
-  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
+  export PKG_CONFIG_PATH="i686-pc-linux-gnu-pkg-config"
 
-  ./configure \
-    --prefix=/usr \
-    --libdir=/usr/lib32 \
-    --disable-static \
-    --enable-threading
-  make
+  cmake -Hjson-c -Bbuild \
+    -DCMAKE_BUILD_TYPE=None \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
+    -DENABLE_THREADING=ON \
+    -DENABLE_RDRAND=ON
+  cmake --build build
 }
 
 check() {
-  cd json-c
-  make check
+  cmake --build build --target test
 }
 
 package() {
-  cd json-c
-  make DESTDIR="$pkgdir" install
+  DESTDIR="$pkgdir" cmake --build build --target install
   rm -r "$pkgdir/usr/include"
-
-  mkdir -p "$pkgdir/usr/share/licenses"
-  ln -s json-c "$pkgdir/usr/share/licenses/$pkgname"
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 json-c/COPYING
 }
 
 # vim:set sw=2 et:


More information about the arch-commits mailing list