Compare commits
29 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3f3cf3e68 | ||
|
|
d5c94f5b8c | ||
|
|
9a02a47cc8 |
||
|
|
f7db56ce43 |
||
|
|
8ac93b3ebf |
||
|
|
1be8dfe9ac | ||
|
|
c5bf470ed7 | ||
|
|
914aa27c14 | ||
|
|
ecc59a8d76 | ||
|
|
e9d2786d76 | ||
|
|
2152721995 | ||
|
|
350a2b4270 | ||
|
|
d88ec1d467 | ||
|
|
3f663e74d1 | ||
|
|
00836146a3 | ||
|
|
31967bb4e6 | ||
|
|
6f32982e09 | ||
|
|
a13b5762ff | ||
|
|
1faf00b1b9 | ||
|
|
2b456010d5 | ||
|
|
d4e5960613 | ||
|
|
83e6af7173 | ||
|
|
fccf99038b | ||
|
|
22ed29c15e |
||
|
|
230885cde4 | ||
|
|
dbb51bb1c5 | ||
|
|
c1b35bc1fd | ||
|
|
01994226b2 | ||
|
|
5d7512806a |
3 changed files with 133 additions and 73 deletions
19
2048-cli-0.9.1-fix-Wformat.patch
Normal file
19
2048-cli-0.9.1-fix-Wformat.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
Index: 2048-cli-0.9.1/src/gfx_curses.c
|
||||||
|
===================================================================
|
||||||
|
--- 2048-cli-0.9.1.orig/src/gfx_curses.c
|
||||||
|
+++ 2048-cli-0.9.1/src/gfx_curses.c
|
||||||
|
@@ -59,11 +59,11 @@ struct gfx_state* gfx_init(struct gamest
|
||||||
|
void gfx_draw(struct gfx_state *s, struct gamestate *g)
|
||||||
|
{
|
||||||
|
if (g->score_last)
|
||||||
|
- mvwprintw(s->window, 0, 0, "Score: %d (+%d)\n", g->score, g->score_last);
|
||||||
|
+ mvwprintw(s->window, 0, 0, "Score: %ld (+%ld)\n", g->score, g->score_last);
|
||||||
|
else
|
||||||
|
- mvwprintw(s->window, 0, 0, "Score: %d\n", g->score);
|
||||||
|
+ mvwprintw(s->window, 0, 0, "Score: %ld\n", g->score);
|
||||||
|
|
||||||
|
- mvwprintw(s->window, 1, 0, " Hi: %d\n", g->score_high);
|
||||||
|
+ mvwprintw(s->window, 1, 0, " Hi: %ld\n", g->score_high);
|
||||||
|
|
||||||
|
wattron(s->window, A_DIM);
|
||||||
|
iterate(g->opts->grid_width * (g->print_width + 2) + 1, waddch(s->window, '-'));
|
||||||
10
2048-cli-0.9.1-include-string-h.patch
Normal file
10
2048-cli-0.9.1-include-string-h.patch
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
Index: 2048-cli-0.9.1/src/gfx_sdl.c
|
||||||
|
===================================================================
|
||||||
|
--- 2048-cli-0.9.1.orig/src/gfx_sdl.c
|
||||||
|
+++ 2048-cli-0.9.1/src/gfx_sdl.c
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include <SDL.h>
|
||||||
|
#include <SDL_ttf.h>
|
||||||
|
#include "merge.h"
|
||||||
177
2048-cli.spec
177
2048-cli.spec
|
|
@ -1,127 +1,158 @@
|
||||||
# Conditional for release and snapshot builds. Uncomment for release-builds.
|
Name: 2048-cli
|
||||||
%global rel_build 1
|
Version: 0.9.1
|
||||||
|
Release: 25%{?gitrel}%{?dist}
|
||||||
|
Summary: The game 2048 for your Linux terminal
|
||||||
|
|
||||||
# Setup _pkgdocdir if not defined already.
|
License: MIT
|
||||||
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
URL: https://github.com/Tiehuis/%{name}
|
||||||
|
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# Settings used for build from snapshots.
|
Patch0000: %{name}-%{version}-include-string-h.patch
|
||||||
%if ! 0%{?rel_build}
|
Patch0001: %{name}-%{version}-fix-Wformat.patch
|
||||||
%global commit 4520781f25805bd9e3b0a7b861d55a22baeff7e3
|
|
||||||
%global commit_date 20151229
|
|
||||||
%global shortcommit %(c=%{commit};echo ${c:0:7})
|
|
||||||
%global gitver git%{commit_date}-%{shortcommit}
|
|
||||||
%global gitrel .git%{commit_date}.%{shortcommit}
|
|
||||||
%endif # 0%%{?rel_build}
|
|
||||||
|
|
||||||
# Proper naming for the tarball from github.
|
BuildRequires: gcc
|
||||||
%global gittar %{name}-%{version}%{!?rel_build:-%{gitver}}.tar.gz
|
BuildRequires: make
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
# No SDL2 on EPEL <= 7.
|
|
||||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
|
||||||
%bcond_without sdl
|
|
||||||
%else # 0%%{?fedora} || 0%%{?rhel} >= 8
|
|
||||||
%bcond_with sdl
|
|
||||||
%endif # 0%%{?fedora} || 0%%{?rhel} >= 8
|
|
||||||
|
|
||||||
Name: 2048-cli
|
|
||||||
Version: 0.9.1
|
|
||||||
Release: 1%{?gitrel}%{?dist}
|
|
||||||
Summary: The game 2048 for your Linux terminal
|
|
||||||
|
|
||||||
License: MIT
|
|
||||||
URL: https://github.com/Tiehuis/%{name}
|
|
||||||
%if 0%{?rel_build}
|
|
||||||
# Sources for release-builds.
|
|
||||||
Source0: %{url}/archive/v%{version}.tar.gz#/%{gittar}
|
|
||||||
%else # 0%%{?rel_build}
|
|
||||||
# Sources for snapshot-builds.
|
|
||||||
Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}
|
|
||||||
%endif # 0%%{?rel_build}
|
|
||||||
|
|
||||||
BuildRequires: ncurses-devel
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
A cli version of the game 2048 for your Linux terminal.
|
A cli version of the game 2048 for your Linux terminal.
|
||||||
|
|
||||||
|
|
||||||
%package nocurses
|
%package nocurses
|
||||||
Summary: The game 2048 for your Linux terminal (non-ncurses)
|
Summary: The game 2048 for your Linux terminal (non-ncurses)
|
||||||
|
|
||||||
%description nocurses
|
%description nocurses
|
||||||
A non-ncurses cli version of the game 2048 for your Linux terminal.
|
A non-ncurses cli version of the game 2048 for your Linux terminal.
|
||||||
|
|
||||||
|
|
||||||
%if %{with sdl}
|
|
||||||
%package sdl
|
%package sdl
|
||||||
Summary: The game 2048 for your Linux terminal (SDL)
|
Summary: The game 2048 for your Linux terminal (SDL)
|
||||||
|
|
||||||
BuildRequires: SDL2_ttf-devel
|
BuildRequires: SDL2_ttf-devel
|
||||||
BuildRequires: liberation-mono-fonts
|
BuildRequires: liberation-mono-fonts
|
||||||
|
|
||||||
Requires: liberation-mono-fonts
|
Requires: liberation-mono-fonts
|
||||||
|
|
||||||
%description sdl
|
%description sdl
|
||||||
A SDL version of the game 2048 for your Linux terminal.
|
A SDL version of the game 2048 for your Linux terminal.
|
||||||
%endif # %%{with sdl}
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q%{!?rel_build:n %{name}-%{commit}}
|
%autosetup -p 1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export TTF_FONT_PATH="%{_datadir}/fonts/liberation/LiberationMono-Regular.ttf"
|
export TTF_FONT_PATH="%{_datadir}/fonts/liberation/LiberationMono-Regular.ttf"
|
||||||
%configure || :
|
%make_build terminal
|
||||||
%{__make} %{?_smp_mflags} terminal
|
mv 2048 2048nc
|
||||||
%{__mv} -f 2048 2048nc
|
%make_build sdl
|
||||||
%if %{with sdl}
|
mv 2048 2048sdl
|
||||||
%{__make} %{?_smp_mflags} sdl
|
%make_build curses
|
||||||
%{__mv} -f 2048 2048sdl
|
|
||||||
%endif # %%{with sdl}
|
|
||||||
%{__make} %{?_smp_mflags} curses
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# There is no install-target in Makefile.
|
# There is no install-target in Makefile.
|
||||||
%{__mkdir} -p %{buildroot}%{_bindir} \
|
mkdir -p %{buildroot}{%{_bindir},%{_mandir}/man1,%{_pkgdocdir}}
|
||||||
%{buildroot}%{_mandir}/man1 \
|
install -pm 0755 2048 2048nc 2048sdl %{buildroot}%{_bindir}
|
||||||
%{buildroot}%{_pkgdocdir}
|
install -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048.1
|
||||||
%{__install} -pm 0755 2048 2048nc %{buildroot}%{_bindir}
|
install -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048nc.1
|
||||||
%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048.1
|
install -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048sdl.1
|
||||||
%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048nc.1
|
|
||||||
%if %{with sdl}
|
|
||||||
%{__install} -pm 0755 2048sdl %{buildroot}%{_bindir}
|
|
||||||
%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048sdl.1
|
|
||||||
%endif # %%{with sdl}
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%{!?_licensedir:%global license %doc}
|
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{_bindir}/2048
|
%{_bindir}/2048
|
||||||
%{_mandir}/man1/2048.1*
|
%{_mandir}/man1/2048.1*
|
||||||
|
|
||||||
%files nocurses
|
%files nocurses
|
||||||
# Pickup license-files from main-pkg's license-dir
|
%license %{_datadir}/licenses/%{name}*
|
||||||
# If there's no license-dir they are picked up by %%doc previously
|
|
||||||
%{?_licensedir:%license %{_datadir}/licenses/%{name}*}
|
|
||||||
%doc %{_pkgdocdir}
|
%doc %{_pkgdocdir}
|
||||||
%{_bindir}/2048nc
|
%{_bindir}/2048nc
|
||||||
%{_mandir}/man1/2048nc.1*
|
%{_mandir}/man1/2048nc.1*
|
||||||
|
|
||||||
%if %{with sdl}
|
|
||||||
%files sdl
|
%files sdl
|
||||||
# Pickup license-files from main-pkg's license-dir
|
%license %{_datadir}/licenses/%{name}*
|
||||||
# If there's no license-dir they are picked up by %%doc previously
|
|
||||||
%{?_licensedir:%license %{_datadir}/licenses/%{name}*}
|
|
||||||
%doc %{_pkgdocdir}
|
%doc %{_pkgdocdir}
|
||||||
%{_bindir}/2048sdl
|
%{_bindir}/2048sdl
|
||||||
%{_mandir}/man1/2048sdl.1*
|
%{_mandir}/man1/2048sdl.1*
|
||||||
%endif # %%{with sdl}
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-25
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-24
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jan 19 2025 Björn Esser <besser82@fedoraproject.org> - 0.9.1-23
|
||||||
|
- Add patch to properly #include<string.h> where needed
|
||||||
|
- Add patch to fix -Wformat
|
||||||
|
- Drop old cruft from spec file
|
||||||
|
|
||||||
|
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-22
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-21
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 29 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-20
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-19
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-18
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-17
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-16
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-15
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-14
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-13
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-12
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-11
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-9
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-7
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-6
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Mar 30 2016 Björn Esser <fedora@besser82.io> - 0.9.1-1
|
* Wed Mar 30 2016 Björn Esser <fedora@besser82.io> - 0.9.1-1
|
||||||
- new upstream release 0.9.1
|
- new upstream release 0.9.1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue