Compare commits
35 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 | ||
|
|
18e2d1e082 | ||
|
|
85bf0ca4f8 | ||
|
|
914d6e8b0d | ||
|
|
94bf616a93 | ||
|
|
65ea0fa238 | ||
|
|
36462e23de |
4 changed files with 169 additions and 51 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"
|
||||
189
2048-cli.spec
189
2048-cli.spec
|
|
@ -1,88 +1,177 @@
|
|||
# Conditional for release and snapshot builds. Uncomment for release-builds.
|
||||
#global rel_build 1
|
||||
Name: 2048-cli
|
||||
Version: 0.9.1
|
||||
Release: 25%{?gitrel}%{?dist}
|
||||
Summary: The game 2048 for your Linux terminal
|
||||
|
||||
# Setup _pkgdocdir if not defined already.
|
||||
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
License: MIT
|
||||
URL: https://github.com/Tiehuis/%{name}
|
||||
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
|
||||
# Settings used for build from snapshots.
|
||||
%{!?rel_build:%global commit 723738c7069e83cd2d4fe1a0593e635839e42b22}
|
||||
%{!?rel_build:%global commit_date 20141214}
|
||||
%{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})}
|
||||
%{!?rel_build:%global gitver git%{commit_date}-%{shortcommit}}
|
||||
%{!?rel_build:%global gitrel .git%{commit_date}.%{shortcommit}}
|
||||
Patch0000: %{name}-%{version}-include-string-h.patch
|
||||
Patch0001: %{name}-%{version}-fix-Wformat.patch
|
||||
|
||||
# Proper naming for the tarball from github.
|
||||
%global gittar %{name}-%{version}%{!?rel_build:-%{gitver}}.tar.gz
|
||||
|
||||
Name: 2048-cli
|
||||
Version: 0.9
|
||||
Release: 4%{?gitrel}%{?dist}
|
||||
Summary: The game 2048 for your Linux terminal
|
||||
%{?el5:Group: Amusements/Games}
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/Tiehuis/%{name}
|
||||
# Sources for release-builds.
|
||||
%{?rel_build:Source0: %{url}/archive/v%{version}.tar.gz#/%{gittar}}
|
||||
# Sources for snapshot-builds.
|
||||
%{!?rel_build:Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}}
|
||||
|
||||
%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: docbook-style-xsl
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
BuildRequires: ncurses-devel
|
||||
|
||||
%description
|
||||
A cli version of the game 2048 for your Linux terminal.
|
||||
|
||||
|
||||
%package nocurses
|
||||
Summary: The game 2048 for your Linux terminal (non-ncurses)
|
||||
%{?el5:Group: Amusements/Games}
|
||||
Summary: The game 2048 for your Linux terminal (non-ncurses)
|
||||
|
||||
%description nocurses
|
||||
A non-ncurses cli version of the game 2048 for your Linux terminal.
|
||||
|
||||
|
||||
%package sdl
|
||||
Summary: The game 2048 for your Linux terminal (SDL)
|
||||
|
||||
BuildRequires: SDL2_ttf-devel
|
||||
BuildRequires: liberation-mono-fonts
|
||||
|
||||
Requires: liberation-mono-fonts
|
||||
|
||||
%description sdl
|
||||
A SDL version of the game 2048 for your Linux terminal.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q%{!?rel_build:n %{name}-%{commit}}
|
||||
%autosetup -p 1
|
||||
|
||||
|
||||
%build
|
||||
%{__make} %{?_smp_mflags} 2048 2048nc man \
|
||||
CFLAGS='%{optflags}' LDFLAGS='%{?__global_ldflags}'
|
||||
export TTF_FONT_PATH="%{_datadir}/fonts/liberation/LiberationMono-Regular.ttf"
|
||||
%make_build terminal
|
||||
mv 2048 2048nc
|
||||
%make_build sdl
|
||||
mv 2048 2048sdl
|
||||
%make_build curses
|
||||
|
||||
|
||||
%install
|
||||
%{?el5:%{__rm} -rf %{buildroot}}
|
||||
|
||||
# There is no install-target in Makefile.
|
||||
%{__mkdir} -p %{buildroot}%{_bindir} \
|
||||
%{buildroot}%{_mandir}/man1 \
|
||||
%{buildroot}%{_pkgdocdir}
|
||||
%{__install} -pm 0755 2048 2048nc %{buildroot}%{_bindir}
|
||||
%{__install} -pm 0644 man/*.1 %{buildroot}%{_mandir}/man1
|
||||
%{__install} -pm 0644 man/2048*.1.txt LICENSE README.md \
|
||||
%{buildroot}%{_pkgdocdir}
|
||||
|
||||
|
||||
%{?el5:%clean}
|
||||
%{?el5:%{__rm} -rf %{buildroot}}
|
||||
mkdir -p %{buildroot}{%{_bindir},%{_mandir}/man1,%{_pkgdocdir}}
|
||||
install -pm 0755 2048 2048nc 2048sdl %{buildroot}%{_bindir}
|
||||
install -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048.1
|
||||
install -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048nc.1
|
||||
install -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048sdl.1
|
||||
|
||||
|
||||
%files
|
||||
%doc %{_pkgdocdir}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/2048
|
||||
%{_mandir}/man1/2048.1*
|
||||
|
||||
%files nocurses
|
||||
%license %{_datadir}/licenses/%{name}*
|
||||
%doc %{_pkgdocdir}
|
||||
%{_bindir}/2048nc
|
||||
%{_mandir}/man1/2048nc.1*
|
||||
|
||||
%files sdl
|
||||
%license %{_datadir}/licenses/%{name}*
|
||||
%doc %{_pkgdocdir}
|
||||
%{_bindir}/2048sdl
|
||||
%{_mandir}/man1/2048sdl.1*
|
||||
|
||||
|
||||
%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
|
||||
- new upstream release 0.9.1
|
||||
|
||||
* Tue Mar 29 2016 Björn Esser <fedora@besser82.io> - 0.9.1-0.2.git20151229.4520781
|
||||
- properly apply CFLAGS, without clobbering the Makefile-preset
|
||||
|
||||
* Tue Mar 29 2016 Björn Esser <fedora@besser82.io> - 0.9.1-0.1.git20151229.4520781
|
||||
- update to new snapshot git20151229.4520781
|
||||
- handle %%license and %%doc properly
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-7.git20150225.dc9adea
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Thu Jun 18 2015 Björn Esser <bjoern.esser@gmail.com> - 0.9-6.git20150225.dc9adea
|
||||
- update to new snapshot git20150225.dc9adea
|
||||
|
||||
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-5.git20141214.723738c
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sun Dec 14 2014 Björn Esser <bjoern.esser@gmail.com> - 0.9-4.git20141214.723738c
|
||||
- update to new snapshot git20141214.723738c, obsoletes Patch0
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
66b80f377302602cb28432a004bcb107 2048-cli-0.9-git20141214-723738c.tar.gz
|
||||
e940e430d4222718dd04ad88bd0daf2a 2048-cli-0.9.1.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue