SHA256
1
0
forked from pool/2048-cli

Accepting request 666053 from home:mnhauke:games

Initial package for 2048-cli

OBS-URL: https://build.opensuse.org/request/show/666053
OBS-URL: https://build.opensuse.org/package/show/games/2048-cli?expand=0&rev=1
This commit is contained in:
Dirk Stoecker 2019-01-17 12:24:10 +00:00 committed by Git OBS Bridge
commit 488c0fa579
9 changed files with 135 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

View File

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

View File

@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
index 0003ea0..0d566d1 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ FILTERED_C_FILES := $(filter-out src/gfx%.c src/merge%.c, $(C_FILES))
all: terminal
curses: $(FILTERED_C_FILES) src/gfx_curses.c
- $(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) $(LDFLAGS) -lcurses
+ $(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_curses.c -o $(PROGRAM) $(LDFLAGS) -lncurses
terminal: $(FILTERED_C_FILES) src/gfx_terminal.c
$(CC) $(CFLAGS) $(FILTERED_C_FILES) $(MERGE_FILE) src/gfx_terminal.c -o $(PROGRAM) $(LDFLAGS)

View File

@ -0,0 +1,13 @@
diff --git a/src/gfx_curses.c b/src/gfx_curses.c
index 0a2682f..f7791de 100644
--- a/src/gfx_curses.c
+++ b/src/gfx_curses.c
@@ -3,7 +3,7 @@
#include <unistd.h>
#include "gfx.h"
#include "merge.h"
-#include <gettext.h>
+#include <libintl.h>
#include <locale.h>
#define NUMBER_OF_COLORS 7

4
2048-cli.changes Normal file
View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Mon Jan 14 19:31:51 UTC 2019 - mardnh@gmx.de
- Initial package, version 0.9.1+git.20181118

58
2048-cli.spec Normal file
View File

@ -0,0 +1,58 @@
#
# spec file for package 2048-cli
#
# Copyright (c) 2019, 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 http://bugs.opensuse.org/
#
Name: 2048-cli
Version: 0.9.1+git.20181118
Release: 0
Summary: A cli version of the game 2048
License: MIT
Group: Amusements/Games/Strategy/Other
URL: https://github.com/tiehuis/2048-cli
#Git-Clone: https://github.com/tiehuis/2048-cli.git
Source: %{name}-%{version}.tar.xz
Patch0: 2048-cli-use-proper-gettext-header.patch
Patch1: 2048-cli-link-against-correct-curses-lib.patch
BuildRequires: ncurses-devel
%description
2048 puzzle is mathematics based puzzle game where you have to slide
tiles on a grid to combine them and create a tile with the number 2048.
You have to merge the similar number tiles (2n) by moving the arrow
keys in four different directions. When two tiles with the same number
touch, they will merge into one.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
export CFLAGS="%{optflags} $(pkg-config --cflags ncurses)"
make curses %{?_smp_mflags}
%install
install -Dpm 0755 2048 %{buildroot}%{_bindir}/2048-cli
install -Dpm 0644 man/2048.6 %{buildroot}%{_mandir}/man6/2048-cli.6
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%{_mandir}/man6/%{name}.6%{?ext_man}
%changelog

16
_service Normal file
View File

@ -0,0 +1,16 @@
<services>
<service mode="disabled" name="tar_scm">
<param name="url">https://github.com/tiehuis/2048-cli.git</param>
<param name="revision">master</param>
<param name="scm">git</param>
<param name="changesgenerate">enable</param>
<param name="versionrewrite-pattern">v(.*)</param>
<param name="versionformat">@PARENT_TAG@+git.%cd</param>
</service>
<service mode="disabled" name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service mode="disabled" name="set_version"/>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/tiehuis/2048-cli.git</param>
<param name="changesrevision">0e81799f0281890770996b6fc6b107b95e6d0369</param></service></servicedata>