123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
- %define pkg_version 0.10
- %define pkg_release 1%{?_dist_release}
- Summary: A JSON implementation in C
- Name: json-c
- Version: %{pkg_version}
- Release: %{pkg_release}
- Source0: https://github.com/downloads/json-c/json-c/json-c-%{version}.tar.gz
- License: MIT
- Group: System Environment/Libraries
- URL: https://github.com/json-c/json-c/wiki
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- Vendor: Project Vine
- Distribution: Vine Linux
- Packager: Takemikaduchi
- %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 devel
- Summary: Development files for json-c
- Group: Development/Libraries
- Requires: %{name} = %{version}-%{release}
- Requires: pkgconfig
- %description devel
- This package contains the libraries and header files that are needed
- for writing applications that are using json-c.
- %package doc
- Summary: Documentation for json-c
- Group: Documentation
- Requires: %{name} = %{version}-%{release}
- BuildArch: noarch
- %description doc
- This package contains documentation for json-c.
- %package -n compat32-%{name}
- Summary: A JSON implementation in C
- Group: System Environment/Libraries
- Requires: %{name} = %{version}-%{release}
- %description -n compat32-%{name}
- 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 compat32-%{name}-devel
- Summary: Development files for json-c
- Group: Development/Libraries
- Requires: compat32-%{name} = %{version}-%{release}
- Requires: pkgconfig
- %description -n compat32-%{name}-devel
- This package contains the libraries and header files that are needed
- for writing applications that are using json-c.
- %prep
- %setup -q
- # 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
- %build
- %configure --enable-shared --disable-static
- %{__make} %{?_smp_mflags}
- %install
- %{__rm} -rf $RPM_BUILD_ROOT
- %{__make} install DESTDIR=$RPM_BUILD_ROOT
- %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
- %clean
- %{__rm} -rf $RPM_BUILD_ROOT
- %post -p /sbin/ldconfig
- %postun -p /sbin/ldconfig
- %post -n compat32-%{name} -p /sbin/ldconfig
- %postun -n compat32-%{name} -p /sbin/ldconfig
- %files
- %defattr(-,root,root,-)
- %doc COPYING ChangeLog COPYING NEWS README README.html
- %{_libdir}/libjson.so.*
- %files devel
- %defattr(-,root,root,-)
- %{_includedir}/json/*
- %{_libdir}/libjson.so
- %{_libdir}/pkgconfig/json.pc
- %files doc
- %defattr(-,root,root,-)
- %doc doc/html/*
- %if %{build_compat32}
- %files -n compat32-%{name}
- %defattr(-,root,root,-)
- %{_libdir}/libjson.so.*
- %files -n compat32-%{name}-devel
- %defattr(-,root,root,-)
- %{_libdir}/libjson.so
- %{_libdir}/pkgconfig/json.pc
- %endif
- %changelog
- * Wed Nov 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10-1
- - update to 0.10
- - update URL
- * Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-2
- - create compat32 sub packages
- * Fri Oct 07 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-1
- - initial build for Vine Linux
|