[packages/battleships] - updated to 2.15
qboosh
qboosh at pld-linux.org
Sat May 30 09:09:00 CEST 2026
commit 9be7f94c5d67c26ca37bc0c6d476cf70ee950f1b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 30 09:09:10 2026 +0200
- updated to 2.15
battleships-install.patch | 11 +++++++++++
battleships-ldflags.patch | 12 ++++++------
battleships-types.patch | 21 +++++++++++++++++++++
battleships.spec | 20 ++++++++++++--------
4 files changed, 50 insertions(+), 14 deletions(-)
---
diff --git a/battleships.spec b/battleships.spec
index 1862bc3..c6d20f4 100644
--- a/battleships.spec
+++ b/battleships.spec
@@ -1,13 +1,15 @@
Summary: Battleships against the computer (character-cell graphics)
Summary(pl.UTF-8): Gra w statki przeciwko komputerowi
Name: battleships
-Version: 2.13
+Version: 2.15
Release: 1
License: BSD
Group: Applications/Games
Source0: http://www.catb.org/~esr/bs/bs-%{version}.tar.gz
-# Source0-md5: ea60abdbce9283eee201c8c854aa9749
+# Source0-md5: 51ee08ccdc56d87298929c9092a72914
Patch0: %{name}-ldflags.patch
+Patch1: %{name}-types.patch
+Patch2: %{name}-install.patch
URL: http://www.catb.org/~esr/bs/
BuildRequires: ncurses-devel
BuildRequires: xmlto
@@ -29,20 +31,22 @@ Mysz działa w xtermie.
%prep
%setup -q -n bs-%{version}
%patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
%build
%{__make} \
- TERMLIB="-lncurses -ltinfo" \
CC="%{__cc}" \
- CFLAGS="%{rpmcflags} -I /usr/include/ncurses" \
- LDFLAGS="%{rpmldflags}"
+ CFLAGS="%{rpmcflags} %{rpmcppflags} -I/usr/include/ncurses" \
+ LDFLAGS="%{rpmldflags}" \
+ TERMLIB="-lncurses -ltinfo"
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man6}
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ DESTDIR=$RPM_BUILD_ROOT \
+ PREFIX=%{_prefix}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -55,7 +59,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README
+%doc COPYING NEWS.adoc README.adoc
%attr(755,root,root) %{_bindir}/bs
%{_datadir}/appdata/bs.adoc
%{_desktopdir}/bs.desktop
diff --git a/battleships-install.patch b/battleships-install.patch
new file mode 100644
index 0000000..612743c
--- /dev/null
+++ b/battleships-install.patch
@@ -0,0 +1,11 @@
+--- bs-2.15/Makefile.orig 2026-05-30 09:07:33.833500073 +0200
++++ bs-2.15/Makefile 2026-05-30 09:07:44.493442323 +0200
+@@ -54,7 +54,7 @@ install: bs.6 uninstall
+ install -m 0755 -d $(DESTDIR)//usr/share/applications/
+ install -m 0755 -d $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/
+ install -m 0755 -d $(DESTDIR)/usr/share/appdata
+- install -m 0755 bs $(DESTDIR)$(MANDIR)/
++ install -m 0755 bs $(DESTDIR)$(BINDIR)/
+ install -m 0644 bs.6 $(DESTDIR)$(MANDIR)/man6/
+ install -m 0644 bs.desktop $(DESTDIR)/usr/share/applications/
+ install -m 0644 battleship.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/
diff --git a/battleships-ldflags.patch b/battleships-ldflags.patch
index 739e600..bcc3aff 100644
--- a/battleships-ldflags.patch
+++ b/battleships-ldflags.patch
@@ -1,11 +1,11 @@
---- bs-2.13/Makefile.orig 2024-12-01 20:14:11.628052404 +0100
-+++ bs-2.13/Makefile 2024-12-01 20:36:48.880699535 +0100
-@@ -11,7 +11,7 @@ CC = gcc
- DESTDIR =
+--- bs-2.15/Makefile.orig 2026-03-27 11:43:30.000000000 +0100
++++ bs-2.15/Makefile 2026-05-30 09:00:25.639153134 +0200
+@@ -29,7 +29,7 @@ VERSION=$(shell sed -n <NEWS.adoc '/::/s
+ # Build
bs: bs.c
- $(CC) $(CFLAGS) -DVERSION='"$(VERSION)"' -o bs bs.c -lncurses
+ $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION='"$(VERSION)"' -o bs bs.c $(TERMLIB)
- # Note: to suppress the footers with timestamps being generated in HTML,
- # we use "-a nofooter".
+ clean:
+ rm -f bs bs.6 bs*.tar.gz bs*.rpm *~ *.html
diff --git a/battleships-types.patch b/battleships-types.patch
new file mode 100644
index 0000000..5a65142
--- /dev/null
+++ b/battleships-types.patch
@@ -0,0 +1,21 @@
+Fix conflicting/inconsistent types.
+--- bs-2.15/bs.c.orig 2026-05-30 09:01:40.898745418 +0200
++++ bs-2.15/bs.c 2026-05-30 09:03:15.624898909 +0200
+@@ -112,7 +112,7 @@ typedef struct {
+ bool placed; /* has it been placed on the board? */
+ } ship_t;
+
+-static bool checkplace(int b, ship_t *ss, int vis);
++static bool checkplace(int b, const ship_t *ss, int vis);
+ static void reset_ai_state(void);
+
+ static ship_t plyship[SHIPTYPES] = {
+@@ -1291,7 +1291,7 @@ static int scount(int who) {
+ }
+
+ int main(int argc, char *argv[]) {
+- do_options(argc, argv);
++ do_options(argc, (const char **)argv);
+
+ intro();
+ do {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/battleships.git/commitdiff/9be7f94c5d67c26ca37bc0c6d476cf70ee950f1b
More information about the pld-cvs-commit
mailing list