Lines 2-60
Link Here
|
2 |
# Whom: Jean-Baptiste Quenot <jb.quenot@caraldi.com> |
2 |
# Whom: Jean-Baptiste Quenot <jb.quenot@caraldi.com> |
3 |
# Date Created: 2002-07-15 15:00:43 |
3 |
# Date Created: 2002-07-15 15:00:43 |
4 |
# |
4 |
# |
5 |
# ex:ts=20:sw=20 |
|
|
6 |
# |
7 |
# $FreeBSD: ports/www/resin2/Makefile,v 1.4 2004/07/02 22:10:15 glewis Exp $ |
5 |
# $FreeBSD: ports/www/resin2/Makefile,v 1.4 2004/07/02 22:10:15 glewis Exp $ |
8 |
# |
6 |
# |
9 |
|
7 |
|
10 |
PORTNAME= resin |
8 |
PORTNAME= resin |
11 |
PORTVERSION= 2.1.14 |
9 |
PORTVERSION= 2.1.16 |
12 |
CATEGORIES= www java |
10 |
CATEGORIES= www java |
13 |
MASTER_SITES= http://www.caucho.com/download/ |
11 |
MASTER_SITES= http://www.caucho.com/download/ |
14 |
|
12 |
|
15 |
MAINTAINER= jb.quenot@caraldi.com |
13 |
MAINTAINER= jb.quenot@caraldi.com |
16 |
COMMENT= Resin, a Java-based Application Server, 2.x branch |
14 |
COMMENT= Resin, a Java-based Application Server, 2.x branch |
17 |
|
15 |
|
18 |
USE_JAVA= 1.2+ |
16 |
USE_JAVA= 1.2+ |
19 |
HAS_CONFIGURE= yes |
17 |
HAS_CONFIGURE= yes |
20 |
USE_PERL5= yes |
18 |
USE_PYTHON= yes |
21 |
USE_REINPLACE= yes |
19 |
USE_REINPLACE= yes |
22 |
|
20 |
|
23 |
# Customizable settings |
21 |
# Customizable settings |
24 |
RUNASUSER?= www |
22 |
RUNASUSER?= www |
25 |
RUNASUID?= 80 |
23 |
RUNASUID?= 80 |
26 |
GROUP?= ${RUNASUSER} |
24 |
GROUP?= ${RUNASUSER} |
27 |
GID?= ${RUNASUID} |
25 |
GID?= ${RUNASUID} |
28 |
PORT?= 8080 |
26 |
PORT?= 8080 |
29 |
# Do not use PKGNAMESUFFIX here because version info is already in PORTVERSION |
27 |
# Do not use PKGNAMESUFFIX here because version info is already in PORTVERSION |
30 |
# If we used PKGNAMESUFFIX, the package name would be resin2-2.1.11 |
28 |
# If we used PKGNAMESUFFIX, the package name would be resin2-2.1.11 |
31 |
APP_NAME_SUFFIX= ${PORTVERSION:C/\..*$//} |
29 |
APP_NAME_SUFFIX= ${PORTVERSION:C/\..*$//} |
32 |
APP_NAME?= ${PORTNAME}${APP_NAME_SUFFIX} |
30 |
APP_NAME?= ${PORTNAME}${APP_NAME_SUFFIX} |
33 |
LATEST_LINK= ${APP_NAME} |
31 |
LATEST_LINK= ${APP_NAME} |
34 |
APP_HOME?= ${PREFIX}/${APP_NAME} |
32 |
APP_HOME?= ${PREFIX}/${APP_NAME} |
35 |
WITH_APACHE?= NO |
33 |
WITH_APACHE?= NO |
36 |
WITH_APACHE2?= NO |
34 |
WITH_APACHE2?= NO |
37 |
PID_FILE?= /var/run/${APP_NAME}.pid |
35 |
PID_FILE?= ${APP_HOME}/${APP_NAME}.pid |
|
|
36 |
LOG_FILE?= ${APP_HOME}/${APP_NAME}.log |
38 |
|
37 |
|
39 |
# Other settings |
38 |
# Other settings |
40 |
APXS?= ${LOCALBASE}/sbin/apxs |
39 |
APXS?= ${LOCALBASE}/sbin/apxs |
41 |
MOD_DIR?= `${APXS} -q LIBEXECDIR` |
40 |
PKGINSTALL= ${WRKDIR}/pkg-install |
42 |
PKGINSTALL= ${WRKDIR}/pkg-install |
41 |
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall |
43 |
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall |
42 |
PKGMESSAGE= ${WRKDIR}/pkg-message |
44 |
PKGMESSAGE= ${WRKDIR}/pkg-message |
|
|
45 |
# We need WRKSRC and WRKDIR right now so define them "manually" |
43 |
# We need WRKSRC and WRKDIR right now so define them "manually" |
46 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
44 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
47 |
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work |
45 |
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work |
48 |
REINPLACE_FILES= ${WRKSRC}/src/c/plugin/apache/Makefile.in \ |
46 |
REINPLACE_FILES= ${WRKSRC}/src/c/plugin/apache/Makefile.in \ |
49 |
${WRKSRC}/src/c/plugin/apache2/Makefile.in |
47 |
${WRKSRC}/src/c/plugin/apache2/Makefile.in |
50 |
REPLACE_FILES= ${FILESDIR}/pkg-install \ |
48 |
REPLACE_FILES= ${FILESDIR}/pkg-install \ |
51 |
${FILESDIR}/pkg-deinstall \ |
49 |
${FILESDIR}/pkg-deinstall \ |
52 |
${FILESDIR}/install.sh \ |
50 |
${FILESDIR}/install.sh \ |
53 |
${FILESDIR}/pkg-message.in \ |
51 |
${FILESDIR}/pkg-message.in \ |
54 |
${WRKSRC}/conf/resin.conf \ |
52 |
${WRKSRC}/conf/resin.conf \ |
55 |
${WRKSRC}/bin/wrapper.pl.in \ |
53 |
${FILESDIR}/resinctl \ |
56 |
${FILESDIR}/resin.sh.in |
54 |
${FILESDIR}/resin.sh.in |
57 |
COPYDIRS= doc lib libexec xsl |
55 |
COPYDIRS= doc lib libexec xsl |
|
|
56 |
|
57 |
.include <bsd.port.pre.mk> |
58 |
|
58 |
|
59 |
# Pass JAVA_HOME as determined by bsd.java.mk |
59 |
# Pass JAVA_HOME as determined by bsd.java.mk |
60 |
CONFIGURE_ARGS+= --with-java-home=${JAVA_HOME} |
60 |
CONFIGURE_ARGS+= --with-java-home=${JAVA_HOME} |
Lines 64-111
Link Here
|
64 |
# |
64 |
# |
65 |
# Apache 1.3 |
65 |
# Apache 1.3 |
66 |
# |
66 |
# |
67 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache13 |
67 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache13 |
68 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
68 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
69 |
PLIST_SUB+= MOD_DIR=libexec/apache |
69 |
PLIST_SUB+= MOD_DIR=libexec/apache |
70 |
# Allow apxs invocations |
70 |
# Allow apxs invocations |
71 |
PLIST_SUB+= APACHE="" |
71 |
PLIST_SUB+= APACHE="" |
72 |
.elif defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) |
72 |
.elif defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) |
73 |
# |
73 |
# |
74 |
# Apache 2 |
74 |
# Apache 2 |
75 |
# |
75 |
# |
76 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache2 |
76 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache2 |
77 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
77 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
78 |
PLIST_SUB+= MOD_DIR=libexec/apache2 |
78 |
PLIST_SUB+= MOD_DIR=libexec/apache2 |
79 |
# Allow apxs invocations |
79 |
# Allow apxs invocations |
80 |
PLIST_SUB+= APACHE="" |
80 |
PLIST_SUB+= APACHE="" |
81 |
.else |
81 |
.else |
82 |
PLIST_SUB+= MOD_DIR="@comment " |
82 |
PLIST_SUB+= MOD_DIR="@comment " |
83 |
# Prevent apxs invocations |
83 |
# Prevent apxs invocations |
84 |
PLIST_SUB+= APACHE="@comment " |
84 |
PLIST_SUB+= APACHE="@comment " |
85 |
.endif |
85 |
.endif |
86 |
|
86 |
|
87 |
PLIST_SUB+= APP_NAME=${APP_NAME} |
87 |
PLIST_SUB+= APP_NAME=${APP_NAME} |
88 |
PLIST_SUB+= APXS=${APXS} |
88 |
PLIST_SUB+= APXS=${APXS} |
89 |
|
89 |
|
90 |
SUBSTITUTIONS= -e "s|%%APP_HOME%%|${APP_HOME}|g" \ |
90 |
SUBSTITUTIONS= -e "s|%%APP_HOME%%|${APP_HOME}|g" \ |
91 |
-e "s|%%APP_NAME%%|${APP_NAME}|g" \ |
91 |
-e "s|%%APP_NAME%%|${APP_NAME}|g" \ |
92 |
-e "s|%%APXS%%|${APXS}|g" \ |
92 |
-e "s|%%APXS%%|${APXS}|g" \ |
93 |
-e "s|%%COPYDIRS%%|${COPYDIRS}|g" \ |
93 |
-e "s|%%COPYDIRS%%|${COPYDIRS}|g" \ |
94 |
-e "s|%%FILESDIR%%|${FILESDIR}|g" \ |
94 |
-e "s|%%FILESDIR%%|${FILESDIR}|g" \ |
95 |
-e "s|%%GROUP%%|${GROUP}|g" \ |
95 |
-e "s|%%GROUP%%|${GROUP}|g" \ |
96 |
-e "s|%%GID%%|${GID}|g" \ |
96 |
-e "s|%%GID%%|${GID}|g" \ |
97 |
-e "s|%%JAVA_HOME%%|${JAVA_HOME}|g" \ |
97 |
-e "s|%%JAVA_HOME%%|${JAVA_HOME}|g" \ |
98 |
-e "s|%%PERL%%|${PERL}|g" \ |
98 |
-e "s|%%JAVA%%|${JAVA}|g" \ |
99 |
-e "s|%%PID_FILE%%|${PID_FILE}|g" \ |
99 |
-e "s|%%LOG_FILE%%|${LOG_FILE}|g" \ |
100 |
-e "s|%%PORT%%|${PORT}|g" \ |
100 |
-e "s|%%PYTHON_CMD%%|${PYTHON_CMD}|g" \ |
101 |
-e "s|%%PORTNAME%%|${PORTNAME}|g" \ |
101 |
-e "s|%%PID_FILE%%|${PID_FILE}|g" \ |
102 |
-e "s|%%PREFIX%%|${PREFIX}|g" \ |
102 |
-e "s|%%PORT%%|${PORT}|g" \ |
103 |
-e "s|%%RUNASUID%%|${RUNASUID}|g" \ |
103 |
-e "s|%%PORTNAME%%|${PORTNAME}|g" \ |
104 |
-e "s|%%RUNASUSER%%|${RUNASUSER}|g" \ |
104 |
-e "s|%%PREFIX%%|${PREFIX}|g" \ |
105 |
-e "s|%%WRKDIR%%|${WRKDIR}|g" \ |
105 |
-e "s|%%RUNASUID%%|${RUNASUID}|g" \ |
106 |
-e "s|%%WRKSRC%%|${WRKSRC}|g" |
106 |
-e "s|%%RUNASUSER%%|${RUNASUSER}|g" \ |
107 |
|
107 |
-e "s|%%WRKDIR%%|${WRKDIR}|g" \ |
108 |
.include <bsd.port.pre.mk> |
108 |
-e "s|%%WRKSRC%%|${WRKSRC}|g" |
109 |
|
109 |
|
110 |
post-patch: |
110 |
post-patch: |
111 |
.for FILE in ${REINPLACE_FILES} |
111 |
.for FILE in ${REINPLACE_FILES} |
Lines 127-137
Link Here
|
127 |
@${ECHO_CMD} " CauchoConfigFile ${PREFIX}/etc/${APP_NAME}.xml" >> ${PKGMESSAGE} |
127 |
@${ECHO_CMD} " CauchoConfigFile ${PREFIX}/etc/${APP_NAME}.xml" >> ${PKGMESSAGE} |
128 |
@${ECHO_CMD} "</IfModule>" >> ${PKGMESSAGE} |
128 |
@${ECHO_CMD} "</IfModule>" >> ${PKGMESSAGE} |
129 |
.endif |
129 |
.endif |
130 |
@${MV} ${WRKDIR}/wrapper.pl.in ${WRKSRC}/bin/wrapper.pl.in |
|
|
131 |
|
130 |
|
132 |
# Resin does not handle installation, so proceed now |
131 |
# Resin does not handle installation, so proceed now |
133 |
post-install: |
132 |
post-install: |
134 |
@${SH} ${WRKDIR}/install.sh |
133 |
@${SETENV} RUNASUSER=${RUNASUSER} GROUP=${GROUP} ${SH} ${WRKDIR}/install.sh |
135 |
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
134 |
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
136 |
@${ECHO_CMD} |
135 |
@${ECHO_CMD} |
137 |
@${ECHO_CMD} "********************************************************************************" |
136 |
@${ECHO_CMD} "********************************************************************************" |