aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2022-07-27 14:22:42 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2022-07-27 14:27:13 +0000
commit131f741e5a0f18883c97869be63b68367604bc5b (patch)
treec8547d15a0ffc34973ea4519ad9c356afee942eb
parent88c8cb129858a8d8fd0382d40d46c176e6008174 (diff)
downloadports-131f741e5a0f18883c97869be63b68367604bc5b.tar.gz
ports-131f741e5a0f18883c97869be63b68367604bc5b.zip
net-im/prosody: use pkg-message to show message on remove
-rw-r--r--net-im/prosody/Makefile5
-rw-r--r--net-im/prosody/files/pkg-deinstall.in22
-rw-r--r--net-im/prosody/files/pkg-message.in30
-rw-r--r--net-im/prosody/pkg-message12
4 files changed, 33 insertions, 36 deletions
diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile
index 37f23d4eea1a..0b12532be1a4 100644
--- a/net-im/prosody/Makefile
+++ b/net-im/prosody/Makefile
@@ -1,5 +1,6 @@
PORTNAME= prosody
DISTVERSION= 0.12.1
+PORTREVISION= 1
CATEGORIES= net-im
MASTER_SITES= https://prosody.im/downloads/source/
@@ -44,8 +45,8 @@ USERS= prosody
GROUPS= ${USERS}
USE_RC_SUBR= prosody
-SUB_FILES= pkg-deinstall
-SUB_LIST= USERS=${USERS} GROUPS=${GROUPS} LUA_PREFIX=${LUA_PREFIX} LUA_CMD=${LUA_CMD}
+SUB_FILES= pkg-message
+SUB_LIST= USERS=${USERS} GROUPS=${GROUPS} LUA_PREFIX=${LUA_PREFIX} LUA_CMD=${LUA_CMD} PORTNAME="${PORTNAME}"
PLIST_SUB= PROSODY_USER=${USERS} PROSODY_GROUP=${GROUPS}
post-install:
diff --git a/net-im/prosody/files/pkg-deinstall.in b/net-im/prosody/files/pkg-deinstall.in
deleted file mode 100644
index 91071be27459..000000000000
--- a/net-im/prosody/files/pkg-deinstall.in
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-case $2 in
-POST-DEINSTALL)
- echo "===> post-deinstallation information for $1:"
- echo ""
- echo " Note:"
- echo " Prosody related user accounts and groups were not removed."
- echo ""
- echo " To remove the user and group which were created by "
- echo " the installation of this package, run:"
- echo ""
- echo " pw userdel -n %%USERS%%"
- echo " pw groupdel -n %%GROUPS%%"
- echo ""
- echo " and to remove all server data:"
- echo " rm -rf /var/db/prosody"
- echo " rm -rf /var/run/prosody"
- echo ""
- ;;
-esac
-exit 0
diff --git a/net-im/prosody/files/pkg-message.in b/net-im/prosody/files/pkg-message.in
new file mode 100644
index 000000000000..09cb718c3642
--- /dev/null
+++ b/net-im/prosody/files/pkg-message.in
@@ -0,0 +1,30 @@
+[
+{ type: install
+ message: <<EOM
+If you're running Prosody in a jail and experience problems, please add
+the following to the global section of your prosody.cfg.lua:
+
+interfaces = { 'x.x.x.x' }
+
+where 'x.x.x.x' is the public IP you wish Prosody to bind to.
+EOM
+},
+{ type: remove
+ message: <<EOM
+===> post-deinstallation information for %%PORTNAME%%:"
+
+ Note:
+ Prosody related user accounts and groups were not removed.
+
+ To remove the user and group which were created by
+ the installation of this package, run:
+
+ pw userdel -n %%USERS%%
+ pw groupdel -n %%GROUPS%%
+
+ and to remove all server data:
+ rm -rf /var/db/prosody"
+ rm -rf /var/run/prosody"
+EOM
+}
+]
diff --git a/net-im/prosody/pkg-message b/net-im/prosody/pkg-message
deleted file mode 100644
index f8c04cf9daef..000000000000
--- a/net-im/prosody/pkg-message
+++ /dev/null
@@ -1,12 +0,0 @@
-[
-{ type: install
- message: <<EOM
-If you're running Prosody in a jail and experience problems, please add
-the following to the global section of your prosody.cfg.lua:
-
-interfaces = { 'x.x.x.x' }
-
-where 'x.x.x.x' is the public IP you wish Prosody to bind to.
-EOM
-}
-]