forked from pool/cdogs-sdl
Accepting request 420774 from home:Mailaender:branches:games
initial packaging OBS-URL: https://build.opensuse.org/request/show/420774 OBS-URL: https://build.opensuse.org/package/show/games/cdogs-sdl?expand=0&rev=1
This commit is contained in:
commit
d94ced072c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
44
appdata.patch
Normal file
44
appdata.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From ee005feadbbd90641d119f6204100a566e68d9f6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
|
||||
<Mailaender@users.noreply.github.com>
|
||||
Date: Sat, 20 Aug 2016 22:21:47 +0200
|
||||
Subject: [PATCH 1/3] Create cdogs-sdl.appdata.xml
|
||||
|
||||
---
|
||||
build/linux/cdogs-sdl.appdata.xml | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
create mode 100644 build/linux/cdogs-sdl.appdata.xml
|
||||
|
||||
diff --git a/build/linux/cdogs-sdl.appdata.xml b/build/linux/cdogs-sdl.appdata.xml
|
||||
new file mode 100644
|
||||
index 0000000..630762c
|
||||
--- /dev/null
|
||||
+++ b/build/linux/cdogs-sdl.appdata.xml
|
||||
@@ -0,0 +1,27 @@
|
||||
+<?xml version="1.0" encoding="utf-8"?>
|
||||
+<component type="desktop">
|
||||
+ <id>cdogs-sdl.desktop</id>
|
||||
+ <metadata_license>CC0-1.0</metadata_license>
|
||||
+ <project_license>GPL-2.0+</project_license>
|
||||
+ <name>C-Dogs</name>
|
||||
+ <summary>Classic overhead run-and-gun game</summary>
|
||||
+ <description>
|
||||
+ <p>
|
||||
+ C-Dogs is an arcade shoot-em-up which lets players work alone and
|
||||
+ cooperatively during missions or fight against each other in the
|
||||
+ “dogfight” deathmatch mode.
|
||||
+ </p>
|
||||
+ <p>
|
||||
+ Customize your player, choose from many weapons, and blast, slide and
|
||||
+ slash your way through over 100 user-created campaigns.
|
||||
+ </p>
|
||||
+ </description>
|
||||
+ <url type="homepage">http://cxong.github.io/cdogs-sdl/</url>
|
||||
+ <url type="help">https://github.com/cxong/cdogs-sdl/wiki/Walkthrough</url>
|
||||
+ <screenshots>
|
||||
+ <screenshot
|
||||
+ type="default">https://raw.githubusercontent.com/cxong/cdogs-sdl/master/wiki/images/game_screen.png</screenshot>
|
||||
+ <screenshot>https://raw.github.com/cxong/cdogs-sdl/master/wiki/images/screenshots/hqx_new.png</screenshot>
|
||||
+ <screenshot>https://raw.githubusercontent.com/cxong/cdogs-sdl/master/wiki/images/screenshots/quick_play.png</screenshot>
|
||||
+ </screenshots>
|
||||
+</component>
|
26
cdogs-sdl-0.6.0-mga-unbundle-enet.patch
Normal file
26
cdogs-sdl-0.6.0-mga-unbundle-enet.patch
Normal file
@ -0,0 +1,26 @@
|
||||
Index: cdogs-sdl-0.6.0/CMakeLists.txt
|
||||
===================================================================
|
||||
--- cdogs-sdl-0.6.0/CMakeLists.txt
|
||||
+++ cdogs-sdl-0.6.0/CMakeLists.txt 2016-04-15 17:55:51.390810883 +0200
|
||||
@@ -74,7 +74,6 @@
|
||||
ELSE()
|
||||
SET(ENet_LIBRARIES ${ENet_LIBRARY})
|
||||
ENDIF()
|
||||
-INCLUDE_DIRECTORIES(src/cdogs/enet/include)
|
||||
|
||||
add_definitions(-DPB_FIELD_16BIT) # Allow larger field numbers in nanopb
|
||||
include_directories(src/cdogs/proto/nanopb)
|
||||
Index: cdogs-sdl-0.6.0/src/cdogs/CMakeLists.txt
|
||||
===================================================================
|
||||
--- cdogs-sdl-0.6.0/src/cdogs/CMakeLists.txt
|
||||
+++ cdogs-sdl-0.6.0/src/cdogs/CMakeLists.txt 2016-04-15 17:53:25.754852164 +0200
|
||||
@@ -195,9 +195,6 @@
|
||||
proto/nanopb/pb_encode.h
|
||||
)
|
||||
|
||||
-# enet
|
||||
-ADD_SUBDIRECTORY(enet)
|
||||
-
|
||||
# proto
|
||||
include_directories(proto/nanopb)
|
||||
|
44
cdogs-sdl-0.6.1-mga-unbundle-yajl.patch
Normal file
44
cdogs-sdl-0.6.1-mga-unbundle-yajl.patch
Normal file
@ -0,0 +1,44 @@
|
||||
Index: cdogs-sdl-0.6.1/src/cdogs/CMakeLists.txt
|
||||
===================================================================
|
||||
--- cdogs-sdl-0.6.1/src/cdogs/CMakeLists.txt
|
||||
+++ cdogs-sdl-0.6.1/src/cdogs/CMakeLists.txt 2016-06-01 08:40:16.097614648 +0200
|
||||
@@ -1,7 +1,8 @@
|
||||
include_directories(
|
||||
${SDL2_INCLUDE_DIRS}
|
||||
${SDL2_IMAGE_INCLUDE_DIRS}
|
||||
- ${SDL2_MIXER_INCLUDE_DIRS})
|
||||
+ ${SDL2_MIXER_INCLUDE_DIRS}
|
||||
+ /usr/include/yajl)
|
||||
add_definitions(-DSTATIC)
|
||||
set(CDOGS_SOURCES
|
||||
actor_placement.c
|
||||
@@ -207,7 +208,6 @@
|
||||
|
||||
add_subdirectory(c_hashmap)
|
||||
add_subdirectory(SDL_JoystickButtonNames)
|
||||
-add_subdirectory(yajl)
|
||||
|
||||
add_library(cdogs STATIC
|
||||
${CDOGS_SOURCES} ${CDOGS_HEADERS}
|
||||
@@ -217,7 +217,7 @@
|
||||
c_hashmap
|
||||
json
|
||||
SDL_joystickbuttonnames
|
||||
- yajl_s
|
||||
+ yajl
|
||||
${SDL2_LIBRARY}
|
||||
${SDL2_IMAGE_LIBRARIES}
|
||||
${SDL2_MIXER_LIBRARIES}
|
||||
Index: cdogs-sdl-0.6.1/src/cdogs/yajl_utils.h
|
||||
===================================================================
|
||||
--- cdogs-sdl-0.6.1/src/cdogs/yajl_utils.h
|
||||
+++ cdogs-sdl-0.6.1/src/cdogs/yajl_utils.h 2016-06-01 08:39:25.558800634 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "vector.h"
|
||||
-#include "yajl/api/yajl_tree.h"
|
||||
+#include <yajl_tree.h>
|
||||
|
||||
|
||||
yajl_val YAJLReadFile(const char *filename);
|
3
cdogs-sdl-0.6.2.tar.gz
Normal file
3
cdogs-sdl-0.6.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d6f421c760b15b706bdfc79ed8d18802dc2e8efeefabb69a31679c9b51f328ab
|
||||
size 18770825
|
5
cdogs-sdl.changes
Normal file
5
cdogs-sdl.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 20 20:39:12 UTC 2016 - mailaender@opensuse.org
|
||||
|
||||
- initial packaging of version 0.6.2
|
||||
|
99
cdogs-sdl.spec
Normal file
99
cdogs-sdl.spec
Normal file
@ -0,0 +1,99 @@
|
||||
#
|
||||
# spec file for package cdogs-sdl
|
||||
#
|
||||
# Copyright (c) 2016 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: cdogs-sdl
|
||||
Version: 0.6.2
|
||||
Release: 0
|
||||
Summary: Classic overhead run-and-gun game
|
||||
License: GPL-2.0 and BSD-2-Clause and CC-BY-3.0 and CC-BY-SA-3.0
|
||||
Group: Amusements/Games/Action/Shoot
|
||||
Url: http://cxong.github.io/cdogs-sdl
|
||||
Source: https://github.com/cxong/cdogs-sdl/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/cxong/cdogs-sdl/pull/453
|
||||
Patch0: cmake-install.patch
|
||||
# PATCH-FIX-OPENSUSE borrowed from Mageia
|
||||
Patch1: cdogs-sdl-0.6.0-mga-unbundle-enet.patch
|
||||
# PATCH-FIX-OPENSUSE borrowed from Mageia
|
||||
Patch2: cdogs-sdl-0.6.1-mga-unbundle-yajl.patch
|
||||
# PATCH-FEATURE-UPSTREAM https://github.com/cxong/cdogs-sdl/pull/452
|
||||
Patch3: appdata.patch
|
||||
BuildRequires: cmake >= 2.8.2
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(SDL2_image)
|
||||
BuildRequires: pkgconfig(SDL2_mixer)
|
||||
BuildRequires: pkgconfig(libenet)
|
||||
BuildRequires: pkgconfig(physfs)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(yajl)
|
||||
|
||||
%description
|
||||
C-Dogs SDL is a classic overhead run-and-gun game, supporting up to
|
||||
4 players in co-op and deathmatch modes. Customize your player, choose
|
||||
from up to 11 weapons, and try over 100 user-created campaigns. Have fun!
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
rm -rf src/cdogs/enet
|
||||
rm -rf src/cdogs/yajl
|
||||
|
||||
dos2unix doc/original_readme.txt
|
||||
|
||||
%build
|
||||
%cmake -DCDOGS_DATA_DIR=%{_datadir}/%{name}/
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
|
||||
rm %{buildroot}%{_datadir}/icons/cdogs-sdl.png
|
||||
install -Dm0644 build/linux/cdogs-icon.16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/cdogs-sdl.png
|
||||
install -Dm0644 build/linux/cdogs-icon.22.png %{buildroot}%{_datadir}/icons/hicolor/22x22/apps/cdogs-sdl.png
|
||||
install -Dm0644 build/linux/cdogs-icon.32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/cdogs-sdl.png
|
||||
install -Dm0644 build/linux/cdogs-icon.48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/cdogs-sdl.png
|
||||
|
||||
install -Dm0644 build/linux/cdogs-sdl.appdata.xml %{buildroot}%{_datadir}/appdata/cdogs-sdl.appdata.xml
|
||||
|
||||
%fdupes %{buildroot}%{_datadir}
|
||||
|
||||
%post
|
||||
%desktop_database_post
|
||||
%icon_theme_cache_post
|
||||
|
||||
%postun
|
||||
%desktop_database_postun
|
||||
%icon_theme_cache_postun
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_bindir}/%{name}*
|
||||
%{_datadir}/%{name}/
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||
%dir %{_datadir}/appdata/
|
||||
%{_datadir}/appdata/%{name}.appdata.xml
|
||||
|
||||
%changelog
|
52
cmake-install.patch
Normal file
52
cmake-install.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From a2c8891842daf36e009c3844265f41d1a95a5454 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
|
||||
<Mailaender@users.noreply.github.com>
|
||||
Date: Sun, 21 Aug 2016 08:17:38 +0200
|
||||
Subject: [PATCH 1/2] Install game data into the correct folder.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index aed0330..0eee887 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -189,11 +189,11 @@ INSTALL(DIRECTORY
|
||||
${CMAKE_SOURCE_DIR}/graphics
|
||||
${CMAKE_SOURCE_DIR}/music
|
||||
${CMAKE_SOURCE_DIR}/sounds
|
||||
- DESTINATION ${INSTALL_PREFIX})
|
||||
+ DESTINATION ${CDOGS_DATA_DIR})
|
||||
INSTALL(FILES
|
||||
${CMAKE_SOURCE_DIR}/cdogs_icon.bmp
|
||||
${CMAKE_SOURCE_DIR}/README.md
|
||||
- DESTINATION ${INSTALL_PREFIX})
|
||||
+ DESTINATION ${CDOGS_DATA_DIR})
|
||||
IF(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
|
||||
INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/cdogs-sdl.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
||||
INSTALL(FILES ${CMAKE_SOURCE_DIR}/cdogs-sdl.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons)
|
||||
|
||||
From daaf476b81910629a2871e47cca13e37477f09c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
|
||||
<Mailaender@users.noreply.github.com>
|
||||
Date: Sun, 21 Aug 2016 08:19:20 +0200
|
||||
Subject: [PATCH 2/2] Avoid hard-coded directory on program install.
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0eee887..6b8090d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -177,7 +177,7 @@ if(APPLE)
|
||||
USE_SOURCE_PERMISSIONS)
|
||||
else()
|
||||
install(
|
||||
- PROGRAMS src/cdogs-sdl${EXE_EXTENSION} src/cdogs-sdl-editor${EXE_EXTENSION}
|
||||
+ PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/src/cdogs-sdl${EXE_EXTENSION} ${CMAKE_CURRENT_BINARY_DIR}/src/cdogs-sdl-editor${EXE_EXTENSION}
|
||||
DESTINATION ${INSTALL_PREFIX}/bin)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user