1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/mail/james/Makefile
Jason Unovitch 3647465a25 mail/james: security update 2.3.1 -> 2.3.2.1; while here fix all the things
- Add LICENSE and LICENSE_FILE
- Add NO_ARCH
- Fix PID_FILE using an undefined variable (resulting PID was /var/run/.pid)
- Fix .include lines post staging support
- Actually use the version number from PLIST_SUB in pkg-plist
- Overhaul rc script
  - Add PROVIDE/REQUIRE/KEYWORD to header
  - Remove "geronimo" references from when the port was originally copied
  - Remove %%JAMES_VERSION%% in rc variable names. Every port version bump
    in the past came with a POLA issue as james231_enable=YES would now
    have to be james2321_enable=YES. Provide a shim to translate the old
    variable names and provide a warning to update rc.conf syntax.
  - Match start routine to embedded start-up script (which enables stop
    command to work without a java.lang.IllegalThreadStateException)
  - Add working status routine
  - Standardize indentation

PR:		203461
Security:	CVE-2015-7611
Security:	be3069c9-67e7-11e5-9909-002590263bf5
MFH:		2015Q4
2015-10-04 21:26:09 +00:00

64 lines
1.7 KiB
Makefile

# Created by: Nemo Liu <nemoliu@FreeBSD.org>
# $FreeBSD$
PORTNAME= james
PORTVERSION= 2.3.2.1
CATEGORIES= mail java
MASTER_SITES= APACHE/${PORTNAME}/server/
DISTNAME= ${PORTNAME}-binary-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Java SMTP and POP3 Mail server and NNTP News server
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= cpe
CPE_VENDOR= apache
USE_JAVA= yes
JAVA_VERSION= 1.6+
NO_ARCH= yes
NO_BUILD= yes
USE_RC_SUBR= james
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
APP_HOME?= ${PREFIX}/${PKGBASE}${PORTVERSION}
PID_FILE= /var/run/${PORTNAME}.pid
PLIST_SUB+= T=${APP_HOME:S/^${PREFIX}\///}
SUB_LIST= JAVA_HOME=${JAVA_HOME} \
PID_FILE=${PID_FILE} \
JAMES_HOME=${APP_HOME}
pre-patch:
@${ECHO_MSG} "Installation settings:"
@${ECHO_MSG} " Destination directory: ${APP_HOME}"
@${ECHO_MSG} " Location of JDK: ${JAVA_HOME}"
@${ECHO_MSG} " Location of Java port: ${JAVA_PORT}"
post-patch:
@${ECHO_MSG} -n ">> Removing unneeded files..."
@${RM} -f `${FIND} ${WRKSRC} -name '*.bat'` `${FIND} ${WRKSRC} -name '*.orig'` `${FIND} ${WRKSRC} -name '*.exe'`
@${ECHO_MSG} " [ DONE ]"
do-install:
@${ECHO_MSG} -n ">> Creating destination directory..."
@${MKDIR} ${STAGEDIR}${APP_HOME}
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} ">> Copying files to destination directory..."
@${CP} -R ${WRKSRC}/* ${STAGEDIR}${APP_HOME}
@${MKDIR} ${STAGEDIR}${APP_HOME}/logs
@${MKDIR} ${STAGEDIR}${APP_HOME}/apps
@${ECHO_MSG} " [ DONE ]"
@${ECHO_MSG} -n ">> Creating symlink to tools.jar..."
@${LN} -sf ${JAVA_HOME}/lib/tools.jar ${STAGEDIR}${APP_HOME}/lib/tools.jar
@${ECHO_MSG} " [ DONE ]"
post-install:
@${ECHO_MSG} "${PORTNAME} ${PORTVERSION} has been installed in ${APP_HOME}."
.include <bsd.port.mk>