This commit is contained in:
Daniel 2022-07-24 10:22:58 -04:00
parent 3c58695ff8
commit 6587fb2bbe
9 changed files with 3596 additions and 0 deletions

View file

@ -0,0 +1,49 @@
PORTNAME= mattermost-server
PORTVERSION= 7.1.2
DISTVERSIONPREFIX= v
PORTREVISION= 3
CATEGORIES= www
MAINTAINER= swills@FreeBSD.org
COMMENT= Open source Slack-alternative in Golang and React
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386
RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss \
mattermost-webapp>=${PORTVERSION}:www/mattermost-webapp
USES= go:modules,novendor
GO_TARGET= ./cmd/mattermost ./scripts/config_generator
GO_BUILDFLAGS= -ldflags="-X github.com/mattermost/mattermost-server/v6/model.BuildNumber=${PORTVERSION}"
USE_RC_SUBR= mattermostd
USE_GITHUB= yes
GH_ACCOUNT= mattermost
WWWDIR= ${PREFIX}/www/mattermost
MATTERMOSTD_USER= mattermost
MATTERMOSTD_GROUP= mattermost
USERS= ${MATTERMOSTD_USER}
GROUPS= ${MATTERMOSTD_GROUP}
post-extract:
@${RM} ${WRKSRC}/vendor/modules.txt
post-install:
${MV} ${STAGEDIR}${PREFIX}/bin/mattermost ${STAGEDIR}${PREFIX}/bin/mattermostd
${MKDIR} ${STAGEDIR}${PREFIX}/etc/mattermost
${SETENV} OUTPUT_CONFIG=${WRKSRC}/config/default.json ${WRKDIR}/bin/config_generator
${INSTALL_DATA} ${WRKSRC}/config/default.json ${STAGEDIR}${PREFIX}/etc/mattermost/config.json.sample
${RM} ${STAGEDIR}${PREFIX}/bin/config_generator
${MKDIR} ${STAGEDIR}${WWWDIR}/templates
cd ${GO_WRKSRC} && ${COPYTREE_SHARE} 'fonts i18n' ${STAGEDIR}${WWWDIR}
cd ${GO_WRKSRC}/templates && ${CP} *.html *.js ${STAGEDIR}${WWWDIR}/templates
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1658526188
SHA256 (mattermost-mattermost-server-v7.1.2_GH0.tar.gz) = 04ddc906620275d91a55134e34d1962e04b57bbeea36f0fe8433e39bd139f804
SIZE (mattermost-mattermost-server-v7.1.2_GH0.tar.gz) = 13321768

View file

@ -0,0 +1,61 @@
#!/bin/sh
# PROVIDE: mattermostd
# REQUIRE: DAEMON NETWORKING
# BEFORE: LOGIN
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable mattermostdb:
# mattermostd_enable="YES"
#
# mattermostd_enable (bool): Set to YES to enable mattermostd
# Default: NO
# mattermostd_conf (str): mattermostd configuration file
# Default: ${PREFIX}/etc/mattermostd.conf
# mattermostd_user (str): mattermostd daemon user
# Default: mattermostd
# mattermostd_group (str): mattermostd daemon group
# Default: mattermostd
# mattermostd_extraflags (str): Extra flags passed to mattermostd
# Default: None
# mattermostd_facility (str): Syslog facility to use
# Default: daemon
# mattermostd_priority (str): Syslog priority to use
# Default: info
. /etc/rc.subr
name="mattermostd"
rcvar=mattermostd_enable
load_rc_config $name
: ${mattermostd_enable:="NO"}
: ${mattermostd_user:="mattermost"}
: ${mattermostd_group:="mattermost"}
: ${mattermostd_extraflags:=""}
: ${mattermostd_facility:="daemon"}
: ${mattermostd_priority:="info"}
: ${mattermostd_tag:="mattermostd"}
: ${mattermostd_conf:="%%PREFIX%%/etc/mattermost/config.json"}
# daemon
pidfile=/var/run/${name}.pid
procname=%%PREFIX%%/bin/${name}
command=/usr/sbin/daemon
command_args="-p ${pidfile} -S -s ${mattermostd_priority} -l ${mattermostd_facility} -T ${mattermostd_tag} ${procname} server ${mattermostd_extraflags} --config=${mattermostd_conf}"
start_precmd=mattermostd_startprecmd
mattermostd_chdir=%%PREFIX%%/www/mattermost
required_files=${mattermostd_confg}
mattermostd_startprecmd()
{
if [ ! -e ${pidfile} ]; then
install -o ${mattermostd_user} -g ${mattermostd_group} /dev/null ${pidfile};
fi
if [ ! -d ${mattermostd_dir} ]; then
install -d -o ${mattermostd_user} -g ${mattermostd_group} ${mattermostd_dir}
fi
}
run_rc_command "$1"

View file

@ -0,0 +1,5 @@
Mattermost is an open source, private cloud, Slack-alternative.
It's written in Golang and React and runs as a single Linux binary with MySQL
or PostgreSQL.
WWW: https://mattermost.org/

View file

