8 Star 0 Fork 11

src-openEuler / rapidjson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rapidjson.spec 3.51 KB
一键复制 编辑 原始数据 按行查看 历史
%global debug_package %{nil}
Name: rapidjson
Version: 1.1.0
Release: 11
Summary: small & selft-contained fast JSON parser and generator for C++
License: MIT
URL: http://miloyip.github.io/rapidjson
Source0: https://github.com/miloyip/rapidjson/archive/v%{version}.tar.gz#/rapidjson-%{version}.tar.gz
Patch0000: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch
BuildRequires: cmake gcc-c++ gtest-devel valgrind
%description
RapidJSON as a fast JSON parser which generator for c++. It`s inspired by
RapidXML. It`s supports both SAX & DOM style API. It`s small but complete.
It`s fast, It`s preformance can be comparabel to strlen(). It`s self-contained.
It doesn`t depend on external libraries such as BOOST. It`s Unicode and
memory friendly, each JSON valude occupies exactly 16/20 bytes for most
32/64-bit machines. It`s suport UTF-8 UTF-16 UTF-32 (LE & BE).
%package devel
Summary: small & selft-contained fast JSON parser and generator for C++
BuildArch: noarch
Provides: rapidjson = %{version}-%{release}
Provides: rapidjson-static = %{version}-%{release}
%description devel
RapidJSON as a fast JSON parser which generator for c++. It`s inspired by
RapidXML. It`s supports both SAX & DOM style API. It`s small but complete.
It`s fast, It`s preformance can be comparabel to strlen(). It`s self-contained.
It doesn`t depend on external libraries such as BOOST. It`s Unicode and
memory friendly, each JSON valude occupies exactly 16/20 bytes for most
32/64-bit machines. It`s suport UTF-8 UTF-16 UTF-32 (LE & BE).
%package help
Summary: Documentation-files for rapidjson
BuildArch: noarch
BuildRequires: hardlink doxygen
Provides: rapidjson-doc = %{version}-%{release}
Obsoletes: rapidjson-doc < %{version}-%{release}
%description help
This package provides docs for rapidjson.
%prep
%autosetup -n rapidjson-%{version} -p1
install -d build
for _file in "license.txt" $(%{_bindir}/find example -type f -name '*.c*')
do
%{__sed} -e 's!\r$!!g' < ${_file} > ${_file}.new && \
/bin/touch -r ${_file} ${_file}.new && \
%{__mv} -f ${_file}.new ${_file}
done
%{__cp} -a example examples
%{_bindir}/find . -type f -name 'CMakeLists.txt' -print0 | \
%{_bindir}/xargs -0 %{__sed} -i -e's![ \t]*-march=native!!g' -e's![ \t]*-Werror!!g'
%build
cd build
%cmake -DDOC_INSTALL_DIR=%{_pkgdocdir} -DRAPIDJSON_BUILD_CXX11:BOOL=OFF -DGTESTSRC_FOUND=TRUE -DGTEST_SOURCE_DIR=. ..
%make_build
cd -
%install
cd build
%make_install
cd -
%{__mv} -f %{buildroot}%{_libdir}/* %{buildroot}%{_datadir}
%{__cp} -a CHANGELOG.md readme*.md examples %{buildroot}%{_pkgdocdir}
%{_bindir}/find %{buildroot} -type f -name 'CMake*.txt' -print0 | \
%{_bindir}/xargs -0 %{__rm} -fv
hardlink -v %{buildroot}%{_includedir}
hardlink -v %{buildroot}%{_pkgdocdir}
%check
CTEST_EXCLUDE=".*valgrind.*"
cd build
%{_bindir}/ctest -E "${CTEST_EXCLUDE}" -V .
cd -
%files devel
%license license.txt
%doc %dir %{_pkgdocdir}
%doc %{_pkgdocdir}/{CHANGELOG.md,readme*.md}
%{_datadir}/cmake
%{_datadir}/pkgconfig/*
%{_includedir}/rapidjson
%files help
%license %{_datadir}/licenses/rapidjson*
%doc %{_pkgdocdir}
%changelog
* Fri Aug 25 2023 liyanan <thistleslyn@163.com> - 1.1.0-11
- Do not force C++11: gtest 1.13.0 requires at least C++14
* Wed Jul 29 2020 lingsheng <lingsheng@huawei.com> - 1.1.0-10
- Not use hardlink absolute path
* Mon Jun 8 2020 Jeffery.Gao <gaojianxing@huawei.com> - 1.1.0-9
- Package init
1
https://gitee.com/src-openeuler/rapidjson.git
git@gitee.com:src-openeuler/rapidjson.git
src-openeuler
rapidjson
rapidjson
master

搜索帮助