summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Avseyev <sergey.avseyev@gmail.com>2017-11-03 18:33:37 +0300
committerSergey Avseyev <sergey.avseyev@gmail.com>2017-11-03 18:51:02 +0300
commit356471284a567d61f257a5ff391e98f1674415c5 (patch)
tree973986b2c69dbb8055e6814695e32987952da8b3
parentf3031f5868d91e51747d2c3ab1d56a012aa13679 (diff)
downloadflatbuffers-356471284a567d61f257a5ff391e98f1674415c5.tar.gz
flatbuffers-356471284a567d61f257a5ff391e98f1674415c5.tar.xz
flatbuffers-356471284a567d61f257a5ff391e98f1674415c5.zip
Update after review
-rw-r--r--flatbuffers-1.7.1-1.fc28.src.rpmbin494896 -> 495010 bytes
-rw-r--r--flatbuffers.spec24
2 files changed, 16 insertions, 8 deletions
diff --git a/flatbuffers-1.7.1-1.fc28.src.rpm b/flatbuffers-1.7.1-1.fc28.src.rpm
index 5d82ef4..23a3829 100644
--- a/flatbuffers-1.7.1-1.fc28.src.rpm
+++ b/flatbuffers-1.7.1-1.fc28.src.rpm
Binary files differ
diff --git a/flatbuffers.spec b/flatbuffers.spec
index d2f309b..d1b064f 100644
--- a/flatbuffers.spec
+++ b/flatbuffers.spec
@@ -1,3 +1,9 @@
+%ifarch ppc64 s390x armv7hl
+%bcond_with tests
+%else
+%bcond_without tests
+%endif
+
Name: flatbuffers
Version: 1.7.1
Release: 1%{?dist}
@@ -7,7 +13,7 @@ URL: http://google.github.io/flatbuffers
# The entire source code is ASL 2.0 except grpc/ which is BSD (3 clause)
License: ASL 2.0 and BSD
-Source0: https://github.com/google/flatbuffers/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source0: https://github.com/google/flatbuffers/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: flatc.1
Source2: flatbuffers.7
Patch0: 0000-use-cmake-install-dirs.patch
@@ -17,6 +23,11 @@ Patch2: 0002-specify-so-version.patch
BuildRequires: gcc-c++
BuildRequires: cmake >= 2.8.9
+# The library contains pieces of gRPC project, with some additions.
+# It is not easy to identify the version, which was used to take the code,
+# but it should be something after version 1.3.2. See this discussion for
+# details: https://github.com/google/flatbuffers/pull/4305
+Provides: bundled(grpc)
%description
FlatBuffers is a serialization library for games and other memory constrained
@@ -34,14 +45,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%autosetup -p1
# cleanup distribution
rm -rf js net php python docs go java js biicode {samples/,}android
+chmod -x readme.md
-%ifarch ppc64 s390x armv7hl
-# upstream have issues in tests on big-endian platforms
-TESTS_FLAG="-DFLATBUFFERS_BUILD_TESTS=OFF"
-%endif
%cmake -DFLATBUFFERS_BUILD_SHAREDLIB=ON \
-DFLATBUFFERS_BUILD_FLATLIB=OFF \
- ${TESTS_FLAG}
+ -DFLATBUFFERS_BUILD_TESTS=%{?with_tests:ON}%{!?with_tests:OFF}
%build
%make_build
@@ -53,7 +61,7 @@ cp -p %SOURCE1 %{buildroot}%{_mandir}/man1/flatc.1
cp -p %SOURCE2 %{buildroot}%{_mandir}/man7/flatbuffers.7
%check
-%ifnarch ppc64 s390x armv7hl
+%if %{with tests}
make test
%endif
@@ -62,7 +70,7 @@ make test
%files
%license LICENSE.txt
-%doc %attr(644,-,-) readme.md
+%doc readme.md
%{_bindir}/flatc
%{_libdir}/libflatbuffers.so.*
%{_mandir}/man1/flatc.1*