SHA256
1
0
forked from pool/ddnet

Accepting request 830880 from home:Mailaender:branches:games

new games based on teeworlds

OBS-URL: https://build.opensuse.org/request/show/830880
OBS-URL: https://build.opensuse.org/package/show/games/ddnet?expand=0&rev=1
This commit is contained in:
Dirk Stoecker 2020-09-01 08:04:37 +00:00 committed by Git OBS Bridge
commit a078d69e13
6 changed files with 239 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
ddnet-14.5.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b9b60e7c8330dbb9d7911177add4f52050cf27fc7b17c8da661ac0093ed1033d
size 27625376

4
ddnet.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sat Aug 29 13:23:28 UTC 2020 - Matthias Mailänder <mailaender@opensuse.org>
- initial packaging of version 14.5.1

119
ddnet.spec Normal file
View File

@ -0,0 +1,119 @@
#
# spec file for package ddnet
#
# Copyright (c) 2020 SUSE LLC
#
# 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: ddnet
Version: 14.5.1
Release: 0
Summary: DDraceNetwork, a cooperative racing mod of Teeworlds
License: Zlib AND CC-BY-SA-3.0 AND Apache-2.0 AND MIT AND SUSE-Public-Domain
URL: https://ddnet.tw/
Source: https://github.com/ddnet/ddnet/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM https://github.com/ddnet/ddnet/pull/2684
Patch0: steam-api.patch
Group: Amusements/Games/Action/Race
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pnglite-devel
BuildRequires: python3
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(glew)
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(ogg)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(opusfile)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(wavpack)
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(libnotify)
BuildRequires: libminiupnpc-devel
Requires: %{name}-data = %{version}-%{release}
BuildRequires: appstream-glib
%description
DDraceNetwork (DDNet) is an actively maintained version of DDRace,
a Teeworlds modification with a unique cooperative gameplay.
Help each other play through custom maps with up to 64 players,
compete against the best in international tournaments, design your
own maps, or run your own server.
%package data
Summary: Data files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: hicolor-icon-theme
BuildArch: noarch
%description data
Data files for DDraceNetwork (DDNet).
%package server
Summary: Standalone server for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description server
Standalone server for DDraceNetwork (DDNet).
%prep
%autosetup -p1
%build
mkdir build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DPREFER_BUNDLED_LIBS=OFF \
-DAUTOUPDATE=OFF \
-DANTIBOT=ON \
-DUPNP=ON \
-DSTEAM=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
%make_build
%install
%cmake_install
install -Dp -m 0644 man/DDNet.6 %{buildroot}%{_mandir}/man6/DDNet.6
install -Dp -m 0644 man/DDNet-Server.6 %{buildroot}%{_mandir}/man6/DDNet-Server.6
%fdupes %{buildroot}%{_datadir}
%files
%license license.txt
%doc README.md
%{_mandir}/man6/DDNet.6%{?ext_man}
%{_bindir}/DDNet
%{_libdir}/%{name}/
%{_datadir}/applications/%{name}.desktop
%{_datadir}/metainfo/*.appdata.xml
%files data
%{_datadir}/%{name}/
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%dir %{_datadir}/icons/hicolor/
%dir %{_datadir}/icons/hicolor/*/
%dir %{_datadir}/icons/hicolor/*/apps/
%files server
%{_mandir}/man6/DDNet-Server.6%{?ext_man}
%{_bindir}/DDNet-Server
%changelog

89
steam-api.patch Normal file
View File

@ -0,0 +1,89 @@
From 32734aceb355458d90573ecec37c4c909aad9697 Mon Sep 17 00:00:00 2001
From: heinrich5991 <heinrich5991@gmail.com>
Date: Mon, 31 Aug 2020 12:25:53 +0200
Subject: [PATCH] Make steam_api dependency static on Linux non-Steam builds
This allows building without rpath modifying on Linux which seems to be
needed for openSUSE packaging.
Fixes #2669.
---
CMakeLists.txt | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8bf6f74da4..95707499e5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,6 +97,7 @@ option(UPNP "Enable UPnP support" OFF)
option(ANTIBOT "Enable support for a dynamic anticheat library" OFF)
option(CLIENT "Compile client" ON)
option(DOWNLOAD_GTEST "Download and compile GTest" ${AUTO_DEPENDENCIES_DEFAULT})
+option(STEAM "Build the Steam release version" OFF)
option(PREFER_BUNDLED_LIBS "Prefer bundled libraries over system libraries" ${AUTO_DEPENDENCIES_DEFAULT})
option(DEV "Don't generate stuff necessary for packaging" OFF)
@@ -269,7 +270,7 @@ function(set_own_rpath TARGET)
endfunction()
if(NOT TARGET_OS STREQUAL "windows" AND NOT TARGET_OS STREQUAL "mac" AND CMAKE_VERSION VERSION_LESS 3.8)
- if(CLIENT OR ANTIBOT)
+ if((CLIENT AND STEAM) OR ANTIBOT)
message(STATUS "Can't set BUILD_RPATH in CMake before 3.8, pass -Wl,-rpath,'$ORIGIN' manually if you wish to emulate this. Or just install a newer version of CMake...")
endif()
endif()
@@ -1596,8 +1597,13 @@ if(CLIENT)
steam_api_stub.cpp
)
+ if(STEAM OR TARGET_OS STREQUAL "windows" OR TARGET_OS STREQUAL "mac")
+ set(STEAMAPI_KIND SHARED)
+ else()
+ set(STEAMAPI_KIND STATIC)
+ endif()
set(TARGET_STEAMAPI steam_api)
- add_library(${TARGET_STEAMAPI} SHARED ${STEAMAPI_SRC})
+ add_library(${TARGET_STEAMAPI} ${STEAMAPI_KIND} ${STEAMAPI_SRC})
list(APPEND TARGETS_OWN ${TARGET_STEAMAPI})
set_src(ENGINE_CLIENT GLOB src/engine/client
@@ -1815,7 +1821,9 @@ if(CLIENT)
${PLATFORM_CLIENT_INCLUDE_DIRS}
)
- set_own_rpath(${TARGET_CLIENT})
+ if(STEAMAPI_KIND STREQUAL DYNAMIC)
+ set_own_rpath(${TARGET_CLIENT})
+ endif()
set(PARAMS "${WAVPACK_INCLUDE_DIRS};${WAVPACK_INCLUDE_DIRS}")
if(NOT(WAVPACK_OPEN_FILE_INPUT_EX_PARAMS STREQUAL PARAMS))
@@ -2263,7 +2271,6 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME ${PROJECT_NAME})
set(CPACK_TARGETS
${TARGET_CLIENT}
${TARGET_SERVER}
- ${TARGET_STEAMAPI}
config_retrieve
config_store
dilate
@@ -2271,6 +2278,9 @@ set(CPACK_TARGETS
map_diff
map_extract
)
+if(STEAMAPI_KIND STREQUAL DYNAMIC)
+ list(APPEND CPACK_TARGETS ${TARGET_STEAMAPI})
+endif()
set(CPACK_DIRS data)
set(CPACK_FILES
license.txt
@@ -2286,7 +2296,9 @@ if(NOT DEV)
include(GNUInstallDirs)
install(DIRECTORY data DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ddnet COMPONENT data)
install(TARGETS ${TARGET_CLIENT} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client)
- install(TARGETS ${TARGET_STEAMAPI} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT client)
+ if(STEAMAPI_KIND STREQUAL DYNAMIC)
+ install(TARGETS ${TARGET_STEAMAPI} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT client)
+ endif()
install(TARGETS ${TARGET_SERVER} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT server)
if(ANTIBOT)
install(TARGETS ${TARGET_ANTIBOT} DESTINATION ${CMAKE_INSTALL_LIBDIR}/ddnet COMPONENT server)