Add net/mattermost-server
This commit is contained in:
commit
01ed292e7d
4
net/mattermost-server/CVS/Entries
Normal file
4
net/mattermost-server/CVS/Entries
Normal file
@ -0,0 +1,4 @@
|
||||
D/patches////
|
||||
D/pkg////
|
||||
/Makefile/1.69/Mon Oct 17 15:14:28 2022//
|
||||
/distinfo/1.62/Mon Oct 17 15:14:28 2022//
|
1
net/mattermost-server/CVS/Repository
Normal file
1
net/mattermost-server/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
ports/net/mattermost-server
|
52
net/mattermost-server/Makefile
Normal file
52
net/mattermost-server/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
COMMENT = open source Slack-alternative
|
||||
|
||||
V = 7.4.0
|
||||
|
||||
# mattermost-server-vendored distfile generated by fetching archive from
|
||||
# https://github.com/mattermost/mattermost-server/archive/refs/tags/v{$V}.tar.gz
|
||||
# and running "go mod tidy" + "go mod vendor"
|
||||
DISTNAME = mattermost-server-vendored-${V}
|
||||
PKGNAME = mattermost-server-${V}
|
||||
|
||||
MASTER_SITES = https://distfiles.laylo.io/
|
||||
MASTER_SITES0 = https://releases.mattermost.com/${V}/
|
||||
|
||||
DISTFILES += ${DISTNAME}${EXTRACT_SUFX} \
|
||||
mattermost-${V}-linux-amd64${EXTRACT_SUFX}:0
|
||||
|
||||
CATEGORIES = net
|
||||
HOMEPAGE = https://mattermost.com/
|
||||
|
||||
MAINTAINER = Jeroen Janssen <jeroen@laylo.io>
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB += c pthread
|
||||
|
||||
MODULES = lang/go
|
||||
ALL_TARGET = github.com/mattermost/mattermost-server
|
||||
MODGO_LDFLAGS = -X github.com/mattermost/mattermost-server/model.BuildNumber=${V}
|
||||
NO_TEST = Yes
|
||||
|
||||
post-extract:
|
||||
cp ${WRKDIR}/mattermost/config/config.json ${WRKDIST}/config/
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKDIST}/config/config.json ${WRKDIST}/utils/fileutils/fileutils.go \
|
||||
${WRKDIST}/config/file.go
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC}/cmd/mattermost && \
|
||||
${MODGO_BUILD_CMD}
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${MODGO_WORKSPACE}/bin/mattermost ${PREFIX}/bin/
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/mattermost/
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/mattermost/
|
||||
cp ${WRKSRC}/config/config.json ${PREFIX}/share/examples/mattermost/
|
||||
.for _d in client fonts i18n templates
|
||||
cp -Rp ${WRKDIR}/mattermost/${_d} ${PREFIX}/share/mattermost/
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.mk>
|
4
net/mattermost-server/distinfo
Normal file
4
net/mattermost-server/distinfo
Normal file
@ -0,0 +1,4 @@
|
||||
SHA256 (mattermost-7.4.0-linux-amd64.tar.gz) = N4wvgrTmg1J06IPmpLlPHOHNNB+bH2BBQgEsv9GWCN0=
|
||||
SHA256 (mattermost-server-vendored-7.4.0.tar.gz) = Llw/OAjkRr5VuEuevpav+qJGy8kPHfofEyvltGQBTAE=
|
||||
SIZE (mattermost-7.4.0-linux-amd64.tar.gz) = 341792682
|
||||
SIZE (mattermost-server-vendored-7.4.0.tar.gz) = 23219217
|
4
net/mattermost-server/patches/CVS/Entries
Normal file
4
net/mattermost-server/patches/CVS/Entries
Normal file
@ -0,0 +1,4 @@
|
||||
/patch-config_config_json/1.29/Mon Oct 17 15:14:28 2022//
|
||||
/patch-config_file_go/1.6/Mon Oct 17 15:14:28 2022//
|
||||
/patch-utils_fileutils_fileutils_go/1.4/Mon Oct 17 15:14:28 2022//
|
||||
D
|
1
net/mattermost-server/patches/CVS/Repository
Normal file
1
net/mattermost-server/patches/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
ports/net/mattermost-server/patches
|
131
net/mattermost-server/patches/patch-config_config_json
Normal file
131
net/mattermost-server/patches/patch-config_config_json
Normal file
@ -0,0 +1,131 @@
|
||||
Index: config/config.json
|
||||
--- config/config.json.orig
|
||||
+++ config/config.json
|
||||
@@ -12,7 +12,7 @@
|
||||
"TLSStrictTransportMaxAge": 63072000,
|
||||
"TLSOverwriteCiphers": [],
|
||||
"UseLetsEncrypt": false,
|
||||
- "LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache",
|
||||
+ "LetsEncryptCertificateCacheFile": "${LOCALSTATEDIR}/mattermost/letsencrypt.cache",
|
||||
"Forward80To443": false,
|
||||
"TrustedProxyIPHeader": [],
|
||||
"ReadTimeout": 300,
|
||||
@@ -90,7 +90,7 @@
|
||||
"EnableInlineLatex": true,
|
||||
"EnableAPIChannelDeletion": false,
|
||||
"EnableLocalMode": false,
|
||||
- "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket",
|
||||
+ "LocalModeSocketLocation": "${LOCALSTATEDIR}/mattermost/mattermost_local.socket",
|
||||
"EnableAWSMetering": false,
|
||||
"SplitKey": "",
|
||||
"FeatureFlagSyncIntervalSeconds": 30,
|
||||
@@ -146,14 +146,14 @@
|
||||
"ReplicaLagSettings": []
|
||||
},
|
||||
"LogSettings": {
|
||||
- "EnableConsole": true,
|
||||
+ "EnableConsole": false,
|
||||
"ConsoleLevel": "INFO",
|
||||
"ConsoleJson": true,
|
||||
"EnableColor": false,
|
||||
"EnableFile": true,
|
||||
"FileLevel": "INFO",
|
||||
"FileJson": true,
|
||||
- "FileLocation": "",
|
||||
+ "FileLocation": "${LOCALSTATEDIR}/log/mattermost",
|
||||
"EnableWebhookDebugging": true,
|
||||
"EnableDiagnostics": true,
|
||||
"EnableSentry": true,
|
||||
@@ -170,14 +170,14 @@
|
||||
"AdvancedLoggingConfig": ""
|
||||
},
|
||||
"NotificationLogSettings": {
|
||||
- "EnableConsole": true,
|
||||
+ "EnableConsole": false,
|
||||
"ConsoleLevel": "INFO",
|
||||
"ConsoleJson": true,
|
||||
"EnableColor": false,
|
||||
"EnableFile": true,
|
||||
"FileLevel": "INFO",
|
||||
"FileJson": true,
|
||||
- "FileLocation": "",
|
||||
+ "FileLocation": "${LOCALSTATEDIR}/log/mattermost",
|
||||
"AdvancedLoggingConfig": ""
|
||||
},
|
||||
"PasswordSettings": {
|
||||
@@ -194,7 +194,7 @@
|
||||
"MaxFileSize": 104857600,
|
||||
"MaxImageResolution": 33177600,
|
||||
"DriverName": "local",
|
||||
- "Directory": "./data/",
|
||||
+ "Directory": "${LOCALSTATEDIR}/mattermost/data/",
|
||||
"EnablePublicLink": false,
|
||||
"ExtractContent": true,
|
||||
"ArchiveRecursion": false,
|
||||
@@ -225,11 +225,11 @@
|
||||
"EnableSMTPAuth": false,
|
||||
"SMTPUsername": "",
|
||||
"SMTPPassword": "",
|
||||
- "SMTPServer": "",
|
||||
- "SMTPPort": "10025",
|
||||
+ "SMTPServer": "localhost",
|
||||
+ "SMTPPort": "25",
|
||||
"SMTPServerTimeout": 10,
|
||||
"ConnectionSecurity": "",
|
||||
- "SendPushNotifications": true,
|
||||
+ "SendPushNotifications": false,
|
||||
"PushNotificationServer": "https://push-test.mattermost.com",
|
||||
"PushNotificationContents": "full",
|
||||
"PushNotificationBuffer": 1000,
|
||||
@@ -260,13 +260,13 @@
|
||||
"SupportSettings": {
|
||||
"TermsOfServiceLink": "https://mattermost.com/terms-of-use/",
|
||||
"PrivacyPolicyLink": "https://mattermost.com/privacy-policy/",
|
||||
- "AboutLink": "https://docs.mattermost.com/about/product.html/",
|
||||
+ "AboutLink": "https://docs.mattermost.com/about/product.html",
|
||||
"HelpLink": "https://mattermost.com/default-help/",
|
||||
"ReportAProblemLink": "https://mattermost.com/default-report-a-problem/",
|
||||
"SupportEmail": "",
|
||||
"CustomTermsOfServiceEnabled": false,
|
||||
"CustomTermsOfServiceReAcceptancePeriod": 365,
|
||||
- "EnableAskCommunityLink": true
|
||||
+ "EnableAskCommunityLink": false
|
||||
},
|
||||
"AnnouncementSettings": {
|
||||
"EnableBanner": false,
|
||||
@@ -372,7 +372,7 @@
|
||||
},
|
||||
"ComplianceSettings": {
|
||||
"Enable": false,
|
||||
- "Directory": "./data/",
|
||||
+ "Directory": "${LOCALSTATEDIR}/mattermost/data/",
|
||||
"EnableDaily": false,
|
||||
"BatchSize": 30000
|
||||
},
|
||||
@@ -529,8 +529,8 @@
|
||||
"EnableUploads": false,
|
||||
"AllowInsecureDownloadURL": false,
|
||||
"EnableHealthCheck": true,
|
||||
- "Directory": "./plugins",
|
||||
- "ClientDirectory": "./client/plugins",
|
||||
+ "Directory": "${LOCALSTATEDIR}/mattermost/plugins",
|
||||
+ "ClientDirectory": "${LOCALSTATEDIR}/mattermost/client/plugins",
|
||||
"Plugins": {},
|
||||
"PluginStates": {
|
||||
"com.mattermost.apps": {
|
||||
@@ -605,11 +605,11 @@
|
||||
"AdvancedTextEditor": true
|
||||
},
|
||||
"ImportSettings": {
|
||||
- "Directory": "./import",
|
||||
+ "Directory": "${LOCALSTATEDIR}/mattermost/import",
|
||||
"RetentionDays": 30
|
||||
},
|
||||
"ExportSettings": {
|
||||
- "Directory": "./export",
|
||||
+ "Directory": "${LOCALSTATEDIR}/mattermost/export",
|
||||
"RetentionDays": 30
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
12
net/mattermost-server/patches/patch-config_file_go
Normal file
12
net/mattermost-server/patches/patch-config_file_go
Normal file
@ -0,0 +1,12 @@
|
||||
Index: config/file.go
|
||||
--- config/file.go.orig
|
||||
+++ config/file.go
|
||||
@@ -66,7 +66,7 @@ func resolveConfigFilePath(path string) (string, error
|
||||
|
||||
// Search for the relative path to the file in the config folder, taking into account
|
||||
// various common starting points.
|
||||
- if configFile := fileutils.FindFile(filepath.Join("config", path)); configFile != "" {
|
||||
+ if configFile := fileutils.FindFile(filepath.Join("${SYSCONFDIR}/mattermost", path)); configFile != "" {
|
||||
return configFile, nil
|
||||
}
|
||||
|
@ -0,0 +1,16 @@
|
||||
Index: utils/fileutils/fileutils.go
|
||||
--- utils/fileutils/fileutils.go.orig
|
||||
+++ utils/fileutils/fileutils.go
|
||||
@@ -10,11 +10,7 @@ import (
|
||||
|
||||
func CommonBaseSearchPaths() []string {
|
||||
paths := []string{
|
||||
- ".",
|
||||
- "..",
|
||||
- "../..",
|
||||
- "../../..",
|
||||
- "../../../..",
|
||||
+ "${PREFIX}/share/mattermost",
|
||||
}
|
||||
|
||||
// this enables the server to be used in tests from a different repository
|
4
net/mattermost-server/pkg/CVS/Entries
Normal file
4
net/mattermost-server/pkg/CVS/Entries
Normal file
@ -0,0 +1,4 @@
|
||||
/DESCR/1.2/Mon Oct 17 15:14:28 2022//
|
||||
/PLIST/1.56/Mon Oct 17 15:14:28 2022//
|
||||
/mattermost.rc/1.4/Mon Oct 17 15:14:28 2022//
|
||||
D
|
1
net/mattermost-server/pkg/CVS/Repository
Normal file
1
net/mattermost-server/pkg/CVS/Repository
Normal file
@ -0,0 +1 @@
|
||||
ports/net/mattermost-server/pkg
|
2
net/mattermost-server/pkg/DESCR
Normal file
2
net/mattermost-server/pkg/DESCR
Normal file
@ -0,0 +1,2 @@
|
||||
Mattermost is an open source, private cloud, Slack-alternative.
|
||||
It's written in Golang and React and runs as a single binary.
|
3883
net/mattermost-server/pkg/PLIST
Normal file
3883
net/mattermost-server/pkg/PLIST
Normal file
File diff suppressed because it is too large
Load Diff
11
net/mattermost-server/pkg/mattermost.rc
Normal file
11
net/mattermost-server/pkg/mattermost.rc
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/ksh
|
||||
|
||||
daemon="${TRUEPREFIX}/bin/mattermost"
|
||||
daemon_user="_mattermost"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_bg=YES
|
||||
rc_reload=NO
|
||||
|
||||
rc_cmd $1
|
Loading…
Reference in New Issue
Block a user