1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

- Update to 3.9.1 [1]

- While at it, simplify the installation and avoid @unexec hell

PR:		186585 [1]
Submitted by:	"Zane C.B-H." <vvelox@vvelox.net>
This commit is contained in:
Pietro Cerutti 2014-02-11 10:14:35 +00:00
parent 3b45ce96c1
commit 4ff82fcbfa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=343730
5 changed files with 53 additions and 66 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= openfire
PORTVERSION= 3.8.2
PORTVERSION= 3.9.1
PORTEPOCH= 1
CATEGORIES= net-im java
MASTER_SITES= http://download.igniterealtime.org/openfire/
@ -16,13 +16,14 @@ LICENSE= APACHE20
RUN_DEPENDS= classpath:${PORTSDIR}/java/javavmwrapper \
${JAVAJARDIR}/slf4j-api.jar:${PORTSDIR}/devel/slf4j
OPTIONS_DEFINE= PLUGINS
OPTIONS_DEFINE= DOCS PLUGINS
OPTIONS_DEFAULT=PLUGINS
PLUGINS_DESC= Install bundled plugins
USES= dos2unix
DOS2UNIX_FILES= src/java/org/jivesoftware/openfire/server/ServerDialback.java
USE_ZIP= yes
USE_LDCONFIG= yes
USE_DOS2UNIX= src/java/org/jivesoftware/openfire/server/ServerDialback.java
USE_ANT= yes
USE_JAVA= yes
JAVA_VERSION= 1.6+
@ -31,6 +32,7 @@ CONFLICTS= wildfire-[0-9]*
ALL_TARGET= openfire
USE_RC_SUBR= openfire
SUB_FILES+= pkg-message
WRKSRC= ${WRKDIR}/${PORTNAME}_src
BUILD_WRKSRC= ${WRKSRC}/build
@ -41,8 +43,9 @@ VARLOG= /var/log/openfire
VARDB= /var/db/openfire
USERS= openfire
GROUPS= ${USERS}
PLIST_SUB+= VARLOG=${VARLOG} \
VARDB=${VARDB}
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPLUGINS}
@ -58,67 +61,44 @@ post-patch:
./src/plugins/jingleNodes/src/i18n/jinglenodes_i18n.properties)
do-install:
${MKDIR} ${DATADIR}/lib
${MKDIR} ${VARLOG}
${MKDIR} ${VARDB}
@${MKDIR} ${STAGEDIR}${DATADIR}/lib
@${MKDIR} ${STAGEDIR}${VARLOG}
@${MKDIR} ${STAGEDIR}${VARDB}
@${MKDIR} ${STAGEDIR}${ETCDIR}
(cd ${INSTALL_WRKSRC}/lib && ${INSTALL} -m 744 *.jar ${DATADIR}/lib)
(cd ${INSTALL_WRKSRC}/lib && ${INSTALL} -m 744 log4j.xml ${DATADIR}/lib)
(cd ${INSTALL_WRKSRC}/lib && ${INSTALL} -m 744 *.jar ${STAGEDIR}${DATADIR}/lib)
(cd ${INSTALL_WRKSRC}/lib && ${INSTALL} -m 744 log4j.xml ${STAGEDIR}${DATADIR}/lib)
(cd ${INSTALL_WRKSRC}/resources && ${FIND} . \! -path ./security\* \
| ${CPIO} -pvdmu -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}/resources)
| ${CPIO} -pvdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DATADIR}/resources)
# always install admin interface
(cd ${INSTALL_WRKSRC}/plugins/admin && ${FIND} . \
| ${CPIO} -pvdmu -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}/plugins/admin)
| ${CPIO} -pvdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DATADIR}/plugins/admin)
.if ${PORT_OPTIONS:MPLUGINS}
(cd ${INSTALL_WRKSRC}/plugins && ${FIND} . \
| ${CPIO} -pvdmu -R ${SHAREOWN}:${SHAREGRP} ${DATADIR}/plugins)
| ${CPIO} -pvdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DATADIR}/plugins)
.endif
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} \
LICENSE.html README.html changelog.html ${DOCSDIR})
${MKDIR} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} LICENSE.html README.html changelog.html \
${STAGEDIR}${DOCSDIR})
(cd ${WRKSRC}/documentation/docs && ${FIND} . \! -path ./javadoc\* \
| ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} > /dev/null 2>&1 )
| ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DOCSDIR} > /dev/null 2>&1 )
.endif
post-install:
${LN} -sf ${VARLOG} ${DATADIR}/logs
${LN} -sf ${VARDB} ${DATADIR}/embedded-db
${LN} -sf ${ETCDIR} ${DATADIR}/conf
${LN} -sf ${ETCDIR} ${DATADIR}/resources/security
${MKDIR} ${EXAMPLESDIR}
${LN} -sf ${VARLOG} ${STAGEDIR}${DATADIR}/logs
${LN} -sf ${VARDB} ${STAGEDIR}${DATADIR}/embedded-db
${LN} -sf ${ETCDIR} ${STAGEDIR}${DATADIR}/conf
${LN} -sf ${ETCDIR} ${STAGEDIR}${DATADIR}/resources/security
${INSTALL_DATA} ${INSTALL_WRKSRC}/conf/openfire.xml \
${EXAMPLESDIR}/openfire.xml
${STAGEDIR}${ETCDIR}/openfire.xml.sample
${INSTALL} -m 600 ${INSTALL_WRKSRC}/resources/security/truststore \
${EXAMPLESDIR}/truststore
${STAGEDIR}${ETCDIR}/truststore.sample
${INSTALL} -m 600 ${INSTALL_WRKSRC}/resources/security/keystore \
${EXAMPLESDIR}/keystore
@if [ ! -f ${ETCDIR}/openfire.xml ]; then \
${MKDIR} ${ETCDIR}; \
${INSTALL} -m 644 ${INSTALL_WRKSRC}/conf/openfire.xml \
${ETCDIR}/openfire.xml; \
fi
@if [ ! -f ${ETCDIR}/keystore ]; then \
${INSTALL} -m 600 ${INSTALL_WRKSRC}/resources/security/keystore \
${ETCDIR}/keystore; \
fi
@if [ ! -f ${ETCDIR}/truststore ]; then \
${INSTALL} -m 600 ${INSTALL_WRKSRC}/resources/security/truststore \
${ETCDIR}/truststore; \
fi
${CHOWN} -Rh ${USERS}:${GROUPS} ${ETCDIR}
${CHOWN} -Rh ${USERS}:${GROUPS} ${VARLOG}
${CHOWN} -Rh ${USERS}:${GROUPS} ${VARDB}
${CHOWN} -Rh ${USERS}:${GROUPS} ${DATADIR}
@${CAT} ${PKGMESSAGE}
${STAGEDIR}${ETCDIR}/keystore.sample
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (openfire_src_3_8_2.zip) = a72b9a492e84a71ae2d34ca8731ce6aa6b378b85a1e5b7e31223c00e2237d838
SIZE (openfire_src_3_8_2.zip) = 72348562
SHA256 (openfire_src_3_9_1.zip) = aa027461b1b895551ffcaadd4da03797847ac8c809955af8108ec677abbefaa1
SIZE (openfire_src_3_9_1.zip) = 126568710

