source: spec/trunk/SPECS/json-c.spec@ 1010

Last change on this file since 1010 was 327, checked in by Yuri Dario, 13 years ago

spec: json-c build added.

File size: 1.9 KB
Line 
1Name: json-c
2Version: 0.10
3Release: 2%{?dist}
4Summary: A JSON implementation in C
5Group: Development/Libraries
6License: MIT
7URL: http://oss.metaparadigm.com/json-c/
8Source0: http://oss.metaparadigm.com/json-c/json-c-%{version}.tar.gz
9Patch0: json-c-os2.patch
10Source1: json-c-libtool.os2
11
12BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
13
14
15%description
16JSON-C implements a reference counting object model that allows you to easily
17construct JSON objects in C, output them as JSON formatted strings and parse
18JSON formatted strings back into the C representation of JSON objects.
19
20%package devel
21Summary: Development headers and library for json-c
22Group: Development/Libraries
23Requires: %{name} = %{version}-%{release}
24Requires: pkgconfig
25
26%description devel
27This package contains the development headers and library for json-c.
28
29
30%package doc
31Summary: Reference manual for json-c
32Group: Documentation
33BuildArch: noarch
34
35%description doc
36This package contains the reference manual for json-c.
37
38%prep
39%setup -q
40%patch0 -p1 -b .os2~
41cp %{SOURCE1} libtool.os2
42
43
44%build
45export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
46export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
47export LIBS="-lurpo -lmmap"
48%configure \
49 --enable-shared --disable-static \
50 "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
51
52make %{?_smp_mflags}
53
54%install
55rm -rf %{buildroot}
56make install DESTDIR=%{buildroot}
57# Get rid of la files
58rm -rf %{buildroot}%{_libdir}/*.la
59rm -rf %{buildroot}%{_libdir}/*.a
60
61%clean
62rm -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.
Note: See TracBrowser for help on using the repository browser.