Index: devel/zanata-platform/Makefile =================================================================== --- devel/zanata-platform/Makefile +++ devel/zanata-platform/Makefile @@ -0,0 +1,85 @@ +# $FreeBSD$ + +PORTNAME= zanata-platform +PORTVERSION= 4.6.2 +CATEGORIES= devel java +MASTER_SITES= https://github.com/zanata/zanata-platform/releases/download/platform-${PORTVERSION}/ \ + https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_JAVA_VERSION}/:database +DISTFILES= zanata-war-${PORTVERSION}.war \ + mysql-connector-java-${MYSQL_CONNECTOR_JAVA_VERSION}.jar:database +DIST_SUBDIR= ${PORTNAME} +EXTRACT_ONLY= + +MAINTAINER= dbaio@FreeBSD.org +COMMENT= Zanata is a web-based translation platform + +LICENSE= GPLv2 LGPL21+ +LICENSE_COMB= multi + +NO_ARCH= yes +NO_BUILD= yes + +# It's needed this specific version, databases/mysql-connector-java51 is +# currently with 5.1.47 version. +MYSQL_CONNECTOR_JAVA_VERSION= 5.1.26 + +SUB_FILES= pkg-message +SUB_LIST= APP_HOME=${APP_HOME} \ + WILDFLYV=${APP_HOME:S;${PREFIX}/;;} + +PLIST_SUB= APP_HOME=${APP_HOME} + +OPTIONS_DEFINE= CLAMAV + +OPTIONS_SINGLE= WF +OPTIONS_SINGLE_WF= WILDFLY10 WILDFLY11 WILDFLY12 WILDFLY13 WILDFLY14 \ + WILDFLY15 WILDFLY16 WILDFLY90 +OPTIONS_DEFAULT= WILDFLY10 + +CLAMAV_DESC= Clam AntiVirus +CLAMAV_RUN_DEPENDS= clamav>=0:security/clamav + +WILDFLY10_DESC= WildFly version 10.0 +WILDFLY10_VARS= APP_HOME=${PREFIX}/wildfly10 +WILDFLY10_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly10 + +WILDFLY11_DESC= WildFly version 11.0 +WILDFLY11_VARS= APP_HOME=${PREFIX}/wildfly11 +WILDFLY11_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly11 + +WILDFLY12_DESC= WildFly version 12.0 +WILDFLY12_VARS= APP_HOME=${PREFIX}/wildfly12 +WILDFLY12_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly12 + +WILDFLY13_DESC= WildFly version 13.0 +WILDFLY13_VARS= APP_HOME=${PREFIX}/wildfly13 +WILDFLY13_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly13 + +WILDFLY14_DESC= WildFly version 14.0 +WILDFLY14_VARS= APP_HOME=${PREFIX}/wildfly14 +WILDFLY14_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly14 + +WILDFLY15_DESC= WildFly version 15.0 +WILDFLY15_VARS= APP_HOME=${PREFIX}/wildfly15 +WILDFLY15_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly15 + +WILDFLY16_DESC= WildFly version 16.0 +WILDFLY16_VARS= APP_HOME=${PREFIX}/wildfly16 +WILDFLY16_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly16 + +WILDFLY90_DESC= WildFly version 9.0 +WILDFLY90_VARS= APP_HOME=${PREFIX}/wildfly90 +WILDFLY90_RUN_DEPENDS= ${APP_HOME}/bin/standalone.sh:java/wildfly90 + +do-install: + @${MKDIR} ${STAGEDIR}/var/lib/zanata + @${MKDIR} ${STAGEDIR}${APP_HOME}/standalone/deployments \ + ${STAGEDIR}${APP_HOME}/standalone/configuration + ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/zanata-war-${PORTVERSION}.war \ + ${STAGEDIR}/${APP_HOME}/standalone/deployments/ROOT.war + ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/mysql-connector-java-${MYSQL_CONNECTOR_JAVA_VERSION}.jar \ + ${STAGEDIR}/${APP_HOME}/standalone/deployments/mysql-connector-java.jar + ${INSTALL_DATA} ${FILESDIR}/standalone-zanata.xml.sample \ + ${STAGEDIR}/${APP_HOME}/standalone/configuration + +.include Index: devel/zanata-platform/distinfo =================================================================== --- devel/zanata-platform/distinfo +++ devel/zanata-platform/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1555698663 +SHA256 (zanata-platform/zanata-war-4.6.2.war) = db1b87fcf2bd3d918402af5740b43cc0f862eb76a57070e2170ed1576ad8ffbb +SIZE (zanata-platform/zanata-war-4.6.2.war) = 84018622 +SHA256 (zanata-platform/mysql-connector-java-5.1.26.jar) = 0618340ec0b5c094e3b61cdb66400d88b54087003e02bd2ba074f87abb254ee2 +SIZE (zanata-platform/mysql-connector-java-5.1.26.jar) = 855946 Index: devel/zanata-platform/files/pkg-message.in =================================================================== --- devel/zanata-platform/files/pkg-message.in +++ devel/zanata-platform/files/pkg-message.in @@ -0,0 +1,49 @@ +================================================================================ + +Zanata platform uses these components: + WildFly - Zanata application (.war) is deployed here + MySQL database + ClamAV + +When running it for the first time, the following steps are necessary. + +# MySQL + +After running the MySQL server, create a database/username for Zanata, example: + mysql> CREATE DATABASE zanata /**!40100 DEFAULT CHARACTER SET utf8 **/; + mysql> CREATE USER 'zanata'@'localhost' IDENTIFIED BY 'zanatapw'; + mysql> GRANT ALL ON zanata.* TO 'zanata'@'localhost'; + +# WildFly + +A WildFly config sample file for Zanata is installed in +%%APP_HOME%%/standalone/configuration/standalone-zanata.xml.sample +you need to copy it to %%APP_HOME%%/standalone/configuration/standalone.xml and +then configure it properly. The main attention points are: + - Database credentials + - SMTP authentication + +# Zanata Startup + +To enable Zanata, put the following lines in /etc/rc.conf: + %%WILDFLYV%%_enable="YES" + mysql_enable="YES" # If it's running on the same machine + clamav_freshclam_enable="YES" # If you are using antivirus + clamav_clamd_enable="YES" + +# Admin user + +After running Zanata for the first time, you need to execute this script to +create an admin user, remember to change the password: + $ fetch https://raw.githubusercontent.com/zanata/zanata-platform/master/server/docker/conf/admin-user-setup.sql \ + -o /tmp + $ mysql -u -p zanata < /tmp/admin-user-setup.sql + + ******************************************************* + * Remember to change the admin password and API token * + ******************************************************* + +More information about the installation process at: +http://docs.zanata.org/en/release/user-guide/system-admin/configuration/installation/ + +=============================================================================== Index: devel/zanata-platform/files/standalone-zanata.xml.sample =================================================================== --- devel/zanata-platform/files/standalone-zanata.xml.sample +++ devel/zanata-platform/files/standalone-zanata.xml.sample @@ -0,0 +1,527 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:mysql://localhost:3306/zanata?useUnicode=true + com.mysql.jdbc.Driver + mysql-connector-java.jar + + 0 + 20 + FailingConnectionOnly + + + zanata + zanataCHANGEME + + + + true + false + + + + NOWARN + + + + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + h2 + + sa + sa + + + + + org.h2.jdbcx.JdbcDataSource + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: devel/zanata-platform/pkg-descr =================================================================== --- devel/zanata-platform/pkg-descr +++ devel/zanata-platform/pkg-descr @@ -0,0 +1,8 @@ +Zanata is a web-based translation platform for managing localization projects. +Localization (L10n) is the process of translating software or documentation into +different languages. + +Zanata platform is designed for translators, content creators and developers to +manage localization projects. + +WWW: http://zanata.org/ Index: devel/zanata-platform/pkg-plist =================================================================== --- devel/zanata-platform/pkg-plist +++ devel/zanata-platform/pkg-plist @@ -0,0 +1,9 @@ +@owner www +@group www +@(,,600) %%APP_HOME%%/standalone/configuration/standalone-zanata.xml.sample +%%APP_HOME%%/standalone/deployments/ROOT.war +%%APP_HOME%%/standalone/deployments/mysql-connector-java.jar +@dir /var/lib/zanata +@owner +@group +@dir /var/lib