A new user interface for you! Read more...

File flatbuffers.spec of Package flatbuffers

#
# spec file for package flatbuffers
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           flatbuffers
Version:        1.7.1
Release:        0
Summary:        Memory Efficient Serialization Library
License:        Apache-2.0
Group:          Development/Libraries/C and C++
Url:            http://google.github.io/flatbuffers/
Source:         https://github.com/google/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE make-use-of-GNUInstallDirs.patch -- honour flags passed by cmake macro
Patch0:         make-use-of-GNUInstallDirs.patch
# PATCH-FIX-OPENSUSE remove-date-from-flatc-version.patch -- ensure reproducible builds
Patch1:         remove-date-from-flatc-version.patch
BuildRequires:  cmake >= 2.8.11.2
BuildRequires:  gcc-c++
ExclusiveArch:  %ix86 x86_64

%description
FlatBuffers is a serialization library for games and other memory constrained programs.
FlatBuffers allows to directly access serialized data without unpacking/parsing
it first, while still having great forwards/backwards compatibility.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Provides:       %{name}-devel-static = %{version}

%description    devel
FlatBuffers is a serialization library for games and other memory constrained programs.
FlatBuffers allows to directly access serialized data without unpacking/parsing
it first, while still having great forwards/backwards compatibility.

%prep
%setup -q
chmod -x readme.md docs/source/*.md docs/footer.html docs/source/doxyfile
%patch0 -p1
%patch1

%build
%cmake
make %{?_smp_mflags} V=1

%install
%cmake_install
pushd CMake
mkdir -p "%{buildroot}/%{_datadir}/cmake/Modules"
install -m0644 *FlatBuffers.cmake %{buildroot}%{_datadir}/cmake/Modules/

%files devel
%defattr(-,root,root)
%doc readme.md docs/
%if 0%{?leap_version} >= 420200 || 0%{?suse_version} > 1320 
%license LICENSE.txt
%else
%doc LICENSE.txt
%endif
%{_bindir}/flatc
%{_includedir}/flatbuffers
%{_libdir}/libflatbuffers.a
%{_datadir}/cmake/Modules/*FlatBuffers.cmake

%changelog