blob: 4941f59c0ed1ab7fcc4fdd1de5d6f5c5b6c12b47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# $NetBSD: wbm.mk,v 1.2 2006/05/16 06:13:39 jlam Exp $
#
# Makefile fragment for Webmin modules
PKGNAME?= wbm-${DISTNAME}
CATEGORIES+= sysutils www
MASTER_SITES?= http://download.webmin.com/download/modules/
EXTRACT_SUFX?= .wbm.gz
EXTRACT_OPTS+= -f tar
MAINTAINER?= pkgsrc-users@NetBSD.org
USE_TOOLS+= perl:run
DEPENDS+= webmin>=1.270:../../sysutils/webmin
EVAL_PREFIX+= PREFIX.webmin=webmin
WEBMIN_DIR= ${PREFIX.webmin}/share/webmin
WEBMIN_EGDIR= ${PREFIX.webmin}/share/examples/webmin
WBM_DIR= ${PREFIX}/share/webmin
WBM_EGDIR= ${PREFIX}/share/examples/webmin
PKG_SYSCONFSUBDIR= webmin
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/${WBMNAME} \
${ROOT_USER} ${ROOT_GROUP} 0700
CONF_FILES_PERMS+= ${WBM_EGDIR}/${WBMNAME}/config \
${PKG_SYSCONFDIR}/${WBMNAME}/config \
${ROOT_USER} ${ROOT_GROUP} 0600
# WBMNAME is the name of the module directory
WBMNAME?= ${DISTNAME}
WEBMIN_OSTYPE_cmd= ${AWK} '/^os_type=/ {sub("os_type=",""); print}' \
${WEBMIN_EGDIR}/config
WEBMIN_OSVERSION_cmd= ${AWK} '/^os_version=/ {sub("os_version=",""); print}' \
${WEBMIN_EGDIR}/config
.PHONY: wbm-configure wbm-build wbm-install
wbm-configure:
${FIND} ${WRKSRC} -name "*.orig" -print | ${XARGS} ${RM} -f
wbm-build:
${FIND} ${WRKSRC} -name '*.cgi' -print -o -name '*.pl' -print | \
${PERL5} ${WEBMIN_DIR}/perlpath.pl ${PERL5} -
wbm-install:
${CP} -R ${WRKSRC} ${WBM_DIR}/.
${PERL5} ${WEBMIN_DIR}/copyconfig.pl \
${WEBMIN_OSTYPE_cmd:sh:Q} ${WEBMIN_OSVERSION_cmd:sh:Q} \
${WBM_DIR}/${WBM_NAME} ${WBM_EGDIR} ${WBMNAME}
do-configure: wbm-configure
do-build: wbm-build
do-install: wbm-install
|