blob: 6516b042a602809a3db762ee74eed9a0041d5ae5 (
plain) (
blame)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# New ports collection makefile for: Jetty
# Date created: 28 August 2000
# Whom: Stephane Legrand <stephane@freebsd-fr.org>
#
# $FreeBSD$
#
PORTNAME= jetty
DISTVERSION= 6.1.1
PORTREVISION= 1
CATEGORIES= www java
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= jbq@caraldi.com
COMMENT= Full-featured web server implemented entirely in java
USE_RC_SUBR= ${PORTNAME}
USE_ZIP= yes
USE_JAVA= yes
JAVA_VERSION= 1.4+
USE_PYTHON= 1.6+
PLIST= ${WRKDIR}/pkg-plist
PKGMESSAGE= ${WRKDIR}/pkg-message
APP_NAME= ${PORTNAME}
APP_HOME= ${PREFIX}/${PORTNAME}
PID_FILE?= ${APP_HOME}/${APP_NAME}.pid
RUNASUSER?= www
RUNASUID?= 80
GROUP?= www
GID?= 80
LOG_FILE?= ${APP_HOME}/${APP_NAME}.log
SUB_LIST= \
APP_HOME=${APP_HOME} \
APP_NAME=${APP_NAME} \
RC_SUBR=${RC_SUBR} \
JAVA_HOME=${JAVA_HOME} \
JAVA=${JAVA} \
PID_FILE=${PID_FILE} \
RUNASUSER=${RUNASUSER} \
RUNASUID=${RUNASUID} \
GROUP=${GROUP} \
GID=${GID} \
LOG_FILE=${LOG_FILE} \
PYTHON_CMD=${PYTHON_CMD}
SUB_FILES= \
pkg-install \
pkg-deinstall \
${APP_NAME}ctl \
${APP_NAME} \
message \
message-advanced
do-build:
post-build:
@${ECHO_MSG} "===> Building packing list"
@> ${PLIST}
@cd ${WRKSRC} && ${FIND} -H * -type f \
| ${EGREP} -v "^(bin/|bin$$)" | ${SED} -e "s|^|${PORTNAME}/|" >> ${PLIST}
@cd ${WRKSRC} && ${FIND} -H -d * -type d \
| ${EGREP} -v "^(bin/|bin$$)" | ${SED} -e "s|^|@dirrm ${PORTNAME}/|" >> ${PLIST}
@${ECHO} @dirrm ${PORTNAME} >> ${PLIST}
@${CAT} ${MASTERDIR}/pkg-plist >> ${PLIST}
pre-install:
@${FMT} -w80 ${WRKDIR}/message > ${PKGMESSAGE}
@${CAT} ${WRKDIR}/message-advanced >> ${PKGMESSAGE}
do-install:
@${ECHO_MSG} "===> Installing into ${APP_HOME}"
# Create user/group
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${MKDIR} ${APP_HOME}
@cd ${WRKSRC} && ${FIND} -H * | ${EGREP} -v "^(bin/|bin$$)" | ${CPIO} -pdmuL -R ${RUNASUSER}:${GROUP} ${APP_HOME}
@${CHOWN} ${RUNASUSER}:${GROUP} ${PREFIX}/${PORTNAME}
@${ECHO_MSG} "===> Installing into ${PREFIX}/sbin"
@${INSTALL_SCRIPT} ${WRKDIR}/${APP_NAME}ctl ${PREFIX}/sbin
@${ECHO_MSG} "===> Installing ${PREFIX}/etc/rc.d/${APP_NAME}"
@${INSTALL_SCRIPT} ${WRKDIR}/${APP_NAME} ${PREFIX}/etc/rc.d
post-install:
@${ECHO_CMD}
@${ECHO_CMD} "********************************************************************************"
@${CAT} ${PKGMESSAGE}
@${ECHO_CMD} "********************************************************************************"
@${ECHO_CMD}
.include <bsd.port.mk>
|