git: 540e1c42bde8 - main - games/robocode*: use pkg-message to show message on remove

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Wed, 27 Jul 2022 14:27:21 UTC
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=540e1c42bde8df81448eef224b1f7c89c53412c4

commit 540e1c42bde8df81448eef224b1f7c89c53412c4
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-07-27 13:58:21 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-07-27 14:27:12 +0000

    games/robocode*: use pkg-message to show message on remove
---
 games/robocode-naval/Makefile               |  4 ++--
 games/robocode-naval/files/pkg-deinstall.in | 15 ---------------
 games/robocode-naval/files/pkg-message.in   | 12 ++++++++++++
 games/robocode/Makefile                     |  3 ++-
 games/robocode/files/pkg-deinstall.in       | 15 ---------------
 games/robocode/files/pkg-message.in         | 12 ++++++++++++
 6 files changed, 28 insertions(+), 33 deletions(-)

diff --git a/games/robocode-naval/Makefile b/games/robocode-naval/Makefile
index e00483e22b9d..74f826913135 100644
--- a/games/robocode-naval/Makefile
+++ b/games/robocode-naval/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	robocode
 PORTVERSION=	0.9.2
-PORTREVISION=	1
+PORTREVISION=	2
 DISTVERSIONSUFFIX=	-setup
 CATEGORIES=	games education java
 MASTER_SITES=	SF/${PORTNAME}/naval-robocode/${PORTVERSION}
@@ -28,7 +28,7 @@ DATADIR=	${JAVASHAREDIR}/${PORTNAME}${PKGNAMESUFFIX}
 
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
 
-SUB_FILES=	${PORTNAME}-NavalRobocode pkg-deinstall pkg-message
+SUB_FILES=	${PORTNAME}-NavalRobocode pkg-message
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}-NavalRobocode \
diff --git a/games/robocode-naval/files/pkg-deinstall.in b/games/robocode-naval/files/pkg-deinstall.in
deleted file mode 100644
index a3c5ddb86cd6..000000000000
--- a/games/robocode-naval/files/pkg-deinstall.in
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-if [ "$2" = "POST-DEINSTALL" ]; then
-    echo ""
-    echo ""
-    echo "==============================================================================="
-    echo ""
-    echo "After deinstallation, some files may stay in %%DATADIR%%,"
-    echo "you can delete them with"
-    echo ""
-    echo "    /bin/rm -fr %%DATADIR%%"
-    echo ""
-    echo "==============================================================================="
-    echo ""
-fi
diff --git a/games/robocode-naval/files/pkg-message.in b/games/robocode-naval/files/pkg-message.in
index 8d19243f6475..6d3bf10b07da 100644
--- a/games/robocode-naval/files/pkg-message.in
+++ b/games/robocode-naval/files/pkg-message.in
@@ -14,5 +14,17 @@ Attention not all with Rumble games works, this is work in Progress.
 
 Have fun!
 EOM
+},
+{ type: remove
+  message: <<EOM
+===============================================================================
+
+After deinstallation, some files may stay in %%DATADIR%%,
+you can delete them with
+
+    /bin/rm -fr %%DATADIR%%
+
+===============================================================================
+EOM
 }
 ]
diff --git a/games/robocode/Makefile b/games/robocode/Makefile
index 50781ba76b6b..c254c0346d73 100644
--- a/games/robocode/Makefile
+++ b/games/robocode/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	robocode
 PORTVERSION=	1.9.4.5
+PORTREVISION=	1
 CATEGORIES=	games education java
 MASTER_SITES=	SF
 DISTNAME=	${PORTNAME}-${DISTVERSION}-setup.jar
@@ -28,7 +29,7 @@ PLIST_SUB=	PORTVERSION=${PORTVERSION}
 
 SUB_FILES=	${PORTNAME}-MeleeRumble ${PORTNAME}-RoboRumble \
 		${PORTNAME}-Robocode ${PORTNAME}-TeamRumble \
-		${PORTNAME}-TwinDuel pkg-deinstall pkg-message
+		${PORTNAME}-TwinDuel pkg-message
 
 do-install:
 	cd ${WRKDIR} && ${INSTALL_SCRIPT} ${SUB_FILES:Mrobocode-*} \
diff --git a/games/robocode/files/pkg-deinstall.in b/games/robocode/files/pkg-deinstall.in
deleted file mode 100644
index a3c5ddb86cd6..000000000000
--- a/games/robocode/files/pkg-deinstall.in
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-if [ "$2" = "POST-DEINSTALL" ]; then
-    echo ""
-    echo ""
-    echo "==============================================================================="
-    echo ""
-    echo "After deinstallation, some files may stay in %%DATADIR%%,"
-    echo "you can delete them with"
-    echo ""
-    echo "    /bin/rm -fr %%DATADIR%%"
-    echo ""
-    echo "==============================================================================="
-    echo ""
-fi
diff --git a/games/robocode/files/pkg-message.in b/games/robocode/files/pkg-message.in
index 2e2deb1b920c..134496daba38 100644
--- a/games/robocode/files/pkg-message.in
+++ b/games/robocode/files/pkg-message.in
@@ -15,5 +15,17 @@ Attention not all with Rumble games works, this is work in Progress.
 
 Have fun!
 EOM
+},
+{ type: remove
+  message: <<EOM
+===============================================================================
+
+After deinstallation, some files may stay in %%DATADIR%%,
+you can delete them with
+
+    /bin/rm -fr %%DATADIR%%
+
+===============================================================================
+EOM
 }
 ]