2021-01-26 20:18:46 +08:00
|
|
|
%ifarch ppc64 s390x %{arm}
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
%endif
|
|
|
|
|
Name: flatbuffers
|
2021-08-17 10:37:00 +08:00
|
|
|
Version: 2.0.0
|
2022-11-22 11:39:38 +08:00
|
|
|
Release: 5
|
2021-01-26 20:18:46 +08:00
|
|
|
Summary: Memory efficient serialization library
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
URL: https://github.com/google/flatbuffers
|
2021-08-17 10:37:00 +08:00
|
|
|
Source0: https://github.com/google/flatbuffers/archive/refs/tags/v%{version}.tar.gz
|
2021-01-26 20:18:46 +08:00
|
|
|
Source1: flatc.1
|
|
|
|
|
Source2: flatbuffers.7
|
2021-08-02 21:05:32 +08:00
|
|
|
|
2021-11-10 15:14:56 +08:00
|
|
|
Patch0: 0001-Fix-compiler-warning-Wredundant-parens.patch
|
2021-11-15 19:06:38 +08:00
|
|
|
Patch1: 0002-typo-fixes-in-comments.patch
|
|
|
|
|
Patch2: 0003-Changes-to-support-binary-schema-file-loading-and-pa.patch
|
|
|
|
|
Patch3: 0004-output-errors-instead-of-stdout.patch
|
2021-11-17 15:35:25 +08:00
|
|
|
Patch4: 0005-fix-undefined-behaviour.patch
|
2021-11-10 15:14:56 +08:00
|
|
|
|
2021-01-26 20:18:46 +08:00
|
|
|
BuildRequires: gcc-c++ cmake >= 2.8.9
|
|
|
|
|
Provides: bundled(grpc)
|
|
|
|
|
%description
|
|
|
|
|
FlatBuffers is a serialization library for games and other memory constrained
|
|
|
|
|
apps. FlatBuffers allows you to directly access serialized data without
|
|
|
|
|
unpacking/parsing it first, while still having great forwards/backwards
|
|
|
|
|
compatibility.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
%description devel
|
|
|
|
|
%{summary}.
|
|
|
|
|
|
2022-11-22 11:39:38 +08:00
|
|
|
%package -n python3-flatbuffers
|
|
|
|
|
Summary: The FlatBuffers serialization format for Python
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
%description -n python3-flatbuffers
|
|
|
|
|
Python runtime library for use with the Flatbuffers serialization format.
|
|
|
|
|
|
2021-01-26 20:18:46 +08:00
|
|
|
%prep
|
|
|
|
|
%autosetup -p1
|
2022-11-22 11:39:38 +08:00
|
|
|
rm -rf js net php docs go java js biicode {samples/,}android
|
2021-01-26 20:18:46 +08:00
|
|
|
chmod -x readme.md
|
|
|
|
|
%cmake -DCMAKE_BUILD_TYPE=Release \
|
|
|
|
|
-DFLATBUFFERS_BUILD_SHAREDLIB=ON \
|
|
|
|
|
-DFLATBUFFERS_BUILD_FLATLIB=OFF \
|
|
|
|
|
-DFLATBUFFERS_BUILD_FLATC=ON \
|
|
|
|
|
-DFLATBUFFERS_BUILD_TESTS=%{?with_tests:ON}%{!?with_tests:OFF}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%make_build
|
|
|
|
|
|
2022-11-22 11:39:38 +08:00
|
|
|
pushd python
|
|
|
|
|
%py3_build
|
|
|
|
|
popd
|
|
|
|
|
|
2021-01-26 20:18:46 +08:00
|
|
|
%install
|
|
|
|
|
%make_install
|
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man{1,7}
|
|
|
|
|
cp -p %SOURCE1 %{buildroot}%{_mandir}/man1/flatc.1
|
|
|
|
|
cp -p %SOURCE2 %{buildroot}%{_mandir}/man7/flatbuffers.7
|
|
|
|
|
|
2022-11-22 11:39:38 +08:00
|
|
|
pushd python
|
|
|
|
|
%py3_install
|
|
|
|
|
popd
|
|
|
|
|
|
2021-01-26 20:18:46 +08:00
|
|
|
%check
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
make test
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%doc readme.md
|
|
|
|
|
%{_bindir}/flatc
|
|
|
|
|
%{_libdir}/libflatbuffers.so.*
|
|
|
|
|
%{_mandir}/man1/flatc.1*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/flatbuffers
|
|
|
|
|
%{_libdir}/libflatbuffers.so
|
|
|
|
|
%{_mandir}/man7/flatbuffers.7*
|
2021-08-17 10:37:00 +08:00
|
|
|
%{_libdir}/pkgconfig/flatbuffers.pc
|
2021-01-26 20:18:46 +08:00
|
|
|
%{_libdir}/cmake/flatbuffers/*.cmake
|
|
|
|
|
|
2022-11-22 11:39:38 +08:00
|
|
|
%files -n python3-flatbuffers
|
|
|
|
|
%{python3_sitelib}/
|
|
|
|
|
|
2021-01-26 20:18:46 +08:00
|
|
|
%changelog
|
2022-11-22 11:39:38 +08:00
|
|
|
* Tue Nov 22 2022 Bin Hu <hubin73@huawei.com> - 2.0.0-5
|
|
|
|
|
- add python subpackage for tensorflow 2.10 build
|
|
|
|
|
|
2021-11-17 15:35:25 +08:00
|
|
|
* Wed Nov 17 2021 yefeng <yefeng24@huawei.com> - 2.0.0-4
|
|
|
|
|
- fix undefined behaviour
|
|
|
|
|
|
|
|
|
|
* Mon Nov 15 2021 yefeng <yefeng24@huawei.com> - 2.0.0-3
|
2021-11-15 19:06:38 +08:00
|
|
|
- output errors instead of stdout, Typo fixes in comments and Changes to support binary schema file
|
|
|
|
|
|
|
|
|
|
* Wed Nov 11 2021 yefeng <yefeng24@huawei.com> - 2.0.0-2
|
|
|
|
|
- Fix compiler warning
|
|
|
|
|
|
2021-08-17 10:37:00 +08:00
|
|
|
* Tue Aug 17 2021 yaoxin <yaoxin30@huawei.com> - 2.0.0-1
|
|
|
|
|
- Upgrade 2.0.0 to fix CVE-2020-35864
|
|
|
|
|
|
2021-08-02 21:05:32 +08:00
|
|
|
* Mon Aug 2 2021 Haiwei Li <lihaiwei8@huawei.com> - 1.10.0-2
|
|
|
|
|
- Fix complication failed due to gcc upgrade
|
|
|
|
|
|
2021-01-26 20:18:46 +08:00
|
|
|
* Mon Jan 11 2021 yanan li <liyanan32@huawei.com> - 1.10.0-1
|
2022-11-22 11:39:38 +08:00
|
|
|
- Package init
|