+%define libname libjson
+%define libsoname %{libname}4
Name: json-c
Version: 0.13.1
Release: 0
-License: MIT
Summary: JSON implementation in C
-Url: http://oss.metaparadigm.com/%{name}
-Group: System/Libraries
-Source0: http://oss.metaparadigm.com/json-c/json-c-%{version}.tar.gz
+License: MIT
+Group: Development/Libraries/C and C++
+Url: https://github.com/json-c/json-c/wiki
+#Git-Clone git://github.com/json-c/json-c
+Source0: https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
Source1: baselibs.conf
Source1001: json-c.manifest
BuildRequires: libtool
-BuildRequires: pkg-config
+BuildRequires: pkgconfig
%description
JSON-C implements a reference counting object model that allows you to
strings and parse JSON formatted strings back into the C
representation of JSON objects.
-%package -n libjson
-Summary: JSON shared lib
+%package -n %{libsoname}
+Summary: JSON-C shared library
Group: System/Libraries
-%description -n libjson
+%description -n %{libsoname}
+JSON-C implements a reference counting object model that allows you to
+easily construct JSON objects in C, output them as JSON formatted
+strings and parse JSON formatted strings back into the C
+representation of JSON objects.
+
This package includes the JSON library.
-%package -n libjson-devel
+%package -n %{libname}-devel
Summary: Development headers and libraries for json-c
-Group: Development/Libraries
-Requires: libjson = %{version}
+Group: Development/Libraries/C and C++
+Requires: %{libsoname} = %{version}
+
+%description -n %{libname}-devel
+JSON-C implements a reference counting object model that allows you to
+easily construct JSON objects in C, output them as JSON formatted
+strings and parse JSON formatted strings back into the C
+representation of JSON objects.
-%description -n libjson-devel
This package includes header files and scripts needed for developers
using the json-c library
cp %{SOURCE1001} .
%build
-%reconfigure --disable-static --with-pic
-# Build with "-j1" to prevent an existing race condition
-%__make -j1
+%reconfigure --disable-static --with-pic --disable-oldname-compat
+make %{?_smp_mflags}
%check
-%__make check || exit 0
+make %{?_smp_mflags} check
%install
%make_install
+find %{buildroot} -type f -name "*.la" -delete -print
+# create a compatibilty pkg-config file for software needing it
+(cd %{buildroot}%{_libdir}/pkgconfig && ln -s json-c.pc json.pc)
+%remove_docs
-%post -n libjson -p /sbin/ldconfig
-
-%postun -n libjson -p /sbin/ldconfig
+%post -n %{libsoname} -p /sbin/ldconfig
+%postun -n %{libsoname} -p /sbin/ldconfig
-%files -n libjson
+%files -n %{libsoname}
%manifest %{name}.manifest
%defattr(-,root,root)
-%license COPYING
%{_libdir}/libjson-c.so.*
+%license COPYING
-%files -n libjson-devel
+%files -n %{libname}-devel
%manifest %{name}.manifest
%defattr(-,root,root)
-%license COPYING
%{_libdir}/libjson-c.so
%{_includedir}/json-c
%{_libdir}/pkgconfig/*.pc
+
+%changelog