8251aff
%bcond_with tests
8251aff
8251aff
Name:           flatbuffers
f844e59
Version:        2.0.0
75af3c8
Release:        2%{?dist}
8251aff
Summary:        Memory efficient serialization library
8251aff
URL:            http://google.github.io/flatbuffers
8251aff
8251aff
# The entire source code is ASL 2.0 except grpc/ which is BSD (3 clause)
8251aff
License:        ASL 2.0 and BSD
8251aff
8251aff
Source0:        https://github.com/google/flatbuffers/archive/v%{version}/%{name}-%{version}.tar.gz
8251aff
Source1:        flatc.1
8251aff
Source2:        flatbuffers.7
8251aff
8251aff
BuildRequires:  gcc-c++
8251aff
BuildRequires:  cmake >= 2.8.9
fb37700
BuildRequires:  git-core
a347cb3
BuildRequires:  python3-devel
a347cb3
BuildRequires:  python3-setuptools
68af933
BuildRequires: make
8251aff
8251aff
# The library contains pieces of gRPC project, with some additions.
8251aff
# It is not easy to identify the version, which was used to take the code,
8251aff
# but it should be something after version 1.3.2. See this discussion for
8251aff
# details: https://github.com/google/flatbuffers/pull/4305
8251aff
Provides:       bundled(grpc)
8251aff
8251aff
%description
8251aff
FlatBuffers is a serialization library for games and other memory constrained
8251aff
apps. FlatBuffers allows you to directly access serialized data without
8251aff
unpacking/parsing it first, while still having great forwards/backwards
8251aff
compatibility.
8251aff
8251aff
%package        devel
8251aff
Summary:        Development files for %{name}
8251aff
Requires:       %{name}%{?_isa} = %{version}-%{release}
8251aff
%description    devel
8251aff
%{summary}.
8251aff
a347cb3
%package        python3
a347cb3
Summary:        Python files for %{name}
a347cb3
Requires:       %{name}%{?_isa} = %{version}-%{release}
a347cb3
a347cb3
%description    python3
a347cb3
This package contains python files for %{name}.
a347cb3
8251aff
%prep
b86ca1b
%autosetup -S git_am
8251aff
# cleanup distribution
a347cb3
rm -rf js net php docs go java js biicode {samples/,}android
8251aff
chmod -x readme.md
8251aff
fdc4619
%cmake -DCMAKE_BUILD_TYPE=Release \
fdc4619
       -DFLATBUFFERS_BUILD_SHAREDLIB=ON \
8251aff
       -DFLATBUFFERS_BUILD_FLATLIB=OFF \
fdc4619
       -DFLATBUFFERS_BUILD_FLATC=ON \
0b4611d
       -DFLATBUFFERS_BUILD_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
0b4611d
       .
8251aff
8251aff
%build
19ed2da
%cmake_build
a347cb3
pushd python
a347cb3
%{__python3} setup.py build
a347cb3
popd
8251aff
8251aff
%install
19ed2da
%cmake_install
a347cb3
pushd python
a347cb3
%{__python3} setup.py install --root %{buildroot}
a347cb3
popd
8251aff
mkdir -p %{buildroot}%{_mandir}/man{1,7}
8251aff
cp -p %SOURCE1 %{buildroot}%{_mandir}/man1/flatc.1
8251aff
cp -p %SOURCE2 %{buildroot}%{_mandir}/man7/flatbuffers.7
8251aff
8251aff
%check
8251aff
%if %{with tests}
8251aff
make test
8251aff
%endif
8251aff
57837d7
%ldconfig_scriptlets
8251aff
8251aff
%files
8251aff
%license LICENSE.txt
8251aff
%doc readme.md
8251aff
%{_bindir}/flatc
b86ca1b
%{_libdir}/libflatbuffers.so
f844e59
%{_libdir}/libflatbuffers.so.2
b86ca1b
%{_libdir}/libflatbuffers.so.{%version}
8251aff
%{_mandir}/man1/flatc.1*
8251aff
8251aff
%files devel
8251aff
%{_includedir}/flatbuffers
8251aff
%{_mandir}/man7/flatbuffers.7*
f844e59
%{_libdir}/pkgconfig/flatbuffers.pc
fdc4619
%{_libdir}/cmake/flatbuffers/*.cmake
8251aff
a347cb3
%files python3
a347cb3
%{python3_sitelib}/*
a347cb3
8251aff
%changelog
75af3c8
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.0.0-2
75af3c8
- Rebuilt for Python 3.10
75af3c8
f844e59
* Mon May 17 2021 Benjamin Lowry 
f844e59
- flatbuffers 2.0.0
f844e59
d9128b1
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-6
d9128b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
d9128b1
a347cb3
* Mon Aug 10 2020 Cristian Balint <cristian.balint@gmail.com> - 1.12.0-5
a347cb3
- Enable python module
a347cb3
19ed2da
* Sat Aug 01 2020 Benjamin lowry <ben@ben.gmbh> - 1.12.0-4
19ed2da
- Update to new cmake macros, fix build error
19ed2da
34ca1ca
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-3
34ca1ca
- Second attempt - Rebuilt for
34ca1ca
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
34ca1ca
642788d
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-2
642788d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
642788d
b86ca1b
* Tue May 12 2020 Benjamin Lowry <ben@ben.gmbh> - 1.12.0-1
b86ca1b
- Upgrade to 1.12.0, fix compilation on F32
b86ca1b
f9c58a9
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-3
f9c58a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
f9c58a9
6130798
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-2
6130798
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
6130798
face032
* Wed May 15 2019 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.11.0-1
face032
- Update to 1.11.0
face032
6ed42d7
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-4
6ed42d7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
6ed42d7
0b4611d
* Mon Jan 21 2019 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.10.0-3
0b4611d
- Add explicit curdir on CMake invocation
face032
3c642a4
* Thu Jan 10 2019 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.10.0-2
3c642a4
- Fix generator (and generated tests) for gcc9 (ignore -Wclass-memaccess)
3c642a4
102305f
* Thu Oct 04 2018 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.10.0-1
102305f
- Update to 1.10.0
102305f
365b6f3
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-2
365b6f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
365b6f3
ea8edb0
* Fri Apr 06 2018 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.9.0-1
ea8edb0
- Update to 1.9.0
ea8edb0
00351aa
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4
00351aa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
00351aa
c18bc20
* Sat Feb 03 2018 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.8.0-3
c18bc20
- Fix build errors.
c18bc20
4fddab1
* Wed Nov 22 2017 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.8.0-2
4fddab1
- Update manpages for 1.8.0
4fddab1
fdc4619
* Wed Nov 22 2017 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.8.0-1
fdc4619
- Update to 1.8.0
fdc4619
8251aff
* Thu Nov 2 2017 Sergey Avseyev <sergey.avseyev@gmail.com> - 1.7.1-1
8251aff
- Initial version
8251aff
8251aff
* Mon Mar 30 2015 Daniel Vrátil <dvratil@redhat.com> - 1.0.3-1
8251aff
- Initial version (abandoned at #1207208)