]> git.pld-linux.org Git - packages/json-c.git/blame_incremental - json-c.spec
- updated to 0.17
[packages/json-c.git] / json-c.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without static_libs # static library
4
5Summary: A JSON implementation in C
6Summary(pl.UTF-8): Implementacja JSON w C
7Name: json-c
8Version: 0.17
9Release: 1
10License: MIT
11Group: Libraries
12#Source0Download: https://s3.amazonaws.com/json-c_releases/releases/index.html # with AJAX (requires JavaScript)
13# XML data with links (relative to https://s3.amazonaws.com/json-c_releases/) in https://s3.amazonaws.com/json-c_releases (no "/" at the end!)
14Source0: https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
15# Source0-md5: bad8f5e91b7b2563ee2d507054c70eb2
16URL: https://github.com/json-c/json-c/wiki
17BuildRequires: cmake >= 3.9
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
21JSON-C implements a reference counting object model that allows you to
22easily construct JSON objects in C, output them as JSON formatted
23strings and parse JSON formatted strings back into the C
24representation of JSON objects.
25
26%description -l pl.UTF-8
27JSON-C implementuje model obiektów ze zliczaniem odwołań, pozwalający
28łatwo konstruować obiekty JSON w C, wypisywać je w postaci łańcuchów w
29formacie JSON i analizować łańcuchy w formacie JSON tworząc z powrotem
30reprezentacje obiektów JSON w C.
31
32%package devel
33Summary: Header files for the json-c library
34Summary(pl.UTF-8): Pliki nagłówkowe biblioteki json-c
35Group: Development/Libraries
36Requires: %{name} = %{version}-%{release}
37
38%description devel
39Header files for the json-c library.
40
41%description devel -l pl.UTF-8
42Pliki nagłówkowe biblioteki json-c.
43
44%package static
45Summary: Static json-c library
46Summary(pl.UTF-8): Statyczna biblioteka json-c
47Group: Development/Libraries
48Requires: %{name}-devel = %{version}-%{release}
49
50%description static
51Static json-c library.
52
53%description static -l pl.UTF-8
54Statyczna biblioteka json-c.
55
56%prep
57%setup -q
58
59%build
60install -d build
61cd build
62%cmake .. \
63 %{!?with_static_libs:-DBUILD_STATIC_LIBS=OFF}
64
65%{__make}
66
67%install
68rm -rf $RPM_BUILD_ROOT
69
70%{__make} -C build install \
71 DESTDIR=$RPM_BUILD_ROOT
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%post -p /sbin/ldconfig
77%postun -p /sbin/ldconfig
78
79%pretrans devel
80# transition from 0.11-2
81[ ! -L %{_includedir}/json-c ] || rm -f %{_includedir}/json-c
82# transition from <= 0.10 and 0.11-2
83if [ -d %{_includedir}/json -a ! -d %{_includedir}/json-c ]; then
84 mv -f %{_includedir}/json %{_includedir}/json-c
85 ln -sf json-c %{_includedir}/json
86fi
87
88%files
89%defattr(644,root,root,755)
90%doc AUTHORS COPYING ChangeLog README README.html
91%attr(755,root,root) %{_libdir}/libjson-c.so.*.*.*
92%attr(755,root,root) %ghost %{_libdir}/libjson-c.so.5
93
94%files devel
95%defattr(644,root,root,755)
96%attr(755,root,root) %{_libdir}/libjson-c.so
97%{_includedir}/json-c
98%{_pkgconfigdir}/json-c.pc
99%{_libdir}/cmake/json-c
100
101%if %{with static_libs}
102%files static
103%defattr(644,root,root,755)
104%{_libdir}/libjson-c.a
105%endif
This page took 0.07658 seconds and 5 git commands to generate.