@ -0,0 +1,54 @@
bin/mattermostd
etc/mattermost/config.json.sample
etc/rc.d/mattermostd
%%WWWDIR%%/fonts/OFL.txt
%%WWWDIR%%/fonts/nunito-bold.ttf
%%WWWDIR%%/i18n/bg.json
%%WWWDIR%%/i18n/de.json
%%WWWDIR%%/i18n/en.json
%%WWWDIR%%/i18n/en_AU.json
%%WWWDIR%%/i18n/es.json
%%WWWDIR%%/i18n/fa.json
%%WWWDIR%%/i18n/fr.json
%%WWWDIR%%/i18n/hu.json
%%WWWDIR%%/i18n/it.json
%%WWWDIR%%/i18n/ja.json
%%WWWDIR%%/i18n/ko.json
%%WWWDIR%%/i18n/nl.json
%%WWWDIR%%/i18n/pl.json
%%WWWDIR%%/i18n/pt-BR.json
%%WWWDIR%%/i18n/ro.json
%%WWWDIR%%/i18n/ru.json
%%WWWDIR%%/i18n/sv.json
%%WWWDIR%%/i18n/tr.json
%%WWWDIR%%/i18n/uk.json
%%WWWDIR%%/i18n/zh-CN.json
%%WWWDIR%%/i18n/zh-TW.json
%%WWWDIR%%/templates/cloud_trial_end_warning.html
%%WWWDIR%%/templates/cloud_trial_ended_email.html
%%WWWDIR%%/templates/cloud_upgrade_confirmation.html
%%WWWDIR%%/templates/cloud_welcome_email.html
%%WWWDIR%%/templates/deactivate_body.html
%%WWWDIR%%/templates/email_change_body.html
%%WWWDIR%%/templates/email_change_verify_body.html
%%WWWDIR%%/templates/email_footer.html
%%WWWDIR%%/templates/email_info.html
%%WWWDIR%%/templates/globalrelay_compliance_export.html
%%WWWDIR%%/templates/globalrelay_compliance_export_message.html
%%WWWDIR%%/templates/globalrelay_compliance_export_participant_row.html
%%WWWDIR%%/templates/inactivity_body.html
%%WWWDIR%%/templates/invite_body.html
%%WWWDIR%%/templates/license_up_for_renewal.html
%%WWWDIR%%/templates/messages_notification.html
%%WWWDIR%%/templates/mfa_change_body.html
%%WWWDIR%%/templates/password_change_body.html
%%WWWDIR%%/templates/payment_failed_body.html
%%WWWDIR%%/templates/payment_failed_no_card_body.html
%%WWWDIR%%/templates/remove_expired_license.html
%%WWWDIR%%/templates/reset_body.html
%%WWWDIR%%/templates/signin_change_body.html
%%WWWDIR%%/templates/unsupported_browser.html
%%WWWDIR%%/templates/unsupported_browser.js
%%WWWDIR%%/templates/verify_body.html
%%WWWDIR%%/templates/warn_metric_ack.html
%%WWWDIR%%/templates/welcome_body.html

View file

@ -0,0 +1,36 @@
PORTNAME= mattermost-webapp
PORTVERSION= 7.1.2
DISTVERSIONPREFIX= v
CATEGORIES= www
MASTER_SITES= https://releases.mattermost.com/${PORTVERSION}/
DISTNAME= mattermost-${PORTVERSION}-linux-amd64
MAINTAINER= swills@FreeBSD.org
COMMENT= Webapp of Mattermost server
LICENSE= APACHE20
NO_BUILD= yes
NO_ARCH= yes
WWWDIR= ${PREFIX}/www/mattermost
MATTERMOSTD_USER= mattermost
MATTERMOSTD_GROUP= mattermost
USERS= ${MATTERMOSTD_USER}
GROUPS= ${MATTERMOSTD_GROUP}
PLIST_SUB= MATTERMOSTD_USER=${MATTERMOSTD_USER} \
MATTERMOSTD_GROUP=${MATTERMOSTD_GROUP}
do-install:
${MKDIR} ${STAGEDIR}${WWWDIR}
cd ${WRKDIR}/mattermost && ${COPYTREE_SHARE} client ${STAGEDIR}${WWWDIR}
${MKDIR} ${STAGEDIR}${WWWDIR}/client/plugins
post-install:
(cd ${STAGEDIR}${PREFIX} && \
${FIND} -E -s ${WWWDIR_REL}/client -type f -regex '.*[0-9a-f]{20,}.*\.(apng|css|eot|gif|jpg|js|json|map|mp3|png|svg|ttf|txt|woff|woff2)$$' >> ${TMPPLIST})
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1658546492
SHA256 (mattermost-7.1.2-linux-amd64.tar.gz) = 4058f1e09bb9c4c0bd37d1b06002354e59097bd8eb8339cccb606f632d871ca6
SIZE (mattermost-7.1.2-linux-amd64.tar.gz) = 329987254

View file

@ -0,0 +1,5 @@
Mattermost is an open source, private cloud, Slack-alternative.
It's written in Golang and React and runs as a single Linux binary with MySQL
or PostgreSQL.
WWW: https://mattermost.org/

File diff suppressed because it is too large Load diff