]> git.pld-linux.org Git - packages/json-c.git/blame - json-c.spec
- updated to 0.15
[packages/json-c.git] / json-c.spec
CommitLineData
1bd4b30f
JB
1#
2# Conditional build:
3%bcond_without static_libs # static library
4
990e8f22 5Summary: A JSON implementation in C
d42ebe80 6Summary(pl.UTF-8): Implementacja JSON w C
990e8f22 7Name: json-c
d8ad274d 8Version: 0.15
1466ae76 9Release: 1
d42ebe80 10License: MIT
6cafbf58 11Group: Libraries
bfee6771 12#Source0Download: https://s3.amazonaws.com/json-c_releases/releases/index.html # with AJAX (requires JavaScript)
c485846d 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!)
040cc79c 14Source0: https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
d8ad274d 15# Source0-md5: 55f395745ee1cb3a4a39b41636087501
040cc79c 16URL: https://github.com/json-c/json-c/wiki
1bd4b30f 17BuildRequires: cmake >= 2.8
990e8f22
AM
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
d42ebe80
JB
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
990e8f22
AM
32%package devel
33Summary: Header files for the json-c library
d42ebe80 34Summary(pl.UTF-8): Pliki nagłówkowe biblioteki json-c
990e8f22
AM
35Group: Development/Libraries
36Requires: %{name} = %{version}-%{release}
37
38%description devel
39Header files for the json-c library.
40
d42ebe80
JB
41%description devel -l pl.UTF-8
42Pliki nagłówkowe biblioteki json-c.
43
990e8f22
AM
44%package static
45Summary: Static json-c library
d42ebe80 46Summary(pl.UTF-8): Statyczna biblioteka json-c
990e8f22
AM
47Group: Development/Libraries
48Requires: %{name}-devel = %{version}-%{release}
49
50%description static
51Static json-c library.
52
d42ebe80
JB
53%description static -l pl.UTF-8
54Statyczna biblioteka json-c.
55
990e8f22
AM
56%prep
57%setup -q
58
59%build
1bd4b30f
JB
60%if %{with static_libs}
61install -d build-static
62cd build-static
63%cmake .. \
64 -DBUILD_SHARED_LIBS=OFF
65
66%{__make}
67cd ..
68%endif
69
70install -d build
71cd build
72%cmake ..
73
74%{__make}
990e8f22
AM
75
76%install
77rm -rf $RPM_BUILD_ROOT
78
1bd4b30f
JB
79%if %{with static_libs}
80%{__make} -C build-static install \
990e8f22 81 DESTDIR=$RPM_BUILD_ROOT
1bd4b30f 82%endif
990e8f22 83
1bd4b30f
JB
84%{__make} -C build install \
85 DESTDIR=$RPM_BUILD_ROOT
2233c506 86
990e8f22
AM
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%post -p /sbin/ldconfig
91%postun -p /sbin/ldconfig
92
6cafbf58
JB
93%pretrans devel
94# transition from 0.11-2
95[ ! -L %{_includedir}/json-c ] || rm -f %{_includedir}/json-c
96# transition from <= 0.10 and 0.11-2
97if [ -d %{_includedir}/json -a ! -d %{_includedir}/json-c ]; then
98 mv -f %{_includedir}/json %{_includedir}/json-c
99 ln -sf json-c %{_includedir}/json
100fi
101
990e8f22
AM
102%files
103%defattr(644,root,root,755)
d42ebe80 104%doc AUTHORS COPYING ChangeLog README README.html
2233c506 105%attr(755,root,root) %{_libdir}/libjson-c.so.*.*.*
1bd4b30f 106%attr(755,root,root) %ghost %{_libdir}/libjson-c.so.5
990e8f22
AM
107
108%files devel
109%defattr(644,root,root,755)
2233c506 110%attr(755,root,root) %{_libdir}/libjson-c.so
2233c506 111%{_includedir}/json-c
2233c506 112%{_pkgconfigdir}/json-c.pc
1bd4b30f 113%{_libdir}/cmake/json-c
990e8f22 114
1bd4b30f 115%if %{with static_libs}
990e8f22
AM
116%files static
117%defattr(644,root,root,755)
2233c506 118%{_libdir}/libjson-c.a
1bd4b30f 119%endif
This page took 0.072058 seconds and 4 git commands to generate.