aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/webmin/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/webmin/Makefile')
-rw-r--r--sysutils/webmin/Makefile23
1 files changed, 11 insertions, 12 deletions
diff --git a/sysutils/webmin/Makefile b/sysutils/webmin/Makefile
index 0a735dc067c9..b3fd22a94d45 100644
--- a/sysutils/webmin/Makefile
+++ b/sysutils/webmin/Makefile
@@ -7,7 +7,7 @@
PORTNAME= webmin
PORTVERSION= 1.150
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= http://www.webmin.com/updates/ \
${MASTER_SITE_SOURCEFORGE}
@@ -23,7 +23,8 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Net/SSLeay.pm:${PORTSDIR}/security/p5-Net
NO_BUILD= yes
USE_PERL5= yes
-SCRIPTS_ENV+= WRKDIR="${WRKDIR}"
+USE_RC_SUBR= yes
+USE_REINPLACE= yes
WEBMIN_MODULES= fsdump-1.150-1.wbm.gz
@@ -36,7 +37,6 @@ post-extract:
${TAR} --unlink -xzf ${DISTDIR}/$${webmin_module} -C ${WRKSRC}; \
done; \
fi
- @${FIND} ${WRKSRC} -name "*.bak" | ${XARGS} ${RM}
post-patch:
@${CP} ${WRKDIR}/webmin-${PORTVERSION}/bind8/config-freebsd-3.0 \
@@ -56,6 +56,9 @@ post-patch:
usermin/config
@${PERL} -pi -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/${file}
.endfor
+ @${REINPLACE_CMD} -e "s=%%PREFIX%%=${PREFIX}=" ${WRKSRC}/setup.sh
+ @${FIND} ${WRKSRC} -name "*.cgi" -print \
+ | ${XARGS} ${REINPLACE_CMD} -e "s@/usr/local/bin/perl@${PERL}@"
@${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM}
@${FIND} ${WRKSRC} -name "*.bak" -print | ${XARGS} ${RM}
# we may have 2 levels of empty directories which cause the plist generation
@@ -66,8 +69,11 @@ post-patch:
do-install:
@${MKDIR} ${PREFIX}/lib/webmin
@${CP} -r ${WRKSRC}/* ${PREFIX}/lib/webmin
- @${CP} ${WRKDIR}/webmin.sh ${PREFIX}/etc/rc.d/webmin.sh-dist
- @${CHMOD} 554 ${PREFIX}/etc/rc.d/webmin.sh-dist
+ @${SED} -e "s=%%RC_SUBR%%=${RC_SUBR}=" \
+ -e "s=%%PREFIX%%=${PREFIX}=" \
+ -e "s=%%PERL5%%=${PERL}=" \
+ < ${FILESDIR}/webmin.sh.sample > ${PREFIX}/etc/rc.d/webmin.sh
+ @${CHMOD} 555 ${PREFIX}/etc/rc.d/webmin.sh
post-install:
@cd ${WRKSRC} ; ${FIND} * -type f -o -type l | ${SORT} | ${AWK} \
@@ -75,7 +81,6 @@ post-install:
@cd ${WRKSRC} ; ${FIND} * -type d | ${SORT} -r | ${AWK} \
'{ print "lib/webmin/" $$1 }' | ${SED} -e 's/^/@dirrm /g' \
>> ${WRKDIR}/PLIST.lib-webmin
-
@${ECHO_CMD} "r ${TMPPLIST}" > ${WRKDIR}/ex.script
@${ECHO_CMD} "/Insert PLIST.lib-webmin" >> ${WRKDIR}/ex.script
@${ECHO_CMD} "d" >> ${WRKDIR}/ex.script
@@ -83,12 +88,6 @@ post-install:
@${ECHO_CMD} "x!" >> ${WRKDIR}/ex.script
@${CP} -p ${TMPPLIST} ${TMPPLIST}.pre-lib-webmin
@cd ${WRKDIR} ; ex < ex.script
-# stop webmin if configured and enabled at startup
- @[ -n "${BATCH}" ] || ([ ! -d ${PREFIX}/etc/webmin ] || [ ! -x ${PREFIX}/etc/rc.d/webmin.sh ] || ${PREFIX}/etc/rc.d/webmin.sh stop > /dev/null)
-# upgrade configuration if etc/webmin exists
- @[ ! -d ${PREFIX}/etc/webmin ] || ${ECHO_CMD} | nostart=Y ${PREFIX}/lib/webmin/setup.sh
-# run interactive setup if not in BATCH mode and no configuration exists
- @[ -n "${BATCH}" ] || ([ -d ${PREFIX}/etc/webmin ] || nostart=Y ${PREFIX}/lib/webmin/setup.sh)
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>