blob: 9358167b184f0460e216b851d96860ea846d3303 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
PORTNAME= mattermost
DISTVERSION= 8.1.11
DISTVERSIONPREFIX= v
PORTREVISION= 5
CATEGORIES= www
MASTER_SITES= LOCAL/decke/${PORTNAME}-${DISTVERSIONFULL}/:gomod
PKGNAMESUFFIX= -server
DISTFILES= go.mod:gomod
# implicit-approval+ for decke
MAINTAINER= bofh@FreeBSD.org
COMMENT= Open source Slack-alternative in Golang and React
WWW= https://mattermost.org/
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
USE_GITHUB= yes
GH_ACCOUNT= mattermost
USE_RC_SUBR= mattermostd
GO_MODULE= github.com/mattermost/mattermost/server/v8
GO_TARGET= ./cmd/mattermost ./scripts/config_generator
GO_BUILDFLAGS= -ldflags="-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${PORTVERSION}"
WRKSRC_SUBDIR= server
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>
|