mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-22 04:17:44 +00:00
- switch to USERS/GROUPS
- while here remove MD5 - bump port revision
This commit is contained in:
parent
f8261fbd8b
commit
575fdd36d6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=275227
@ -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,27 +26,16 @@ 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
|
||||
|
||||
PLIST_SUB= PRELUDEUSER=${USERS} \
|
||||
PRELUDEGROUP=${GROUPS}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
PLIST_SUB+= PRELUDEDIR=${PRELUDEDIR} \
|
||||
PRELUDEUSER=${PRELUDEUSER} \
|
||||
PRELUDEGROUP=${PRELUDEGROUP}
|
||||
|
||||
SUB_FILES= pkg-install \
|
||||
pkg-deinstall
|
||||
|
||||
SUB_LIST= PREFIX=${PREFIX} \
|
||||
${PLIST_SUB}
|
||||
|
||||
.if defined(WITHOUT_XML)
|
||||
PLIST_SUB+= WITH_XML="@comment "
|
||||
CONFIGURE_ARGS+= --disable-xmltest --without-xml
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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
|
Loading…
Reference in New Issue
Block a user