# # spec file for package rapidjson # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %global debug_package %{nil} Name: rapidjson Version: 1.0.2 Release: 0 Summary: Fast JSON parser and generator for C++ License: MIT Group: Development/Libraries/C and C++ Url: http://miloyip.github.io/%{name} Source0: https://github.com/miloyip/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkg-config %description RapidJSON is a JSON parser and generator for C++. It was inspired by RapidXml. - it is small but complete. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code. - it is fast. Its performance can be comparable to strlen(). It also optionally supports SSE2/SSE4.2 for acceleration. - it is self-contained and header-only. It does not depend on external libraries such as BOOST. It even does not depend on STL. - it is memory-friendly. Each JSON value occupies exactly 16/20 bytes for most 32/64-bit machines (excluding text string). By default it uses a fast memory allocator, and the parser allocates memory compactly during parsing. - it is Unicode-friendly. It supports UTF-8, UTF-16, UTF-32 (LE & BE), and their detection, validation and transcoding internally. For example, you can read a UTF-8 file and let RapidJSON transcode the JSON strings into UTF-16 in the DOM. It also supports surrogates and "\u0000" (null character). %package devel Summary: Fast JSON parser and generator for C++ Group: Development/Libraries/C and C++ Provides: %{name} == %{version} BuildArch: noarch %description devel RapidJSON is a JSON parser and generator for C++. %package doc Summary: Fast JSON parser and generator for C++ Group: Documentation/Other BuildArch: noarch %description doc RapidJSON is a JSON parser and generator for C++. This package contains the documentation. %prep %setup -q %build %cmake \ -DDOC_INSTALL_DIR=%{_docdir}/%{name} %install %cmake_install # Move pkgconfig und CMake-stuff to generic datadir. mv -f %{buildroot}%{_libdir}/* %{buildroot}%{_datadir} %files devel %defattr(-,root,root) %doc license.txt %{_datadir}/cmake %{_datadir}/pkgconfig/* %{_includedir}/%{name} %files doc %defattr(-,root,root) %dir %{_docdir}/%{name} %{_docdir}/%{name}/* %changelog