3 %bcond_without tests # build without tests
5 Summary: Yet Another JSON Library
6 Summary(pl.UTF-8): Yet Another JSON Library - jeszcze jedna biblioteka JSON
12 Source0: https://github.com/lloyd/yajl/archive/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: 6887e0ed7479d2549761a4d284d3ecb0
14 Patch0: %{name}-pc.patch
15 URL: http://lloyd.github.io/yajl/
16 BuildRequires: cmake >= 2.6
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 YAJL (Yet Another JSON Library) is a JSON parsing library written in
23 %description -l pl.UTF-8
24 YAJL (Yet Another JSON Library, czyli jeszcze jedna biblioteka JSON)
25 to biblioteka analizatora JSON napisana w C.
28 Summary: Header files for YAJL library
29 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki YAJL
30 Group: Development/Libraries
31 Requires: %{name} = %{version}-%{release}
34 Header files for YAJL library.
36 %description devel -l pl.UTF-8
37 Pliki nagłówkowe biblioteki YAJL.
40 Summary: Static YAJL library
41 Summary(pl.UTF-8): Statyczna biblioteka YAJL
42 Group: Development/Libraries
43 Requires: %{name}-devel = %{version}-%{release}
48 %description static -l pl.UTF-8
49 Statyczna biblioteka YAJL.
55 %if "%{pld_release}" == "ac"
56 #cc1: error: unrecognized option `-Wextra'
57 #cc1: error: unrecognized option `-Wold-style-definition'
58 %{__sed} -i -e 's/-Wold-style-definition//' CMakeLists.txt
59 %{__sed} -i -e 's/-Wextra//' CMakeLists.txt
67 -DLIB_INSTALL_DIR=%{_libdir}
70 %{?with_tests:%{__make} test}
73 rm -rf $RPM_BUILD_ROOT
75 %{__make} -C build install \
76 DESTDIR=$RPM_BUILD_ROOT
79 rm -rf $RPM_BUILD_ROOT
81 %post -p /sbin/ldconfig
82 %postun -p /sbin/ldconfig
85 %defattr(644,root,root,755)
86 %doc COPYING ChangeLog README TODO
87 %attr(755,root,root) %{_bindir}/json_reformat
88 %attr(755,root,root) %{_bindir}/json_verify
89 %attr(755,root,root) %{_libdir}/libyajl.so.*.*.*
90 %attr(755,root,root) %ghost %{_libdir}/libyajl.so.2
93 %defattr(644,root,root,755)
94 %attr(755,root,root) %{_libdir}/libyajl.so
96 %{_pkgconfigdir}/yajl.pc
99 %defattr(644,root,root,755)
100 %{_libdir}/libyajl_s.a