]> git.pld-linux.org Git - packages/json-c.git/blob - json-c.spec
a2f069816b5cb1a68a43ecbba234d2f1c4808206
[packages/json-c.git] / json-c.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4
5 Summary:        A JSON implementation in C
6 Summary(pl.UTF-8):      Implementacja JSON w C
7 Name:           json-c
8 Version:        0.14
9 Release:        1
10 License:        MIT
11 Group:          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!)
14 Source0:        https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
15 # Source0-md5:  72cbb065b43376d825cd521d115ae1f6
16 URL:            https://github.com/json-c/json-c/wiki
17 BuildRequires:  cmake >= 2.8
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 JSON-C implements a reference counting object model that allows you to
22 easily construct JSON objects in C, output them as JSON formatted
23 strings and parse JSON formatted strings back into the C
24 representation of JSON objects.
25
26 %description -l pl.UTF-8
27 JSON-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
29 formacie JSON i analizować łańcuchy w formacie JSON tworząc z powrotem
30 reprezentacje obiektów JSON w C.
31
32 %package devel
33 Summary:        Header files for the json-c library
34 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki json-c
35 Group:          Development/Libraries
36 Requires:       %{name} = %{version}-%{release}
37
38 %description devel
39 Header files for the json-c library.
40
41 %description devel -l pl.UTF-8
42 Pliki nagłówkowe biblioteki json-c.
43
44 %package static
45 Summary:        Static json-c library
46 Summary(pl.UTF-8):      Statyczna biblioteka json-c
47 Group:          Development/Libraries
48 Requires:       %{name}-devel = %{version}-%{release}
49
50 %description static
51 Static json-c library.
52
53 %description static -l pl.UTF-8
54 Statyczna biblioteka json-c.
55
56 %prep
57 %setup -q
58
59 %build
60 %if %{with static_libs}
61 install -d build-static
62 cd build-static
63 %cmake .. \
64         -DBUILD_SHARED_LIBS=OFF
65
66 %{__make}
67 cd ..
68 %endif
69
70 install -d build
71 cd build
72 %cmake ..
73
74 %{__make}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with static_libs}
80 %{__make} -C build-static install \
81         DESTDIR=$RPM_BUILD_ROOT
82 %endif
83
84 %{__make} -C build install \
85         DESTDIR=$RPM_BUILD_ROOT
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post   -p /sbin/ldconfig
91 %postun -p /sbin/ldconfig
92
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
97 if [ -d %{_includedir}/json -a ! -d %{_includedir}/json-c ]; then
98         mv -f %{_includedir}/json %{_includedir}/json-c
99         ln -sf json-c %{_includedir}/json
100 fi
101
102 %files
103 %defattr(644,root,root,755)
104 %doc AUTHORS COPYING ChangeLog README README.html
105 %attr(755,root,root) %{_libdir}/libjson-c.so.*.*.*
106 %attr(755,root,root) %ghost %{_libdir}/libjson-c.so.5
107
108 %files devel
109 %defattr(644,root,root,755)
110 %attr(755,root,root) %{_libdir}/libjson-c.so
111 %{_includedir}/json-c
112 %{_pkgconfigdir}/json-c.pc
113 %{_libdir}/cmake/json-c
114
115 %if %{with static_libs}
116 %files static
117 %defattr(644,root,root,755)
118 %{_libdir}/libjson-c.a
119 %endif
This page took 0.083 seconds and 2 git commands to generate.