- drop tomcat55 as a dependency potential (approaching end of life shortly)

- move away from war installation, as this results in an unclean system on removal of software
- migrate to optionsNG (new options framework)

PR:		174265
Submitted by:	jgh@
Approved by:	maintainer timeout, root@cooltrainer.org ( 14 days)
This commit is contained in:
Jason Helfman 2012-12-20 05:48:05 +00:00
parent 6ca1c09aa4
commit 510cf718de
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=309290
2 changed files with 1449 additions and 18 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= subsonic
PORTVERSION= 4.7
PORTREVISION= 1
CATEGORIES= www java
MASTER_SITES= SF
DISTNAME= ${PORTNAME}-${PORTVERSION}-war
@ -13,33 +14,23 @@ COMMENT= Subsonic streaming media server
BUILD_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0:${PORTSDIR}/www/tomcat6
RUN_DEPENDS+= ${JAVAJARDIR}/servlet-api.jar:${PORTSDIR}/www/servlet-api
OPTIONS= TRANSCODING "Enable transcoding with FFmpeg and LAME" On
OPTIONS_DEFINE= TRANSCODING
TRANSCODING_DESC= Transcoding with FFmpeg and LAME
OPTIONS_DEFAULT= TRANSCODING
.include <bsd.port.options.mk>
.if defined(WITH_TRANSCODING)
.if ${PORT_OPTIONS:MTRANSCODING}
RUN_DEPENDS+= ffmpeg:${PORTSDIR}/multimedia/ffmpeg \
lame:${PORTSDIR}/audio/lame
.endif
#Subsonic does not currently run on Tomcat 7
SUB_FILES= pkg-message
.if exists(${LOCALBASE}/apache-tomcat-6.0/webapps)
WEBAPPDIR= ${PREFIX}/apache-tomcat-6.0/webapps
BUILD_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
RUN_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
SUB_LIST= TOMCATOPTS="tomcat60_java_opts"
.elif exists(${LOCALBASE}/tomcat5.5/webapps)
WEBAPPDIR= ${PREFIX}/tomcat5.5/webapps
BUILD_DEPENDS+= ${LOCALBASE}/tomcat5.5/bin/bootstrap.jar:${PORTSDIR}/www/tomcat55
RUN_DEPENDS+= ${LOCALBASE}/tomcat5.5/bin/bootstrap.jar:${PORTSDIR}/www/tomcat55
SUB_LIST= TOMCATOPTS="tomcat55_java_opts"
.else
WEBAPPDIR= ${PREFIX}/apache-tomcat-6.0/webapps
BUILD_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
RUN_DEPENDS+= ${LOCALBASE}/apache-tomcat-6.0/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
SUB_LIST= TOMCATOPTS="tomcat60_java_opts"
.endif
NO_BUILD= yes
USE_JAVA= yes
@ -50,7 +41,7 @@ GROUP= www
SUBSONIC_HOME= /var/subsonic
PLIST_SUB+= SUBSONIC_HOME="${SUBSONIC_HOME}"
.if defined(WITH_TRANSCODING)
.if ${PORT_OPTIONS:MTRANSCODING}
PLIST_SUB+= TRANSCODING=""
.else
PLIST_SUB+= TRANSCODING="@comment "
@ -58,13 +49,18 @@ PLIST_SUB+= TRANSCODING="@comment "
PLIST_SUB+= WEBAPPS=${WEBAPPDIR:S|^${PREFIX}/||}
post-extract:
@${MKDIR} ${WRKDIR}/${PORTDIRNAME}
@${TAR} xf ${WRKDIR}/${PORTNAME}.war -C ${WRKDIR}/${PORTDIRNAME}
do-install:
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.war ${WEBAPPDIR}
${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} ${WEBAPPDIR}/${PORTDIRNAME}
@cd ${WRKDIR}/${PORTDIRNAME} && ${COPYTREE_SHARE} \* ${WEBAPPDIR}/${PORTDIRNAME}
@${MKDIR} ${SUBSONIC_HOME}
@${CHOWN} ${USER}:${GROUP} ${SUBSONIC_HOME}
post-install:
.if defined(WITH_TRANSCODING)
.if ${PORT_OPTIONS:MTRANSCODING}
@${MKDIR} ${SUBSONIC_HOME}/transcode
@${LN} -sf ${PREFIX}/bin/ffmpeg ${SUBSONIC_HOME}/transcode/ffmpeg
@${LN} -sf ${PREFIX}/bin/lame ${SUBSONIC_HOME}/transcode/lame

File diff suppressed because it is too large Load diff