summaryrefslogtreecommitdiff
path: root/www/iasp/Makefile
blob: e4d6ed138aa360c2c62ad1c59750cf6300c1e291 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
# $NetBSD: Makefile,v 1.9 2005/08/19 18:12:39 jlam Exp $

.include "../iasp/Makefile.common"

PKGNAME=	iasp-${IASP_VERSION}
PKGREVISION=	2
COMMENT=	Instant ASP: Java implementation of Active Server Pages

USE_TOOLS+=	gtar

SCRIPTS_ENV+=	CAT=${CAT:Q}
SCRIPTS_ENV+=	CHMOD=${CHMOD:Q}
SCRIPTS_ENV+=	ECHO=${ECHO:Q}
SCRIPTS_ENV+=	SED=${SED:Q}
SCRIPTS_ENV+=	SH=${SH:Q}
SCRIPTS_ENV+=	IASP=${IASP_DESTDIR}
FILES_SUBST=	IASP=${IASP_DESTDIR}
PLIST_SUBST=	IASP=${IASP_DESTDIR:S/^${PREFIX}\///}

IASP_USER?=	${APACHE_USER}
IASP_GROUP?=	${APACHE_GROUP}
BUILD_DEFS+=	IASP_USER IASP_GROUP
FILES_SUBST+=	IASP_USER=${IASP_USER}
FILES_SUBST+=	IASP_GROUP=${IASP_GROUP}

PKG_USERS=	${IASP_USER}:${IASP_GROUP}
PKG_GROUPS=	${IASP_GROUP}

WRKSRC=		${WRKDIR}/${IASP_DIR}
USE_PKGINSTALL=	yes
OWN_DIRS=	${IASP_DESTDIR}
OWN_DIRS_PERMS=	${IASP_DESTDIR}/logs ${IASP_USER} ${IASP_GROUP} 0750
CONFDIR=	${IASP_DESTDIR}/properties
CFILES=		cdonts.properties	dbserver.properties
CFILES+=	ejb.properties		loadbalance.properties
CFILES+=	msmq.properties		rules.properties
CFILES+=	security.properties	server.properties
CFILES+=	servlets.properties
CONF_FILES=	# empty
.for FILE in ${CFILES}
CONF_FILES+=	${CONFDIR}/${FILE}.default ${CONFDIR}/${FILE}
.endfor
CONF_FILES+=	/dev/null ${IASP_DESTDIR}/properties/license
RCD_SCRIPTS=	iasp iasp_admin

post-extract:
	cd ${WRKDIR}; ${GTAR} -xf ${IASP_TARFILE}
	cd ${WRKSRC}; ${RM} -rf bin logs
	cd ${WRKSRC}; ${RM} -f properties/license
	cd ${WRKSRC}; for file in properties/*.properties; do		\
		${MV} -f $$file $$file.default;				\
	done

do-build:
	@${SETENV} ${SCRIPTS_ENV} ${SH} ${FILESDIR}/gen-scripts.sh
	${MKDIR} ${WRKSRC}/WEB-INF
	${CP} ${FILESDIR}/web.xml ${WRKSRC}/WEB-INF
	@${SED} ${FILES_SUBST_SED} ${FILESDIR}/mod_iasp.conf		\
		> ${WRKSRC}/mod_iasp.conf

do-install:
	${MKDIR} ${IASP_DESTDIR:H}
	cd ${WRKDIR}; ${CP} -R ${IASP_DIR} ${IASP_DESTDIR:H}

.include "../../mk/java-vm.mk"
.include "../../mk/bsd.pkg.mk"