diff options
Diffstat (limited to 'sysutils/webmin/wbm.mk')
-rw-r--r-- | sysutils/webmin/wbm.mk | 65 |
1 files changed, 49 insertions, 16 deletions
diff --git a/sysutils/webmin/wbm.mk b/sysutils/webmin/wbm.mk index 3d23ca814aa..02b6212b097 100644 --- a/sysutils/webmin/wbm.mk +++ b/sysutils/webmin/wbm.mk @@ -1,17 +1,50 @@ -# $NetBSD: wbm.mk,v 1.5 2006/06/15 22:13:59 jlam Exp $ +# $NetBSD: wbm.mk,v 1.6 2007/04/21 05:22:57 obache Exp $ # # Makefile fragment for Webmin modules +# +# Then following variables may be set prior to including this file: +# +# WBM_NAME Module name. +# +# WBM_STD_MODULE if "YES", then this package provided as standard +# module. defaults to "YES". +# +# WBM_MOD_REV Updated revision number since the each release. +# Updated modules are taken from following URL: +# http://www.webmin.com/updates.html +# +# WBM_DEPEND_MODULES Depending webmin modules. +# -PKGNAME?= wbm-${DISTNAME} -CATEGORIES+= sysutils www -MASTER_SITES?= http://download.webmin.com/download/modules/ +.include "version.mk" + +WBM_STD_MODULE?=YES + +.if defined(WBM_MOD_REV) && !empty(WBM_MOD_REV) || !empty(WBM_STD_MODULE:M[Nn][Oo]) +PKGNAME?= wbm-${WBM_NAME}-${WBM_VERSION:S/0$/${WBM_MOD_REV}/} +DISTNAME?= ${WBM_NAME}-${WBM_VERSION}-${WBM_MOD_REV} +MASTER_SITES?= http://www.webmin.com/updates/ EXTRACT_SUFX?= .wbm.gz EXTRACT_OPTS+= -f tar +WRKSRC?= ${WRKDIR} +WBMSRC= ${WRKDIR}/${WBM_NAME} +.else +PKGNAME= wbm-${WBM_NAME}-${WBM_VERSION} +DISTNAME= webmin-${WBM_VERSION} +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=webadmin/} +WBMSRC= ${WRKSRC}/${WBM_NAME} +.endif +CATEGORIES+= sysutils www MAINTAINER?= pkgsrc-users@NetBSD.org +HOMEPAGE?= http://www.webmin.com/standard.html USE_TOOLS+= perl:run -DEPENDS+= webmin>=1.270:../../sysutils/webmin +DEPENDS+= webmin>=${WBM_VERSION}:../../sysutils/webmin + +.for m in ${WBM_DEPEND_MODULES} +DEPENDS+= wbm-${m}>=${WBM_VERSION}:../../sysutils/wbm-${m} +.endfor EVAL_PREFIX+= PREFIX.webmin=webmin WEBMIN_DIR= ${PREFIX.webmin}/share/webmin @@ -20,22 +53,22 @@ WEBMIN_VARDIR= ${VARBASE}/webmin WBM_DIR= ${PREFIX}/share/webmin WBM_EGDIR= ${PREFIX}/share/examples/webmin -WRKSRC?= ${WRKDIR}/${WBMNAME} PKG_SYSCONFSUBDIR= webmin -OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/${WBMNAME} \ +OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/${WBM_NAME} \ ${ROOT_USER} ${ROOT_GROUP} 0700 -CONF_FILES_PERMS+= ${WBM_EGDIR}/${WBMNAME}/config \ - ${PKG_SYSCONFDIR}/${WBMNAME}/config \ +CONF_FILES_PERMS+= ${WBM_EGDIR}/${WBM_NAME}/config \ + ${PKG_SYSCONFDIR}/${WBM_NAME}/config \ ${ROOT_USER} ${ROOT_GROUP} 0600 -FILES_SUBST+= WBMNAME=${WBMNAME:Q} +FILES_SUBST+= WBM_NAME=${WBM_NAME:Q} FILES_SUBST+= WEBMIN_DIR=${WEBMIN_DIR:Q} FILES_SUBST+= WEBMIN_VARDIR=${WEBMIN_VARDIR:Q} +BUILD_DEFS+= VARBASE DEINSTALL_TEMPLATES+= ${PKGSRCDIR}/sysutils/webmin/files/wbm-deinstall.tmpl -# WBMNAME is the name of the module directory -WBMNAME?= ${DISTNAME} +# WBM_NAME is the name of the module directory +WBM_NAME?= ${DISTNAME} WEBMIN_OSTYPE_cmd= ${AWK} '/^os_type=/ {sub("os_type=",""); print}' \ ${WEBMIN_EGDIR}/config WEBMIN_OSVERSION_cmd= ${AWK} '/^os_version=/ {sub("os_version=",""); print}' \ @@ -44,17 +77,17 @@ WEBMIN_OSVERSION_cmd= ${AWK} '/^os_version=/ {sub("os_version=",""); print}' \ .PHONY: wbm-configure wbm-build wbm-install wbm-configure: - ${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f + ${FIND} ${WBMSRC} -name "*.orig" -print | ${XARGS} ${RM} -f wbm-build: - ${FIND} ${WRKSRC} -name '*.cgi' -print -o -name '*.pl' -print | \ + ${FIND} ${WBMSRC} -name '*.cgi' -print -o -name '*.pl' -print | \ ${PERL5} ${WEBMIN_DIR}/perlpath.pl ${PERL5} - wbm-install: - ${CP} -R ${WRKSRC} ${WBM_DIR}/. + ${CP} -R ${WBMSRC} ${WBM_DIR}/. ${PERL5} ${WEBMIN_DIR}/copyconfig.pl \ ${WEBMIN_OSTYPE_cmd:sh:Q} ${WEBMIN_OSVERSION_cmd:sh:Q} \ - ${WBM_DIR}/${WBM_NAME} ${WBM_EGDIR} ${WBMNAME} + ${WBM_DIR} ${WBM_EGDIR} ${WBM_NAME} do-configure: wbm-configure do-build: wbm-build |