View | Details | Raw Unified | Return to bug 239884
Collapse All | Expand All

(-)www/mattermost-server/Makefile (-17 / +7 lines)
Lines 16-24 Link Here
16
RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss \
16
RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss \
17
		mattermost-webapp>=${PORTVERSION}:www/mattermost-webapp
17
		mattermost-webapp>=${PORTVERSION}:www/mattermost-webapp
18
18
19
USES=		go
19
USES=		go:modules
20
20
21
GO_LDFLAGS=	-X github.com/mattermost/mattermost-server/model.BuildNumber=${PORTVERSION}
21
GO_TARGET=	./cmd/mattermost
22
GO_BUILDFLAGS=	-ldflags="-X github.com/mattermost/mattermost-server/model.BuildNumber=${PORTVERSION}"
22
23
23
USE_RC_SUBR=	mattermostd
24
USE_RC_SUBR=	mattermostd
24
25
Lines 33-54 Link Here
33
USERS=		${MATTERMOSTD_USER}
34
USERS=		${MATTERMOSTD_USER}
34
GROUPS=		${MATTERMOSTD_GROUP}
35
GROUPS=		${MATTERMOSTD_GROUP}
35
36
36
pre-build:
37
post-install:
37
	@${MKDIR} ${WRKSRC}/src/github.com/${GH_ACCOUNT_DEFAULT}/${PORTNAME}
38
	${MV} ${STAGEDIR}${PREFIX}/bin/mattermost ${STAGEDIR}${PREFIX}/bin/mattermostd
38
	@cd ${WRKSRC} && \
39
		${MV} api4 app cmd config doc einterfaces imports jobs manualtesting \
40
		mlog migrations model plugin services store testlib utils web wsapi vendor \
41
		${WRKSRC}/src/github.com/${GH_ACCOUNT_DEFAULT}/${PORTNAME}
42
43
do-build:
44
	@cd ${WRKSRC}/src/github.com/${GH_ACCOUNT_DEFAULT}/${GH_PROJECT} && \
45
		${SETENV} ${MAKE_ENV} GOPATH=${WRKSRC} go install -ldflags="${GO_LDFLAGS}" ./...
46
47
do-install:
48
	${INSTALL_PROGRAM} ${WRKSRC}/bin/mattermost ${STAGEDIR}${PREFIX}/bin/mattermostd
49
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/mattermost
39
	${MKDIR} ${STAGEDIR}${PREFIX}/etc/mattermost
50
	${INSTALL_DATA} ${WRKSRC}/src/github.com/${GH_ACCOUNT_DEFAULT}/${PORTNAME}/config/default.json ${STAGEDIR}${PREFIX}/etc/mattermost/config.json.sample
40
	${INSTALL_DATA} ${GO_WRKSRC}/config/default.json ${STAGEDIR}${PREFIX}/etc/mattermost/config.json.sample
51
	${MKDIR} ${STAGEDIR}${WWWDIR}
41
	${MKDIR} ${STAGEDIR}${WWWDIR}
52
	cd ${WRKSRC} && ${COPYTREE_SHARE} 'fonts i18n templates' ${STAGEDIR}${WWWDIR}
42
	cd ${GO_WRKSRC} && ${COPYTREE_SHARE} 'fonts i18n templates' ${STAGEDIR}${WWWDIR}
53
43
54
.include <bsd.port.mk>
44
.include <bsd.port.mk>

Return to bug 239884