File GameNetworkingSockets.spec of Package GameNetworkingSockets

#
# spec file for package GameNetworkingSockets
#
# Copyright (c) 2020-2021, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#


Name:           GameNetworkingSockets
Version:        1.3.0
Release:        0
Summary:        Library that provides a basic transport layer for games
License:        BSD-3-Clause
Group:          System/Libraries
URL:            https://github.com/ValveSoftware/GameNetworkingSockets
#Git-Clone:     https://github.com/ValveSoftware/GameNetworkingSockets.git
Source:         https://github.com/ValveSoftware/GameNetworkingSockets/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  openssl-devel
BuildRequires:  pkgconfig
BuildRequires:  protobuf-devel

%description
The "GameNetworkingSockets" project is a network transport layer
for games with a TCP-inspired but messages-based protocol designed
for reliability, supports bandwidth estimation and encryption, and
other features for use by modern games.

%package devel
Summary:        Development files for the libGameNetworkingSockets library
Group:          Development/Libraries/C and C++

%description devel
The "GameNetworkingSockets" project is a network transport layer
for games with a TCP-inspired but messages-based protocol designed
for reliability, supports bandwidth estimation and encryption, and
other features for use by modern games.

This subpackage contains libraries and header files for developing
applications that want to make use of libGameNetworkingSockets.

%prep
%setup -q

%build
%if 0%{?suse_version} > 1500 
%cmake -DGAMENETWORKINGSOCKETS_BUILD_EXAMPLES=OFF
%else
%cmake -DUSE_CRYPTO25519=Reference -DGAMENETWORKINGSOCKETS_BUILD_EXAMPLES=OFF
%endif
%make_build

%install
install -D -m644 build/bin/libGameNetworkingSockets.so %{buildroot}%{_libdir}/libGameNetworkingSockets.so

%files devel
%license LICENSE
%doc README.md
%{_libdir}/libGameNetworkingSockets.so

%changelog
openSUSE Build Service is sponsored by