git: 9636cde2213c - main - cad/linux-eagle5: use pkg-message to show message on remove

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

URL: https://cgit.FreeBSD.org/ports/commit/?id=9636cde2213c259225e82563cead59721090a610

commit 9636cde2213c259225e82563cead59721090a610
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-07-27 13:34:20 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-07-27 14:27:11 +0000

    cad/linux-eagle5: use pkg-message to show message on remove
---
 cad/linux-eagle5/Makefile               |  4 ++--
 cad/linux-eagle5/files/pkg-deinstall.in | 19 -------------------
 cad/linux-eagle5/files/pkg-message.in   |  8 ++++++++
 3 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/cad/linux-eagle5/Makefile b/cad/linux-eagle5/Makefile
index aa20658feb28..2e26d8c40f91 100644
--- a/cad/linux-eagle5/Makefile
+++ b/cad/linux-eagle5/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	eagle5
 PORTVERSION=	${EAGLEVERSION}
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	cad linux
 MASTER_SITES=	LOCAL/riggs/${PORTNAME} \
 		ftp://ftp.cadsoft.de/eagle/program/${EAGLEBASEVERSION}/
@@ -37,7 +37,7 @@ EAGLEVERSION=	${EAGLEBASEVERSION}.${EAGLEBUGFIX}
 USES=		linux
 USE_LINUX=	xorglibs jpeg png
 NO_BUILD=	yes
-SUB_FILES=	pkg-deinstall pkg-message
+SUB_FILES=	pkg-message
 
 DESKTOP_ENTRIES=	"Eagle5" "Tool for designing printed circuit boards" \
 			${DATADIR}/ulp/eagle.bmp \
diff --git a/cad/linux-eagle5/files/pkg-deinstall.in b/cad/linux-eagle5/files/pkg-deinstall.in
deleted file mode 100644
index 5418dcb1c48d..000000000000
--- a/cad/linux-eagle5/files/pkg-deinstall.in
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-PATH=/bin:/usr/sbin:/usr/bin:/usr/sbin
-
-DATADIR="%%DATADIR%%"
-
-post-deinstall() {
-	echo "WARNING: If you will *NOT* use this package anymore, please remove the"
-	echo " following file and the directory manually:"
-	echo " ${DATADIR}/bin/eagle.key"
-	echo " ${DATADIR}"
-	echo
-}
-
-case $2 in
-	POST-DEINSTALL)
-		post-deinstall
-		;;
-esac
diff --git a/cad/linux-eagle5/files/pkg-message.in b/cad/linux-eagle5/files/pkg-message.in
index 338235d72c1c..12bc421ae666 100644
--- a/cad/linux-eagle5/files/pkg-message.in
+++ b/cad/linux-eagle5/files/pkg-message.in
@@ -12,5 +12,13 @@ directory upon initial startup. If this user does no longer want to
 work on projects with eagle (e.g. the root account has been used to
 create the mentioned key file), this directory can safely be deleted.
 EOM
+},
+{ type: rmeove
+  message: <<EOM
+WARNING: If you will *NOT* use this package anymore, please remove the
+ following file and the directory manually:
+ %%DATADIR%%/bin/eagle.key
+ %%DATADIR%%
+EOM
 }
 ]