summaryrefslogtreecommitdiff
path: root/jansson.spec
blob: 495f49644c0c27321f18dcc742ffd44faa968f2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#
# Conditional build:
%bcond_without	apidocs		# do not build and package API docs
%bcond_without	static_libs	# don't build static libraries

Summary:	C library for encoding, decoding and manipulating JSON data
Summary(pl.UTF-8):	Biblioteka C do kodowania, dekodowania i obróbki danych JSON
Name:		jansson
Version:	2.13.1
Release:	1
License:	MIT
Group:		Libraries
Source0:	http://digip.org/jansson/releases/%{name}-%{version}.tar.bz2
# Source0-md5:	e343e5b2e8fac568a00a8ca36dc01ebe
URL:		http://digip.org/jansson/
BuildRequires:	autoconf >= 2.60
BuildRequires:	automake >= 1:1.10
BuildRequires:	libtool
BuildRequires:	rpmbuild(macros) >= 1.752
%{?with_apidocs:BuildRequires:	sphinx-pdg}
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Jansson is a C library for encoding, decoding and manipulating JSON
data. It features:
- Simple and intuitive API and data model
- Comprehensive documentation
- No dependencies on other libraries
- Full Unicode support (UTF-8)
- Extensive test suite

%description -l pl.UTF-8
Jansson to biblioteka C do kodowania, dekodowania oraz obróbki danych
JSON. Cechują ją:
- proste i intuicyjne API oraz model danych
- wyczerpująca dokumentacja
- brak zależności od innych bibliotek
- pełna obsługa Unicode (UTF-8)
- obszerny zestaw testów

%package devel
Summary:	Header files for %{name} library
Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki %{name}
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
Header files for %{name} library.

%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki %{name}.

%package static
Summary:	Static %{name} library
Summary(pl.UTF-8):	Statyczna biblioteka %{name}
Group:		Development/Libraries
Requires:	%{name}-devel = %{version}-%{release}

%description static
Static %{name} library.

%description static -l pl.UTF-8
Statyczna biblioteka %{name}.

%package apidocs
Summary:	%{name} API documentation
Summary(pl.UTF-8):	Dokumentacja API biblioteki %{name}
Group:		Documentation
BuildArch:	noarch

%description apidocs
API documentation for %{name} library.

%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki %{name}.

%prep
%setup -q

%build
%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
	%{!?with_static_libs:--disable-static}
%{__make}

%if %{with apidocs}
%{__make} -C doc html
%endif

%install
rm -rf $RPM_BUILD_ROOT

%{__make} install \
	DESTDIR=$RPM_BUILD_ROOT

%{__rm} $RPM_BUILD_ROOT%{_libdir}/libjansson.la

%clean
rm -rf $RPM_BUILD_ROOT

%post	-p /sbin/ldconfig
%postun	-p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%doc CHANGES LICENSE README.rst
%attr(755,root,root) %{_libdir}/libjansson.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libjansson.so.4

%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libjansson.so
%{_includedir}/jansson*.h
%{_pkgconfigdir}/jansson.pc

%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libjansson.a
%endif

%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%doc doc/_build/html
%endif