ayaports/unmaintained/mattermost/APKBUILD

41 lines
1.4 KiB
Text
Raw Permalink Normal View History

2023-03-31 20:26:25 +00:00
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
2021-06-04 15:24:22 +00:00
2023-03-31 20:26:25 +00:00
pkgname=mattermost
2021-06-04 15:24:22 +00:00
pkgver=5.31.0
2023-03-31 20:26:25 +00:00
pkgrel=1
2021-06-04 15:24:22 +00:00
pkgdesc="Open source Slack-alternative in Golang and React"
arch='x86_64'
url="https://mattermost.com"
license='AGPL'
2023-03-31 20:26:25 +00:00
source="https://releases.mattermost.com/$pkgver/mattermost-$pkgver-linux-amd64.tar.gz"
builddir="$srcdir"
2021-06-04 15:24:22 +00:00
subpackages="$pkgname-doc"
package() {
2023-03-31 20:26:25 +00:00
install -dm755 \
"$pkgdir"/usr/bin \
"$pkgdir"/usr/share/webapps/$pkgname \
"$pkgdir"/etc/$pkgname \
"$pkgdir"/usr/share/doc/"$pkgname"
2021-06-04 15:24:22 +00:00
2023-03-31 20:26:25 +00:00
cp -a mattermost "$pkgdir"/usr/share/webapps/.
2021-06-04 15:24:22 +00:00
2023-03-31 20:26:25 +00:00
install -dm755 $pkgdir/usr/share/webapps/$pkgname/client/plugins
2021-06-04 15:24:22 +00:00
2023-03-31 20:26:25 +00:00
mv "$pkgdir"/usr/share/webapps/$pkgname/config/* "$pkgdir"/etc/$pkgname/.
rmdir "$pkgdir"/usr/share/webapps/$pkgname/config
ln -s /etc/$pkgname/config "$pkgdir"/usr/share/webapps/$pkgname/config
2021-06-04 15:24:22 +00:00
2023-03-31 20:26:25 +00:00
sed -e 's@"Directory": ".*"@"Directory": "/var/lib/mattermost/"@g' \
-e 's@tcp(dockerhost:3306)@unix(/run/mysqld/mysqld.sock)@g' \
-i "$pkgdir"/etc/"$pkgname"/config.json
2021-06-04 15:24:22 +00:00
2023-03-31 20:26:25 +00:00
mv mattermost/NOTICE.txt mattermost/README.md "$pkgdir"/usr/share/doc/"$pkgname"
2021-06-04 15:24:22 +00:00
2023-03-31 20:26:25 +00:00
ln -s "/usr/share/webapps/$pkgname/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
2021-06-04 15:24:22 +00:00
}
sha512sums="a321fb5f51c96f80b2e7d176c5157f3e152c6dddf41b0561a2b07e731b0640b1bc63cc0f673d92cf79d5fd4e925e3dfafafa838433a5dfb3a03057dadba3f77b mattermost-5.31.0-linux-amd64.tar.gz"