From 2332865d96b2702140c8d17c8e8d3d6db7265c2d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 4 May 2013 09:44:05 +0200 Subject: [PATCH] - update to 0.11 - fix source0 - enable both json and json-c libraries --- .gitignore | 3 +++ json-c.spec | 50 ++++++++++++++++++++++++++++++++++++++------------ sources | 2 +- 3 files changed, 42 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index e69de29..5618d1a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +json-c.spec~ +clog +/json-c-0.11-20130402.tar.gz diff --git a/json-c.spec b/json-c.spec index d9107fc..c775e7a 100644 --- a/json-c.spec +++ b/json-c.spec @@ -1,12 +1,16 @@ +%global reldate 20130402 + Name: json-c -Version: 0.10 -Release: 3%{?dist} +Version: 0.11 +Release: 1%{?dist} Summary: A JSON implementation in C Group: Development/Libraries License: MIT URL: https://github.com/json-c/json-c/wiki -Source0: https://github.com/downloads/json-c/json-c/json-c-%{version}.tar.gz +Source0: https://github.com/json-c/json-c/archive/json-c-%{version}-%{reldate}.tar.gz + BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +BuildRequires: libtool %description JSON-C implements a reference counting object model that allows you to easily @@ -34,51 +38,73 @@ BuildArch: noarch This package contains the reference manual for json-c. %prep -%setup -q +%setup -q -n json-c-json-c-%{version}-%{reldate} + for doc in ChangeLog; do iconv -f iso-8859-1 -t utf8 $doc > $doc.new && touch -r $doc $doc.new && mv $doc.new $doc done -# Hack to get json_object_iterator.c compiled -sed -e 's/json_object.c/json_object.c json_object_iterator.c/' \ - -e 's/json_object.h/json_object.h json_object_iterator.h/' \ - -e 's/json_object.lo/json_object.lo json_object_iterator.lo/' \ - -i Makefile.in +# regenerate auto stuff to avoid rpath issue +autoreconf -fi + %build -%configure --enable-shared --disable-static -make %{?_smp_mflags} +%configure --enable-shared --disable-static --disable-rpath +# parallel build is broken for now, make %{?_smp_mflags} +make %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} + # Get rid of la files rm -rf %{buildroot}%{_libdir}/*.la +# yum cannot replace a dir by a link +# so switch the dir names +rm %{buildroot}%{_includedir}/json +mv %{buildroot}%{_includedir}/json-c \ + %{buildroot}%{_includedir}/json +ln -s json \ + %{buildroot}%{_includedir}/json-c + + %clean rm -rf %{buildroot} + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig + %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING NEWS README README.html %{_libdir}/libjson.so.* +%{_libdir}/libjson-c.so.* %files devel %defattr(-,root,root,-) -%{_includedir}/json/ +%{_includedir}/json +%{_includedir}/json-c %{_libdir}/libjson.so +%{_libdir}/libjson-c.so %{_libdir}/pkgconfig/json.pc +%{_libdir}/pkgconfig/json-c.pc %files doc %defattr(-,root,root,-) %doc doc/html/* + %changelog +* Mon Apr 29 2013 Remi Collet - 0.11-1 +- update to 0.11 +- fix source0 +- enable both json and json-c libraries + * Thu Feb 14 2013 Fedora Release Engineering - 0.10-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/sources b/sources index 76cb614..35a0559 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a4edc79410eb894f08d7d52ca9f88732 json-c-0.10.tar.gz +7013b2471a507942eb8ed72a5d872d16 json-c-0.11-20130402.tar.gz