2011-02-09 17:23:18 +00:00
|
|
|
#
|
2011-08-26 10:21:25 +00:00
|
|
|
# spec file for package json-c
|
2011-02-09 17:23:18 +00:00
|
|
|
#
|
2014-01-09 12:24:03 +00:00
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-02-09 17:23:18 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-01-09 12:24:03 +00:00
|
|
|
%define libname libjson-c
|
|
|
|
%define libsoname %{libname}2
|
|
|
|
%define oldlibname libjson
|
2011-02-09 17:23:18 +00:00
|
|
|
|
|
|
|
Name: json-c
|
|
|
|
Summary: JSON implementation in C
|
|
|
|
License: MIT
|
2014-02-05 06:28:31 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2014-01-09 12:24:03 +00:00
|
|
|
Version: 0.11
|
2012-04-22 03:47:25 +00:00
|
|
|
Release: 0
|
2014-02-05 06:28:31 +00:00
|
|
|
Url: https://github.com/json-c/json-c/wiki
|
|
|
|
|
|
|
|
#Git-Clone git://github.com/json-c/json-c
|
2014-01-09 12:24:03 +00:00
|
|
|
Source0: https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
|
2011-08-29 08:06:28 +00:00
|
|
|
Source1: baselibs.conf
|
2014-01-09 12:24:03 +00:00
|
|
|
#Redone 0.11 patches
|
2013-03-07 10:37:34 +00:00
|
|
|
Patch0: %{name}-lfs.patch
|
2011-02-09 17:23:18 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-04-22 03:47:25 +00:00
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: pkg-config
|
2011-02-09 17:23:18 +00:00
|
|
|
|
|
|
|
%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}
|
2014-02-05 06:28:31 +00:00
|
|
|
Summary: JSON-C shared library
|
2011-02-09 17:23:18 +00:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libsoname}
|
2014-02-05 06:28:31 +00:00
|
|
|
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.
|
|
|
|
|
2011-02-09 17:23:18 +00:00
|
|
|
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}
|
2014-01-09 12:24:03 +00:00
|
|
|
Provides: %{oldlibname}-devel = %{version}
|
|
|
|
Obsoletes: %{oldlibname}-devel < %{version}
|
2011-02-09 17:23:18 +00:00
|
|
|
|
|
|
|
%description -n %{libname}-devel
|
2014-02-05 06:28:31 +00:00
|
|
|
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.
|
|
|
|
|
2011-02-09 17:23:18 +00:00
|
|
|
This package includes header files and scripts needed for developers
|
|
|
|
using the json-c library
|
|
|
|
|
|
|
|
%package -n %{libname}-doc
|
2013-03-07 10:37:34 +00:00
|
|
|
Summary: Documentation files
|
2011-02-09 17:23:18 +00:00
|
|
|
Group: Documentation/Other
|
2014-01-09 12:24:03 +00:00
|
|
|
Provides: %{oldlibname}-doc = %{version}
|
|
|
|
Obsoletes: %{oldlibname}-doc < %{version}
|
2011-02-09 17:23:18 +00:00
|
|
|
%if 0%{suse_version} >= 1120
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n %{libname}-doc
|
2014-02-05 06:28:31 +00:00
|
|
|
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-c documentation.
|
2011-02-09 17:23:18 +00:00
|
|
|
|
|
|
|
%prep
|
2014-02-05 06:28:31 +00:00
|
|
|
%setup -q
|
2013-03-07 10:37:34 +00:00
|
|
|
# Redone patches
|
2011-02-09 17:23:18 +00:00
|
|
|
%patch0 -p1
|
|
|
|
|
|
|
|
%build
|
2012-04-22 03:47:25 +00:00
|
|
|
autoreconf -fiv
|
2014-01-09 12:24:03 +00:00
|
|
|
%configure --disable-static --with-pic --disable-oldname-compat
|
2011-02-09 17:23:18 +00:00
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{__make} %{?_smp_mflags} check
|
|
|
|
|
|
|
|
%install
|
2014-01-09 12:24:03 +00:00
|
|
|
%makeinstall DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir}
|
2014-02-05 06:28:31 +00:00
|
|
|
rm -Rf "%buildroot/%_libdir"/*.la
|
2014-01-09 12:24:03 +00:00
|
|
|
# create a compatibilty pkg-config file for software needing it
|
|
|
|
(cd $RPM_BUILD_ROOT%{_libdir}/pkgconfig && ln -s json-c.pc json.pc)
|
2011-02-09 17:23:18 +00:00
|
|
|
|
|
|
|
%post -n %{libsoname} -p /sbin/ldconfig
|
2011-08-26 10:21:25 +00:00
|
|
|
|
2011-02-09 17:23:18 +00:00
|
|
|
%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
|
2014-01-09 12:24:03 +00:00
|
|
|
%{_includedir}/json-c
|
2011-02-09 17:23:18 +00:00
|
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
|
|
%files -n %{libname}-doc
|
|
|
|
%defattr(-,root,root)
|
2013-03-07 10:37:34 +00:00
|
|
|
%doc AUTHORS ChangeLog COPYING README README.html doc
|
2011-02-09 17:23:18 +00:00
|
|
|
|
|
|
|
%changelog
|