aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2011-06-08 14:35:10 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2011-06-08 14:35:10 +0000
commit575fdd36d644a66578a5e4e698613aae8fa9b1ae (patch)
tree4cda5948ad19efcd66b2f6f8dea70832e2e2607f /security
parentf8261fbd8b725393b62d85a10fceb07f4181000f (diff)
downloadports-575fdd36d644a66578a5e4e698613aae8fa9b1ae.tar.gz
ports-575fdd36d644a66578a5e4e698613aae8fa9b1ae.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/prelude-manager/Makefile23
-rw-r--r--security/prelude-manager/distinfo1
-rw-r--r--security/prelude-manager/files/pkg-deinstall.in17
-rw-r--r--security/prelude-manager/files/pkg-install.in74
4 files changed, 6 insertions, 109 deletions
diff --git a/security/prelude-manager/Makefile b/security/prelude-manager/Makefile
index cca7c1c9138a..962bd39095fd 100644
--- a/security/prelude-manager/Makefile
+++ b/security/prelude-manager/Makefile
@@ -6,7 +6,7 @@
PORTNAME= prelude-manager
PORTVERSION= 0.9.14.2
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= security
MASTER_SITES= http://www.prelude-ids.com/download/releases/%SUBDIR%/
MASTER_SITE_SUBDIR= ${PORTNAME} ${PORTNAME}/old
@@ -26,26 +26,15 @@ CONFIGURE_ARGS= --with-html-dir=${PREFIX}/share/doc \
CONFIGURE_ENV= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="${LIBS} -L${LOCALBASE}/lib"
-PRELUDEUSER?= prelude
-PRELUDEGROUP?= prelude
-PRELUDEDIR?= /nonexistent
-
-PRELUDEUID= 281
-PRELUDEGID= ${PRELUDEUID}
+USERS?= prelude
+GROUPS?= prelude
MAN1= prelude-manager.1
-.include <bsd.port.pre.mk>
-
-PLIST_SUB+= PRELUDEDIR=${PRELUDEDIR} \
- PRELUDEUSER=${PRELUDEUSER} \
- PRELUDEGROUP=${PRELUDEGROUP}
+PLIST_SUB= PRELUDEUSER=${USERS} \
+ PRELUDEGROUP=${GROUPS}
-SUB_FILES= pkg-install \
- pkg-deinstall
-
-SUB_LIST= PREFIX=${PREFIX} \
- ${PLIST_SUB}
+.include <bsd.port.pre.mk>
.if defined(WITHOUT_XML)
PLIST_SUB+= WITH_XML="@comment "
diff --git a/security/prelude-manager/distinfo b/security/prelude-manager/distinfo
index 87962ced1c18..a56777e2114f 100644
--- a/security/prelude-manager/distinfo
+++ b/security/prelude-manager/distinfo
@@ -1,3 +1,2 @@
-MD5 (prelude-manager-0.9.14.2.tar.gz) = 4112f1be84cace540d649a6127a46d9c
SHA256 (prelude-manager-0.9.14.2.tar.gz) = b73e299ee3dabc1396f8b432e058c140769383b881b096c7ba964fd8e3ff5d22
SIZE (prelude-manager-0.9.14.2.tar.gz) = 778280
diff --git a/security/prelude-manager/files/pkg-deinstall.in b/security/prelude-manager/files/pkg-deinstall.in
deleted file mode 100644
index c1a7591a1955..000000000000
--- a/security/prelude-manager/files/pkg-deinstall.in
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh -
-#
-# $FreeBSD$
-#
-
-PRELUDEUSER=%%PRELUDEUSER%%
-PRELUDEGROUP=%%PRELUDEGROUP%%
-
-if [ "$2" = "POST-DEINSTALL" ]; then
- if /usr/sbin/pw group show "${PRELUDEGROUP}" 2>&1 >/dev/null; then
- echo "You should manually remove the \"${PRELUDEGROUP}\" group."
- fi
-
- if /usr/sbin/pw user show "${PRELUDEUSER}" 2>&1 >/dev/null; then
- echo "You should manually remove the \"${PRELUDEUSER}\" user."
- fi
-fi
diff --git a/security/prelude-manager/files/pkg-install.in b/security/prelude-manager/files/pkg-install.in
deleted file mode 100644
index 5c58a9fc2d08..000000000000
--- a/security/prelude-manager/files/pkg-install.in
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh -
-#
-# $FreeBSD$
-#
-
-PRELUDEDIR=%%PRELUDEDIR%%
-PRELUDEUSER=%%PRELUDEUSER%%
-PRELUDEGROUP=%%PRELUDEGROUP%%
-PRELUDEUID=%%PRELUDEUID%%
-PRELUDEGID=%%PRELUDEGID%%
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ "x${answer}" = "x" ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local default question answer
-
- question=$1
- default=$2
- while :; do
- answer=$(ask "${question}" "${default}")
- case "${answer}" in
- [Yy][Ee][Ss]|[Yy])
- return 0
- ;;
- [Nn][Oo]|[Nn])
- return 1
- ;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-if [ "$2" = "PRE-INSTALL" ]; then
- if /usr/sbin/pw group show "${PRELUDEGROUP}" 2>&1 >/dev/null; then
- echo "You already have a \"${PRELUDEGROUP}\" group, so I will use it."
- else
- echo "You need a \"${PRELUDEGROUP}\" group."
- if yesno "Would you like me to create it" "YES"; then
- /usr/sbin/pw groupadd "${PRELUDEGROUP}" -g "${PRELUDEGID}" -h - || \
- /usr/sbin/pw groupadd "${PRELUDEGROUP}" -h - || exit
- echo "Done."
- else
- echo "Please create the \"${PRELUDEGROUP}\" group manually and try again."
- exit 1
- fi
- fi
-
- if /usr/sbin/pw user show "${PRELUDEUSER}" 2>&1 >/dev/null; then
- echo "You already have a \"${PRELUDEUSER}\" user, so I will use it."
- else
- echo "You need a \"${PRELUDEUSER}\" user."
- if yesno "Would you like me to create it" "YES"; then
- /usr/sbin/pw useradd "${PRELUDEUSER}" -u "${PRELUDEUID}" -g "${PRELUDEGROUP}" -h - -d "${PRELUDEDIR}" \
- -s /sbin/nologin -c "Prelude pseudo-user" || \
- /usr/sbin/pw useradd "${PRELUDEUSER}" -g "${PRELUDEGROUP}" -h - -d "${PRELUDEDIR}" \
- -s /sbin/nologin -c "Prelude pseudo-user" || exit
- else
- echo "Please create the \"${PRELUDEUSER}\" user manually and try again."
- exit 1
- fi
- fi
-fi