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

Jan Steffens heftig at archlinux.org
Thu Aug 30 19:22:44 UTC 2018


    Date: Thursday, August 30, 2018 @ 19:22:43
  Author: heftig
Revision: 333131

0.13.1-2

Modified:
  json-c/trunk/PKGBUILD	(contents, properties)

----------+
 PKGBUILD |   45 +++++++++++++++++++++++++++++++--------------
 1 file changed, 31 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-08-30 17:10:53 UTC (rev 333130)
+++ PKGBUILD	2018-08-30 19:22:43 UTC (rev 333131)
@@ -1,4 +1,3 @@
-# $Id$
 # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
 # Contributor: Geoffroy Carrier <geoffroy.carrier at koon.fr>
 # Contributor: congyiwu <congyiwu AT gmail DOT com>
@@ -5,29 +4,47 @@
 
 pkgname=json-c
 pkgver=0.13.1
-pkgrel=1
-pkgdesc='A JSON implementation in C'
-url='https://github.com/json-c/json-c/wiki'
+pkgrel=2
+pkgdesc="A JSON implementation in C"
+url="https://github.com/json-c/json-c/wiki"
 license=(MIT)
-arch=('x86_64')
-depends=('glibc')
-_releasedate=20180305
-source=("https://github.com/json-c/json-c/archive/json-c-${pkgver}-${_releasedate}.tar.gz")
-sha256sums=('5d867baeb7f540abe8f3265ac18ed7a24f91fe3c5f4fd99ac3caba0708511b90')
+arch=(x86_64)
+depends=(glibc)
+makedepends=(git)
+_commit=985c46fec39d1d3043f98e8d8cdb9d040131b3bb  # tags/json-c-0.13.1-20180305^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
+  NOCONFIGURE=1 ./autogen.sh
+}
+
 build() {
-  cd $pkgname-$pkgname-$pkgver-$_releasedate
-  ./configure --prefix=/usr --disable-static
+  cd json-c
+  ./configure \
+    --prefix=/usr \
+    --disable-static \
+    --enable-threading
   make
 }
 
 check() {
-  cd $pkgname-$pkgname-$pkgver-$_releasedate
+  cd json-c
   make check
 }
 
 package() {
-  cd $pkgname-$pkgname-$pkgver-$_releasedate
+  cd json-c
   make DESTDIR="$pkgdir" install
-  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
 }
+
+# vim:set sw=2 et:


Property changes on: json-c/trunk/PKGBUILD
___________________________________________________________________
Deleted: svn:keywords
## -1 +0,0 ##
-Id
\ No newline at end of property



More information about the arch-commits mailing list