diff --git a/sysutils/usermin/Makefile b/sysutils/usermin/Makefile index 6c79aec57485..940cc64ce9dd 100644 --- a/sysutils/usermin/Makefile +++ b/sysutils/usermin/Makefile @@ -1,58 +1,59 @@ PORTNAME= usermin PORTVERSION= 2.510 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://www.webmin.com/uupdates/:up \ SF/webadmin/${PORTNAME}/${PORTVERSION}:sf DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:sf \ ${USERMIN_MODULES:S/gz$/gz:up/} EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= olgeni@FreeBSD.org COMMENT= Web-based interface for performing some user tasks WWW= http://www.usermin.com/ LICENSE= BSD3CLAUSE RUN_DEPENDS= p5-Authen-PAM>=0:security/p5-Authen-PAM \ p5-IO-Tty>=0:devel/p5-IO-Tty \ p5-Net-SSLeay>=0:security/p5-Net-SSLeay USES= cpe perl5 CPE_VENDOR= webmin USE_RC_SUBR= usermin NO_ARCH= yes NO_BUILD= yes SUB_FILES= pkg-message SUB_LIST= PERL=${PERL} USERMIN_MODULES= post-extract: @if [ "${USERMIN_MODULES}" != "" ]; then \ for usermin_module in ${USERMIN_MODULES}; do \ ${ECHO} "===> Unpacking updated module: $${usermin_module}"; \ ${TAR} --unlink -xzf ${DISTDIR}/$${usermin_module} -C ${WRKSRC}; \ done; \ fi post-patch: @${REINPLACE_CMD} -e "s=%%PREFIX%%=${PREFIX}=" ${WRKSRC}/setup.sh .for file in filter/config commands/config htaccess/config @${REINPLACE_CMD} -i '' -e 's|=/etc/webmin|=${PREFIX}/etc/webmin|' ${WRKSRC}/${file} .endfor @${FIND} ${WRKSRC} \( -type f -and \( -name config-freebsd\* -or -name config \) \) \ -exec ${REINPLACE_CMD} -e "s@/usr/local@${PREFIX}@g" {} \; \ -exec ${REINPLACE_CMD} -e "s@%%PREFIX%%@${PREFIX}@g" {} \; @${FIND} ${WRKSRC} \( -name "*.cgi" -or -name "*.pl" -or -name "*.sh" \) -exec \ ${REINPLACE_CMD} -e "s@%%PERL%%@${PERL}@g; s@#!/usr/bin/perl@#!${PERL}@; s@#!/usr/local/bin/perl@#!${PERL}@" {} \; @${FIND} ${WRKSRC} \( -name "*.orig" -or -name "*.bak" -or -name "*.pyc" \) -delete do-install: @${MKDIR} ${STAGEDIR}${PREFIX}/lib/usermin ${CP} -r ${WRKSRC}/* ${STAGEDIR}${PREFIX}/lib/usermin .include diff --git a/sysutils/usermin/files/patch-setup.sh b/sysutils/usermin/files/patch-setup.sh index af550b380f73..48deb27932d1 100644 --- a/sysutils/usermin/files/patch-setup.sh +++ b/sysutils/usermin/files/patch-setup.sh @@ -1,54 +1,81 @@ --- setup.sh.orig +++ setup.sh @@ -6,6 +6,13 @@ # Find install directory LANG= export LANG +nostart="yes" +nostop="yes" +nochown="yes" +nouninstall="yes" +noperlpath="yes" +atboot=0 + cd `dirname $0` if [ -x /bin/pwd ]; then wadir=`/bin/pwd` -@@ -93,12 +100,12 @@ +@@ -93,12 +100,13 @@ echo "Unless you want to run multiple versions of Usermin at the same time" echo "you can just accept the defaults." echo "" -printf "Config file directory [/etc/usermin]: " +printf "Config file directory [%%PREFIX%%/etc/usermin]: " if [ "$config_dir" = "" ]; then - read config_dir +- read config_dir ++ config_dir="%%PREFIX%%/etc/usermin" ++ echo "%%PREFIX%%/etc/usermin" fi if [ "$config_dir" = "" ]; then - config_dir=/etc/usermin + config_dir=%%PREFIX%%/etc/usermin fi abspath=`echo $config_dir | grep "^/"` if [ "$abspath" = "" ]; then -@@ -202,19 +209,19 @@ +@@ -202,19 +210,20 @@ else # Config directory exists .. make sure it is not in use ls $config_dir | grep -v rpmsave >/dev/null 2>&1 - if [ "$?" = "0" -a "$config_dir" != "/etc/usermin" ]; then + if [ "$?" = "0" -a "$config_dir" != "%%PREFIX%%/etc/usermin" ]; then echo "ERROR: Config directory $config_dir is not empty" echo "" exit 2 fi # Ask for log directory - printf "Log file directory [/var/usermin]: " + printf "Log file directory [/var/db/usermin]: " if [ "$var_dir" = "" ]; then - read var_dir +- read var_dir ++ var_dir="/var/db/usermin" ++ echo "/var/db/usermin" fi if [ "$var_dir" = "" ]; then - var_dir=/var/usermin + var_dir=/var/db/usermin fi abspath=`echo $var_dir | grep "^/"` if [ "$abspath" = "" ]; then +@@ -252,7 +261,8 @@ + if [ "$perl" = "" ]; then + if [ "$perldef" = "" ]; then + printf "Full path to perl: " +- read perl ++ perl="%%PERL%%" ++ echo "%%PERL%%" + if [ "$perl" = "" ]; then + echo "ERROR: No path entered!" + echo "" +@@ -260,10 +270,8 @@ + fi + else + printf "Full path to perl (default $perldef): " +- read perl +- if [ "$perl" = "" ]; then +- perl=$perldef +- fi ++ perl=$perldef ++ echo "$perldef" + fi + fi + echo ""