Package rapidjson: Specfile
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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | %define _unpackaged_files_terminate_build 1 %def_with docs %ifarch %valgrind_arches %def_enable valgrind %endif Name: rapidjson Version: 1.1.0 Release: alt8.git473553bd Summary: Fast JSON parser and generator for C++ License: MIT Group: Development/C++ Url: https://rapidjson.org/ Vcs: https://github.com/Tencent/rapidjson.git Source: %name-%version.tar Patch0: %name-%version-%release.patch # Downstream-patch for gtest. Patch1: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch # The in-tree config is not needed for an RPM Patch2: rapidjson-1.1.0-alt-no-intree-config.patch BuildRequires(pre): rpm-macros-cmake BuildRequires(pre): rpm-macros-valgrind BuildRequires: cmake gcc-c++ BuildRequires: libgtest-devel %{?_enable_valgrind:BuildRequires: valgrind} %{?_with_docs:BuildRequires: doxygen python3-module-pydot} %description RapidJSON is a fast JSON parser and generator for C++. It was inspired by RapidXml. RapidJSON is small but complete. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code. RapidJSON is fast. Its performance can be comparable to strlen(). It also optionally supports SSE2/SSE4.1 for acceleration. RapidJSON is self-contained. It does not depend on external libraries such as BOOST. It even does not depend on STL. RapidJSON 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. RapidJSON 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). JSON(JavaScript Object Notation) is a light-weight data exchange format. RapidJSON should be in fully compliance with RFC4627/ECMA-404. %package devel Summary: Fast JSON parser and generator for C++ Group: Development/C++ Provides: %name = %EVR %description devel RapidJSON is a fast JSON parser and generator for C++. It was inspired by RapidXml. RapidJSON is small but complete. It supports both SAX and DOM style API. The SAX parser is only a half thousand lines of code. RapidJSON is fast. Its performance can be comparable to strlen(). It also optionally supports SSE2/SSE4.1 for acceleration. RapidJSON is self-contained. It does not depend on external libraries such as BOOST. It even does not depend on STL. RapidJSON 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. RapidJSON 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). JSON(JavaScript Object Notation) is a light-weight data exchange format. RapidJSON should be in fully compliance with RFC4627/ECMA-404. %package doc Summary: Documentation-files for %name Group: Documentation BuildArch: noarch %description doc This package contains the documentation-files for %name. %prep %setup %autopatch -p1 # Fix 'W: wrong-file-end-of-line-encoding'. find example -type f -name '*.c*' -print0 | xargs -r0 subst -p 's!\r$!!g' license.txt # Create an uncluttered backup of examples for inclusion in %%doc. cp -a example examples # Disable -Werror. find . -type f -name 'CMakeLists.txt' -print0 | xargs -r0 sed -i -e's![ \t]*-march=native!!g' -e's![ \t]*-Werror!!g' # c++11 does not work with gtest 1.13+ sed -i 's/ -std=c++11//' CMakeLists.txt %build %cmake \ -DDOC_INSTALL_DIR=%_docdir/%name-doc-%version \ -DGTESTSRC_FOUND=TRUE \ -DGTEST_SOURCE_DIR=. %cmake_build %install %cmakeinstall_std # Copy the documentation-files to final location. cp -at %buildroot%_docdir/%name-doc-%version -- examples #Removing duplicate readme.md with meta package devel. rm -f %buildroot%_docdir/%name-doc-%version/readme.md # Find and purge build-sys files. find %buildroot -type f -name 'CMake*.txt' -print0 | xargs -r0 rm -fv -- %check %_cmake__builddir/bin/unittest %files devel %doc license.txt CHANGELOG.md readme*.md %_libdir/cmake/* %_pkgconfigdir/* %_includedir/%name %files doc %doc %_docdir/%name-doc-%version/examples %if_with docs %doc %_docdir/%name-doc-%version/html %endif # docs %changelog * Thu Oct 05 2023 Ivan A. Melnikov <iv@altlinux.org> 1.1.0-alt8.git473553bd - Fix installation of pkg-config and cmake files (fixes build on loongarch64 and riscv64); - Add simple %%check section. * Mon Oct 02 2023 Ilya Kurdyukov <ilyakurdyukov@altlinux.org> 1.1.0-alt7.git473553bd - Fixed build for Elbrus. * Tue Sep 26 2023 Aleksei Kalinin <kaa@altlinux.org> 1.1.0-alt6.git473553bd - Location of documentation files has been sepporated. - Add missing cmake instructions file for x86_64 arch. - Add option to spec for strict check unpacked files. * Mon May 15 2023 Aleksei Kalinin <kaa@altlinux.org> 1.1.0-alt5.git473553bd - Added cursor wrapper support. Required for OpenTimelineIO package. - Changed GIT package strategy and worktree - Other upstream updates. * Tue Apr 04 2023 Anton Midyukov <antohami@altlinux.org> 1.1.0-alt4 - rename package rapidjson to rapidjson-devel (Closes: 45742) - Clear Packager * Sat Jan 28 2023 Anton Midyukov <antohami@altlinux.org> 1.1.0-alt3 - Don't force C++11 to fix FTBFS with gtest 1.13+ * Tue Jul 13 2021 Vitaly Lipatov <lav@altlinux.ru> 1.1.0-alt2 - fix BR * Wed Oct 09 2019 Michael Shigorin <mike@altlinux.org> 1.1.0-alt1.1.1 - Added the missing bit so that valgrind is not simply dropped out. * Wed Oct 09 2019 Michael Shigorin <mike@altlinux.org> 1.1.0-alt1.1 - Move to rpm-macros-valgrind. - Spec cleanup. * Wed Nov 15 2017 Anton Midyukov <antohami@altlinux.org> 1.1.0-alt1 - Initial build for ALT Sisyphus. |