View File

@ -0,0 +1,9 @@
To enable the openfire startup script please add
openfire_enable="YES" to your /etc/rc.conf file.
The following sample configuration files have been
placed in %%ETCDIR%%:
openfire.xml.sample
keystore.sample
truststore.sample

View File

@ -1,2 +0,0 @@
To enable the openfire startup script please add
openfire_enable="YES" to your /etc/rc.conf file.

View File

@ -1,25 +1,26 @@
@unexec if cmp -s %D/%%ETCDIR%%/openfire.xml %D/%%EXAMPLESDIR%%/openfire.xml; then rm -f %D/%%ETCDIR%%/openfire.xml; else echo If permanently deleting this package, %D/%%ETCDIR%%/openfire.xml must be removed manually; fi
@unexec if cmp -s %D/%%ETCDIR%%/keystore %D/%%EXAMPLESDIR%%/keystore; then rm -f %D/%%ETCDIR%%/keystore; else echo If permanently deleting this package, %D/%%ETCDIR%%/keystore must be removed manually; fi
@unexec if cmp -s %D/%%ETCDIR%%/truststore %D/%%EXAMPLESDIR%%/truststore; then rm -f %D/%%ETCDIR%%/truststore; else echo If permanently deleting this package, %D/%%ETCDIR%%/truststore must be removed manually; fi
%%EXAMPLESDIR%%/openfire.xml
%%EXAMPLESDIR%%/keystore
%%EXAMPLESDIR%%/truststore
@owner openfire
@group openfire
%%ETCDIR%%/openfire.xml.sample
%%ETCDIR%%/keystore.sample
%%ETCDIR%%/truststore.sample
%%DATADIR%%/lib/activation.jar
%%DATADIR%%/lib/bouncycastle.jar
%%DATADIR%%/lib/bcpg-jdk15on.jar
%%DATADIR%%/lib/bcpkix-jdk15on.jar
%%DATADIR%%/lib/bcprov-jdk15on.jar
%%DATADIR%%/lib/commons-el.jar
%%DATADIR%%/lib/hsqldb.jar
%%DATADIR%%/lib/jasper-compiler.jar
%%DATADIR%%/lib/jasper-runtime.jar
%%DATADIR%%/lib/jdic.jar
%%DATADIR%%/lib/jtds.jar
%%DATADIR%%/lib/log4j.xml
%%DATADIR%%/lib/mail.jar
%%DATADIR%%/lib/mysql.jar
%%DATADIR%%/lib/openfire.jar
%%DATADIR%%/lib/postgres.jar
%%DATADIR%%/lib/servlet.jar
%%DATADIR%%/lib/startup.jar
%%DATADIR%%/lib/slf4j-log4j12.jar
%%DATADIR%%/lib/log4j.xml
%%DATADIR%%/lib/startup.jar
%%DATADIR%%/conf
%%DATADIR%%/embedded-db
%%DATADIR%%/logs
@ -400,10 +401,9 @@
@dirrm %%DATADIR%%/plugins/admin/webapp/WEB-INF
@dirrm %%DATADIR%%/plugins/admin/webapp
@dirrm %%DATADIR%%/plugins/admin
%%PLUGINS%%@dirrm %%DATADIR%%/plugins
@dirrm %%DATADIR%%/plugins
@dirrm %%DATADIR%%/lib
@dirrm %%EXAMPLESDIR%%
@unexec rmdir %D/%%DATADIR%% 2> /dev/null
@unexec rmdir %D/%%ETCDIR%% 2> /dev/null || echo "If permanently deleting this package, %D/%%ETCDIR%% must be removed manually"
@unexec rmdir /var/db/openfire 2> /dev/null || echo "If permanently deleting this package, /var/db/openfire must be removed manually"
@unexec rmdir /var/log/openfire 2> /dev/null || echo "If permanently deleting this package, /var/log/openfire must be removed manually"
@dirrmtry %%DATADIR%%
@dirrmtry %%ETCDIR%%
@dirrmtry %%VARLOG%%
@dirrmtry %%VARDB%%