- Upgrade to 0.11 version: - SONAME change. - Fix provides and obsoletes accordingly - symlink the .pc file to the oldname for software that needs it - Remove json-c-fix-headers.patch integrated upstream OBS-URL: https://build.opensuse.org/request/show/213239 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/json-c?expand=0&rev=16
112 lines
3.2 KiB
RPMSpec
112 lines
3.2 KiB
RPMSpec
#
|
|
# spec file for package json-c
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define libname libjson-c
|
|
%define libsoname %{libname}2
|
|
%define oldlibname libjson
|
|
|
|
Name: json-c
|
|
Summary: JSON implementation in C
|
|
License: MIT
|
|
Group: System/Libraries
|
|
Version: 0.11
|
|
Release: 0
|
|
Url: https://gitub.com/%{name}/%{name}/wiki
|
|
Source0: https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
|
|
Source1: baselibs.conf
|
|
#Redone 0.11 patches
|
|
Patch0: %{name}-lfs.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: libtool
|
|
BuildRequires: pkg-config
|
|
|
|
%description
|
|
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.
|
|
|
|
%package -n %{libsoname}
|
|
Summary: JSON shared lib
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libsoname}
|
|
This package includes the JSON library.
|
|
|
|
%package -n %{libname}-devel
|
|
Summary: Development headers and libraries for json-c
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{libsoname} = %{version}
|
|
Provides: %{oldlibname}-devel = %{version}
|
|
Obsoletes: %{oldlibname}-devel < %{version}
|
|
|
|
%description -n %{libname}-devel
|
|
This package includes header files and scripts needed for developers
|
|
using the json-c library
|
|
|
|
%package -n %{libname}-doc
|
|
Summary: Documentation files
|
|
Group: Documentation/Other
|
|
Provides: %{oldlibname}-doc = %{version}
|
|
Obsoletes: %{oldlibname}-doc < %{version}
|
|
%if 0%{suse_version} >= 1120
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description -n %{libname}-doc
|
|
This package includes alls docs
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}
|
|
# Redone patches
|
|
%patch0 -p1
|
|
|
|
%build
|
|
autoreconf -fiv
|
|
%configure --disable-static --with-pic --disable-oldname-compat
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
%check
|
|
%{__make} %{?_smp_mflags} check
|
|
rm -rf %{buildroot}%{_libdir}/*.la
|
|
|
|
%install
|
|
%makeinstall DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir}
|
|
# create a compatibilty pkg-config file for software needing it
|
|
(cd $RPM_BUILD_ROOT%{_libdir}/pkgconfig && ln -s json-c.pc json.pc)
|
|
|
|
%post -n %{libsoname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libsoname} -p /sbin/ldconfig
|
|
|
|
%files -n %{libsoname}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/%{libname}.so.*
|
|
|
|
%files -n %{libname}-devel
|
|
%defattr(-,root,root)
|
|
%{_libdir}/%{libname}.so
|
|
%{_includedir}/json-c
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%files -n %{libname}-doc
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS ChangeLog COPYING README README.html doc
|
|
|
|
%changelog
|