Lines 2-61
Link Here
|
2 |
# Whom: Jean-Baptiste Quenot <jb.quenot@caraldi.com> |
2 |
# Whom: Jean-Baptiste Quenot <jb.quenot@caraldi.com> |
3 |
# Date Created: 2003-09-29 14:17:14 |
3 |
# Date Created: 2003-09-29 14:17:14 |
4 |
# |
4 |
# |
5 |
# ex:ts=20:sw=20 |
|
|
6 |
# |
7 |
# $FreeBSD: ports/www/resin3/Makefile,v 1.6 2004/06/24 07:43:26 vs Exp $ |
5 |
# $FreeBSD: ports/www/resin3/Makefile,v 1.6 2004/06/24 07:43:26 vs Exp $ |
8 |
# |
6 |
# |
9 |
|
7 |
|
10 |
PORTNAME= resin |
8 |
PORTNAME= resin |
11 |
PORTVERSION= 3.0.8 |
9 |
PORTVERSION= 3.0.9 |
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, 3.x branch |
14 |
COMMENT= Resin, a Java-based Application Server, 3.x branch |
17 |
|
15 |
|
18 |
USE_JAVA= 1.2+ |
16 |
USE_JAVA= 1.2+ |
19 |
HAS_CONFIGURE= yes |
17 |
HAS_CONFIGURE= yes |
20 |
USE_GMAKE= yes |
18 |
USE_GMAKE= yes |
21 |
USE_PERL5= yes |
19 |
USE_PERL5= yes |
22 |
USE_REINPLACE= yes |
20 |
USE_REINPLACE= yes |
23 |
|
21 |
|
24 |
# Customizable settings |
22 |
# Customizable settings |
25 |
RUNASUSER?= www |
23 |
RUNASUSER?= www |
26 |
RUNASUID?= 80 |
24 |
RUNASUID?= 80 |
27 |
GROUP?= ${RUNASUSER} |
25 |
GROUP?= ${RUNASUSER} |
28 |
GID?= ${RUNASUID} |
26 |
GID?= ${RUNASUID} |
29 |
PORT?= 8080 |
27 |
PORT?= 8080 |
30 |
# Do not use PKGNAMESUFFIX here because version info is already in PORTVERSION |
28 |
# Do not use PKGNAMESUFFIX here because version info is already in PORTVERSION |
31 |
# If we used PKGNAMESUFFIX, the package name would be resin2-2.1.11 |
29 |
# If we used PKGNAMESUFFIX, the package name would be resin2-2.1.11 |
32 |
APP_NAME_SUFFIX= ${PORTVERSION:C/\..*$//} |
30 |
APP_NAME_SUFFIX= ${PORTVERSION:C/\..*$//} |
33 |
APP_NAME?= ${PORTNAME}${APP_NAME_SUFFIX} |
31 |
APP_NAME?= ${PORTNAME}${APP_NAME_SUFFIX} |
34 |
LATEST_LINK= ${APP_NAME} |
32 |
LATEST_LINK= ${APP_NAME} |
35 |
APP_HOME?= ${PREFIX}/${APP_NAME} |
33 |
APP_HOME?= ${PREFIX}/${APP_NAME} |
36 |
WITH_APACHE?= NO |
34 |
WITH_APACHE?= NO |
37 |
WITH_APACHE2?= NO |
35 |
WITH_APACHE2?= NO |
38 |
PID_FILE?= /var/run/${APP_NAME}.pid |
36 |
PID_FILE?= /var/run/${APP_NAME}.pid |
39 |
|
37 |
|
40 |
# Other settings |
38 |
# Other settings |
41 |
APXS?= ${LOCALBASE}/sbin/apxs |
39 |
APXS?= ${LOCALBASE}/sbin/apxs |
42 |
MOD_DIR?= `${APXS} -q LIBEXECDIR` |
40 |
MOD_DIR?= `${APXS} -q LIBEXECDIR` |
43 |
PKGINSTALL= ${WRKDIR}/pkg-install |
41 |
PKGINSTALL= ${WRKDIR}/pkg-install |
44 |
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall |
42 |
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall |
45 |
PKGMESSAGE= ${WRKDIR}/pkg-message |
43 |
PKGMESSAGE= ${WRKDIR}/pkg-message |
46 |
# We need WRKSRC and WRKDIR right now so define them "manually" |
44 |
# We need WRKSRC and WRKDIR right now so define them "manually" |
47 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
45 |
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} |
48 |
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work |
46 |
WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work |
49 |
REINPLACE_FILES= ${WRKSRC}/src/c/plugin/apache/Makefile.in \ |
47 |
REINPLACE_FILES= ${WRKSRC}/src/c/apache1/Makefile.in \ |
50 |
${WRKSRC}/src/c/plugin/apache2/Makefile.in |
48 |
${WRKSRC}/src/c/apache2/Makefile.in |
51 |
REPLACE_FILES= ${FILESDIR}/pkg-install \ |
49 |
REPLACE_FILES= ${FILESDIR}/pkg-install \ |
52 |
${FILESDIR}/pkg-deinstall \ |
50 |
${FILESDIR}/pkg-deinstall \ |
53 |
${FILESDIR}/install.sh \ |
51 |
${FILESDIR}/install.sh \ |
54 |
${FILESDIR}/pkg-message.in \ |
52 |
${FILESDIR}/pkg-message.in \ |
55 |
${WRKSRC}/conf/resin.conf \ |
53 |
${WRKSRC}/conf/resin.conf \ |
56 |
${WRKSRC}/bin/wrapper.pl.in \ |
54 |
${WRKSRC}/bin/wrapper.pl.in \ |
57 |
${FILESDIR}/resin.sh.in |
55 |
${FILESDIR}/resin.sh.in |
58 |
COPYDIRS= doc lib libexec webapps |
56 |
COPYDIRS= lib webapps |
59 |
|
57 |
|
60 |
.include <bsd.port.pre.mk> |
58 |
.include <bsd.port.pre.mk> |
61 |
|
59 |
|
Lines 67-156
Link Here
|
67 |
# |
65 |
# |
68 |
# Apache 1.3 |
66 |
# Apache 1.3 |
69 |
# |
67 |
# |
70 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache13 |
68 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache13 |
71 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
69 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
72 |
PLIST_SUB+= MOD_DIR=libexec/apache |
70 |
PLIST_SUB+= MOD_DIR=libexec/apache |
73 |
# Allow apxs invocations |
71 |
# Allow apxs invocations |
74 |
PLIST_SUB+= APACHE="" |
72 |
PLIST_SUB+= APACHE="" |
75 |
.elif defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) |
73 |
.elif defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) |
76 |
# |
74 |
# |
77 |
# Apache 2 |
75 |
# Apache 2 |
78 |
# |
76 |
# |
79 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache2 |
77 |
BUILD_DEPENDS+= ${APXS}:${PORTSDIR}/www/apache2 |
80 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
78 |
CONFIGURE_ARGS+= --with-apxs=${APXS} |
81 |
PLIST_SUB+= MOD_DIR=libexec/apache2 |
79 |
PLIST_SUB+= MOD_DIR=libexec/apache2 |
82 |
# Allow apxs invocations |
80 |
# Allow apxs invocations |
83 |
PLIST_SUB+= APACHE="" |
81 |
PLIST_SUB+= APACHE="" |
84 |
.else |
82 |
.else |
85 |
PLIST_SUB+= MOD_DIR="@comment " |
83 |
PLIST_SUB+= MOD_DIR="@comment " |
86 |
# Prevent apxs invocations |
84 |
# Prevent apxs invocations |
87 |
PLIST_SUB+= APACHE="@comment " |
85 |
PLIST_SUB+= APACHE="@comment " |
88 |
.endif |
86 |
.endif |
89 |
|
87 |
|
90 |
PLIST_SUB+= APP_NAME=${APP_NAME} |
88 |
PLIST_SUB+= APP_NAME=${APP_NAME} |
91 |
PLIST_SUB+= APXS=${APXS} |
89 |
PLIST_SUB+= APXS=${APXS} |
92 |
|
90 |
|
93 |
.if ((defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES)) \ |
91 |
.if ((defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES)) \ |
94 |
|| (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES))) |
92 |
|| (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES))) |
95 |
LIBEXECDIR!= ${APXS} -q LIBEXECDIR |
93 |
LIBEXECDIR!= ${APXS} -q LIBEXECDIR |
96 |
SYSCONFDIR!= ${APXS} -q SYSCONFDIR |
94 |
SYSCONFDIR!= ${APXS} -q SYSCONFDIR |
97 |
CONFIGURE_ARGS+= --with-apache-libexec=${LIBEXECDIR} |
95 |
CONFIGURE_ARGS+= --with-apache-libexec=${LIBEXECDIR} |
98 |
CONFIGURE_ARGS+= --with-apache-conf=${SYSCONFDIR} |
96 |
CONFIGURE_ARGS+= --with-apache-conf=${SYSCONFDIR} |
99 |
.endif |
97 |
.endif |
100 |
|
98 |
|
101 |
SUBSTITUTIONS= -e "s|%%APP_HOME%%|${APP_HOME}|g" \ |
99 |
SUBSTITUTIONS= -e "s|%%APP_HOME%%|${APP_HOME}|g" \ |
102 |
-e "s|%%APP_NAME%%|${APP_NAME}|g" \ |
100 |
-e "s|%%APP_NAME%%|${APP_NAME}|g" \ |
103 |
-e "s|%%APXS%%|${APXS}|g" \ |
101 |
-e "s|%%APXS%%|${APXS}|g" \ |
104 |
-e "s|%%COPYDIRS%%|${COPYDIRS}|g" \ |
102 |
-e "s|%%COPYDIRS%%|${COPYDIRS}|g" \ |
105 |
-e "s|%%FILESDIR%%|${FILESDIR}|g" \ |
103 |
-e "s|%%FILESDIR%%|${FILESDIR}|g" \ |
106 |
-e "s|%%GROUP%%|${GROUP}|g" \ |
104 |
-e "s|%%GROUP%%|${GROUP}|g" \ |
107 |
-e "s|%%GID%%|${GID}|g" \ |
105 |
-e "s|%%GID%%|${GID}|g" \ |
108 |
-e "s|%%JAVA_HOME%%|${JAVA_HOME}|g" \ |
106 |
-e "s|%%JAVA_HOME%%|${JAVA_HOME}|g" \ |
109 |
-e "s|%%PERL%%|${PERL}|g" \ |
107 |
-e "s|%%PERL%%|${PERL}|g" \ |
110 |
-e "s|%%PID_FILE%%|${PID_FILE}|g" \ |
108 |
-e "s|%%PID_FILE%%|${PID_FILE}|g" \ |
111 |
-e "s|%%PORT%%|${PORT}|g" \ |
109 |
-e "s|%%PORT%%|${PORT}|g" \ |
112 |
-e "s|%%PORTNAME%%|${PORTNAME}|g" \ |
110 |
-e "s|%%PORTNAME%%|${PORTNAME}|g" \ |
113 |
-e "s|%%PREFIX%%|${PREFIX}|g" \ |
111 |
-e "s|%%PREFIX%%|${PREFIX}|g" \ |
114 |
-e "s|%%RUNASUID%%|${RUNASUID}|g" \ |
112 |
-e "s|%%RUNASUID%%|${RUNASUID}|g" \ |
115 |
-e "s|%%RUNASUSER%%|${RUNASUSER}|g" \ |
113 |
-e "s|%%RUNASUSER%%|${RUNASUSER}|g" \ |
116 |
-e "s|%%WRKDIR%%|${WRKDIR}|g" \ |
114 |
-e "s|%%WRKDIR%%|${WRKDIR}|g" \ |
117 |
-e "s|%%WRKSRC%%|${WRKSRC}|g" |
115 |
-e "s|%%WRKSRC%%|${WRKSRC}|g" |
118 |
|
116 |
|
119 |
post-patch: |
117 |
post-patch: |
120 |
.for FILE in ${REINPLACE_FILES} |
118 |
.for FILE in ${REINPLACE_FILES} |
121 |
@${REINPLACE_CMD} ${SUBSTITUTIONS} ${FILE} |
119 |
@${REINPLACE_CMD} ${SUBSTITUTIONS} ${FILE} |
122 |
.endfor |
120 |
.endfor |
123 |
.for FILE in ${REPLACE_FILES} |
121 |
.for FILE in ${REPLACE_FILES} |
124 |
@${SED} ${SUBSTITUTIONS} ${FILE} > ${WRKDIR}/`basename ${FILE}` |
122 |
@${SED} ${SUBSTITUTIONS} ${FILE} > ${WRKDIR}/`basename ${FILE}` |
125 |
.endfor |
123 |
.endfor |
126 |
@fmt -w 80 < ${WRKDIR}/pkg-message.in > ${PKGMESSAGE} |
124 |
@fmt -w 80 < ${WRKDIR}/pkg-message.in > ${PKGMESSAGE} |
127 |
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) || \ |
125 |
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES) || \ |
128 |
defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES)) |
126 |
defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES)) |
129 |
@${ECHO_CMD} >> ${PKGMESSAGE} |
127 |
@${ECHO_CMD} >> ${PKGMESSAGE} |
130 |
@${ECHO_CMD} The Resin Apache module mod_caucho has been activated \ |
128 |
@${ECHO_CMD} The Resin Apache module mod_caucho has been activated \ |
131 |
in the Apache configuration file, where you should also \ |
129 |
in the Apache configuration file, where you should also \ |
132 |
add a line to specify the location of the Resin configuration \ |
130 |
add a line to specify the location of the Resin configuration \ |
133 |
server, for example: | fmt -w 80 >> ${PKGMESSAGE} |
131 |
server, for example: | fmt -w 80 >> ${PKGMESSAGE} |
134 |
@${ECHO_CMD} >> ${PKGMESSAGE} |
132 |
@${ECHO_CMD} >> ${PKGMESSAGE} |
135 |
@${ECHO_CMD} "<IfModule mod_caucho.c>" >> ${PKGMESSAGE} |
133 |
@${ECHO_CMD} "<IfModule mod_caucho.c>" >> ${PKGMESSAGE} |
136 |
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES)) |
134 |
.if (defined(WITH_APACHE2) && (${WITH_APACHE2} == yes || ${WITH_APACHE2} == YES)) |
137 |
@${ECHO_CMD} " ResinConfigServer localhost 6802" >> ${PKGMESSAGE} |
135 |
@${ECHO_CMD} " ResinConfigServer localhost 6802" >> ${PKGMESSAGE} |
138 |
.endif |
136 |
.endif |
139 |
.if (defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES)) |
137 |
.if (defined(WITH_APACHE) && (${WITH_APACHE} == yes || ${WITH_APACHE} == YES)) |
140 |
@${ECHO_CMD} " CauchoConfigFile ${PREFIX}/etc/${APP_NAME}/resin.xml" >> ${PKGMESSAGE} |
138 |
@${ECHO_CMD} " CauchoConfigFile ${PREFIX}/etc/${APP_NAME}/resin.xml" >> ${PKGMESSAGE} |
141 |
.endif |
139 |
.endif |
142 |
@${ECHO_CMD} "</IfModule>" >> ${PKGMESSAGE} |
140 |
@${ECHO_CMD} "</IfModule>" >> ${PKGMESSAGE} |
143 |
.endif |
141 |
.endif |
144 |
@${MV} ${WRKDIR}/wrapper.pl.in ${WRKSRC}/bin/wrapper.pl.in |
142 |
@${MV} ${WRKDIR}/wrapper.pl.in ${WRKSRC}/bin/wrapper.pl.in |
145 |
|
143 |
|
146 |
# Resin does not handle installation, so proceed now |
144 |
# Resin does not handle installation, so proceed now |
147 |
post-install: |
145 |
post-install: |
148 |
@${SH} ${WRKDIR}/install.sh |
146 |
@${SH} ${WRKDIR}/install.sh |
149 |
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
147 |
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL |
150 |
@${ECHO_CMD} |
148 |
@${ECHO_CMD} |
151 |
@${ECHO_CMD} "********************************************************************************" |
149 |
@${ECHO_CMD} "********************************************************************************" |
152 |
@${CAT} ${PKGMESSAGE} |
150 |
@${CAT} ${PKGMESSAGE} |
153 |
@${ECHO_CMD} "********************************************************************************" |
151 |
@${ECHO_CMD} "********************************************************************************" |
154 |
@${ECHO_CMD} |
152 |
@${ECHO_CMD} |
155 |
|
153 |
|
156 |
.include <bsd.port.post.mk> |
154 |
.include <bsd.port.post.mk> |