git: 77f6071a35dd - main - www/mattermost-server: Add mmctl to the build

From: Bernhard Froehlich <decke_at_FreeBSD.org>
Date: Sun, 03 Nov 2024 18:16:51 UTC
The branch main has been updated by decke:

URL: https://cgit.FreeBSD.org/ports/commit/?id=77f6071a35dd11f3f101b759ca1b24d236a56c9b

commit 77f6071a35dd11f3f101b759ca1b24d236a56c9b
Author:     Bernhard Froehlich <decke@FreeBSD.org>
AuthorDate: 2024-11-03 18:16:12 +0000
Commit:     Bernhard Froehlich <decke@FreeBSD.org>
CommitDate: 2024-11-03 18:16:12 +0000

    www/mattermost-server: Add mmctl to the build
    
    Approved by:    maintainer (implicit)
---
 www/mattermost-server/Makefile                              |  3 ++-
 .../files/patch-cmd_mmctl_commands_utils__unix.go           | 13 +++++++++++++
 www/mattermost-server/pkg-plist                             |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/www/mattermost-server/Makefile b/www/mattermost-server/Makefile
index 3bcecfec7ed7..990fc1ad6542 100644
--- a/www/mattermost-server/Makefile
+++ b/www/mattermost-server/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	mattermost
 PORTVERSION=	9.11.4
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	LOCAL/decke
 PKGNAMESUFFIX=	-server
@@ -20,7 +21,7 @@ RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss \
 USES=		go:1.22,modules tar:xz
 USE_RC_SUBR=	mattermostd
 
-GO_TARGET=	./cmd/mattermost ./scripts/config_generator
+GO_TARGET=	./cmd/mattermost ./cmd/mmctl ./scripts/config_generator
 GO_BUILDFLAGS=	-ldflags=" \
 		-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${PORTVERSION} \
 		-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=none \
diff --git a/www/mattermost-server/files/patch-cmd_mmctl_commands_utils__unix.go b/www/mattermost-server/files/patch-cmd_mmctl_commands_utils__unix.go
new file mode 100644
index 000000000000..b7a918c7f9d3
--- /dev/null
+++ b/www/mattermost-server/files/patch-cmd_mmctl_commands_utils__unix.go
@@ -0,0 +1,13 @@
+--- cmd/mmctl/commands/utils_unix.go.orig	2024-10-24 13:08:53 UTC
++++ cmd/mmctl/commands/utils_unix.go
+@@ -1,8 +1,8 @@
+ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
+ // See LICENSE.txt for license information.
+ 
+-//go:build linux || darwin
+-// +build linux darwin
++//go:build linux || darwin || freebsd
++// +build linux darwin freebsd
+ 
+ package commands
+ 
diff --git a/www/mattermost-server/pkg-plist b/www/mattermost-server/pkg-plist
index c6f76b2ba119..1416a0da7a29 100644
--- a/www/mattermost-server/pkg-plist
+++ b/www/mattermost-server/pkg-plist
@@ -1,4 +1,5 @@
 bin/mattermostd
+bin/mmctl
 %%ETCDIR%%/config.json.sample
 %%WWWDIR%%/fonts/OFL.txt
 %%WWWDIR%%/fonts/nunito-bold.ttf