| 1 | Name:           json-c | 
|---|
| 2 | Version:        0.10 | 
|---|
| 3 | Release:        2%{?dist} | 
|---|
| 4 | Summary:        A JSON implementation in C | 
|---|
| 5 | Group:          Development/Libraries | 
|---|
| 6 | License:        MIT | 
|---|
| 7 | URL:            http://oss.metaparadigm.com/json-c/ | 
|---|
| 8 | Source0:        http://oss.metaparadigm.com/json-c/json-c-%{version}.tar.gz | 
|---|
| 9 | Patch0:         json-c-os2.patch | 
|---|
| 10 | Source1:        json-c-libtool.os2 | 
|---|
| 11 |  | 
|---|
| 12 | BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | 
|---|
| 13 |  | 
|---|
| 14 |  | 
|---|
| 15 | %description | 
|---|
| 16 | JSON-C implements a reference counting object model that allows you to easily | 
|---|
| 17 | construct JSON objects in C, output them as JSON formatted strings and parse | 
|---|
| 18 | JSON formatted strings back into the C representation of JSON objects. | 
|---|
| 19 |  | 
|---|
| 20 | %package devel | 
|---|
| 21 | Summary:        Development headers and library for json-c | 
|---|
| 22 | Group:          Development/Libraries | 
|---|
| 23 | Requires:       %{name} = %{version}-%{release} | 
|---|
| 24 | Requires:       pkgconfig | 
|---|
| 25 |  | 
|---|
| 26 | %description devel | 
|---|
| 27 | This package contains the development headers and library for json-c. | 
|---|
| 28 |  | 
|---|
| 29 |  | 
|---|
| 30 | %package doc | 
|---|
| 31 | Summary:        Reference manual for json-c | 
|---|
| 32 | Group:          Documentation | 
|---|
| 33 | BuildArch:      noarch | 
|---|
| 34 |  | 
|---|
| 35 | %description doc | 
|---|
| 36 | This package contains the reference manual for json-c. | 
|---|
| 37 |  | 
|---|
| 38 | %prep | 
|---|
| 39 | %setup -q | 
|---|
| 40 | %patch0 -p1 -b .os2~ | 
|---|
| 41 | cp %{SOURCE1} libtool.os2 | 
|---|
| 42 |  | 
|---|
| 43 |  | 
|---|
| 44 | %build | 
|---|
| 45 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe" | 
|---|
| 46 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" | 
|---|
| 47 | export LIBS="-lurpo -lmmap" | 
|---|
| 48 | %configure \ | 
|---|
| 49 | --enable-shared --disable-static \ | 
|---|
| 50 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache" | 
|---|
| 51 |  | 
|---|
| 52 | make %{?_smp_mflags} | 
|---|
| 53 |  | 
|---|
| 54 | %install | 
|---|
| 55 | rm -rf %{buildroot} | 
|---|
| 56 | make install DESTDIR=%{buildroot} | 
|---|
| 57 | # Get rid of la files | 
|---|
| 58 | rm -rf %{buildroot}%{_libdir}/*.la | 
|---|
| 59 | rm -rf %{buildroot}%{_libdir}/*.a | 
|---|
| 60 |  | 
|---|
| 61 | %clean | 
|---|
| 62 | rm -rf %{buildroot} | 
|---|
| 63 |  | 
|---|
| 64 | %files | 
|---|
| 65 | %defattr(-,root,root,-) | 
|---|
| 66 | %doc AUTHORS ChangeLog COPYING NEWS README README.html | 
|---|
| 67 | %{_libdir}/*.dll | 
|---|
| 68 |  | 
|---|
| 69 | %files devel | 
|---|
| 70 | %defattr(-,root,root,-) | 
|---|
| 71 | %{_includedir}/json/ | 
|---|
| 72 | %{_libdir}/*.lib | 
|---|
| 73 | %{_libdir}/pkgconfig/json.pc | 
|---|
| 74 |  | 
|---|
| 75 | %files doc | 
|---|
| 76 | %defattr(-,root,root,-) | 
|---|
| 77 | %doc doc/html/* | 
|---|
| 78 |  | 
|---|
| 79 | %changelog | 
|---|
| 80 | * Sat Dec 29 2012 yd | 
|---|
| 81 | - add object iterator to library, reduce exports to API only. | 
|---|
| 82 |  | 
|---|
| 83 | * Fri Dec 28 2012 yd | 
|---|
| 84 | - initial build. | 
|---|