- update to 0.11

- fix source0
- enable both json and json-c libraries
This commit is contained in:
Remi Collet 2013-05-04 09:44:05 +02:00
parent a854aaeb57
commit 2332865d96
3 changed files with 42 additions and 13 deletions

3
.gitignore vendored
View File

@ -0,0 +1,3 @@
json-c.spec~
clog
/json-c-0.11-20130402.tar.gz

View File

@ -1,12 +1,16 @@
%global reldate 20130402
Name: json-c Name: json-c
Version: 0.10 Version: 0.11
Release: 3%{?dist} Release: 1%{?dist}
Summary: A JSON implementation in C Summary: A JSON implementation in C
Group: Development/Libraries Group: Development/Libraries
License: MIT License: MIT
URL: https://github.com/json-c/json-c/wiki 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) BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: libtool
%description %description
JSON-C implements a reference counting object model that allows you to easily 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. This package contains the reference manual for json-c.
%prep %prep
%setup -q %setup -q -n json-c-json-c-%{version}-%{reldate}
for doc in ChangeLog; do for doc in ChangeLog; do
iconv -f iso-8859-1 -t utf8 $doc > $doc.new && iconv -f iso-8859-1 -t utf8 $doc > $doc.new &&
touch -r $doc $doc.new && touch -r $doc $doc.new &&
mv $doc.new $doc mv $doc.new $doc
done done
# Hack to get json_object_iterator.c compiled # regenerate auto stuff to avoid rpath issue
sed -e 's/json_object.c/json_object.c json_object_iterator.c/' \ autoreconf -fi
-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
%build %build
%configure --enable-shared --disable-static %configure --enable-shared --disable-static --disable-rpath
make %{?_smp_mflags} # parallel build is broken for now, make %{?_smp_mflags}
make
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
make install DESTDIR=%{buildroot} make install DESTDIR=%{buildroot}
# Get rid of la files # Get rid of la files
rm -rf %{buildroot}%{_libdir}/*.la 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 %clean
rm -rf %{buildroot} rm -rf %{buildroot}
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README README.html %doc AUTHORS ChangeLog COPYING NEWS README README.html
%{_libdir}/libjson.so.* %{_libdir}/libjson.so.*
%{_libdir}/libjson-c.so.*
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_includedir}/json/ %{_includedir}/json
%{_includedir}/json-c
%{_libdir}/libjson.so %{_libdir}/libjson.so
%{_libdir}/libjson-c.so
%{_libdir}/pkgconfig/json.pc %{_libdir}/pkgconfig/json.pc
%{_libdir}/pkgconfig/json-c.pc
%files doc %files doc
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc doc/html/* %doc doc/html/*
%changelog %changelog
* Mon Apr 29 2013 Remi Collet <remi@fedoraproject.org> - 0.11-1
- update to 0.11
- fix source0
- enable both json and json-c libraries
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-3 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

View File

@ -1 +1 @@
a4edc79410eb894f08d7d52ca9f88732 json-c-0.10.tar.gz 7013b2471a507942eb8ed72a5d872d16 json-c-0.11-20130402.tar.gz