www-apps/mattermost: new package, picked from AUR
This commit is contained in:
parent
08525ad801
commit
48d4fe2b6a
10
www-apps/mattermost/Manifest
Normal file
10
www-apps/mattermost/Manifest
Normal file
@ -0,0 +1,10 @@
|
||||
AUX mattermost.init 497 BLAKE2B 42722064de1652c2f9bf82c39c3afa7dc54042a82aa76acbac49b33a087050761379cf36413f76f5b066554e5c6c9664175f7f67f11d5ebeffb7d89a14d1bb73 SHA512 9c8eefcd3e84db61ca5108b3608bf4fdd1fa6deb518a1991e459b1a72a57659a6f3445301c621740df3dd0b4ea1308e098c8f4580ae005c9d35b5307a9f50a35
|
||||
AUX youp0m.init 534 BLAKE2B 7fd6110edb6787675043b8dc481dec4df699ced20a7ca431334af5b90cfe27a735f29e8ba6985d12520a3c15f175a57d672417798f927ed10f21532e0b45ce1d SHA512 bdfc58c0a35d6194f8dfa85051e93b4e04f9e1c811b1436782836905bd816a662b27891d1470e4da39fc54d929518dd1463dfdc74c44829d1249d3d24ef2c4e1
|
||||
DIST mattermost-4.8.0.tar.gz 55752176 BLAKE2B b107dc2a1892365abc143ba1f25c92ba001c1ffc68a567ecaaad221eb9ca58d8209a93097d48b7ae469130fce497f4121aa22600fd64c7ba8953d5ce9cdb5b56 SHA512 619cf38e43ec36e4ae19375f30bc814a68cae3f2289309649675f647ed5625a526a1e1a811d4bdcfe0dd4c17084ec6831ad064bbeca7b30cbefb16c8fa177e30
|
||||
DIST mattermost-4.8.1-webapp.tar.gz 20315450 BLAKE2B 880d30c90f7c504cbbd9d3d1e1cc649a860e5e3a4fd6786477ec59749355483faf8a02bc0944abb22cb06e5f7e655b3f1e3f7808bb28c882d18ed3422a66d613 SHA512 f0353eb68d1b9d021667b06fd1e0955c1a246c9e206759d7398e4ade2556647b3884ae0226ed248545cf26b0a14d497dc2d73c31c37e32dfc5d5a6269f4fc0bd
|
||||
DIST mattermost-4.8.1.tar.gz 55749608 BLAKE2B 873a960b87c36b5fdbc43f7cf2fd148fdfa49e52b779026e640c04d2911b07defe81b13023e5df1079d524d2bcccd5d16c25df0ffab613bdbd6fa4ef49e93d62 SHA512 7b5cc9977dab33c668b71142cf060fbf590b90fa4f31fffa4a4838f6db6893a0a5758fe890afd1bfdbb9b02bcdc308a8ef05dcf5b52af34ae219b5a556bf33de
|
||||
DIST mattermost-team-4.8.0-linux-amd64.tar.gz 45907493 BLAKE2B d46efd1233de0022600ade705d00ecace0d41f0c74a3f8b6ef08d53d57c7432314a15e7247e4da5265e5d7d78aaec8279c4e3d33373f5d2dcac99fd02fc7acde SHA512 4442872b931c6b9bf13090e7d70822a844eb090f480d69d516b31301afed78c02b045fbdd1adbb40e2ba3b31faa982058cc40f19aab78f6656657cd872de3dd7
|
||||
DIST mattermost-team-4.8.1-linux-amd64.tar.gz 45906876 BLAKE2B 5559f869ab1f4b0d846706a5388b834f0863de45fc16f3433f8b31cf8ddf1f6d5189d8fcaaa2283d836e2995bdd602d672eae2716cd31cc506de676a6f6b87c4 SHA512 8b1eb82389e383661ec860832baba253acae09b047624773cc3437f92c29c8fdabac18788ab7f2f11ac187ee7d4f7b4f0c06c2805331fc55a2521e9ad4ba20ca
|
||||
EBUILD mattermost-4.8.0.ebuild 2299 BLAKE2B bf7a84082b556619a1d1272765405f343ddffc2426e8f1c35b8ce433a910f4986c7d21655892e8e558e87ea5fea2dfc56fb92227f7c6c72e1db3650e89bad8e4 SHA512 2194430e9ff98c4ca5a7cb19956138780196bff7feb8f6cb0f3b53e894a8eb4047699d4d9f70e41a8a53f3cc7eaf44106742a56d1feda9b05efcd260746ae292
|
||||
EBUILD mattermost-4.8.1.ebuild 3825 BLAKE2B 0e057c081f66fc34f6d3fb3aafee7df2503cbf5b34772455f9bfbe6ae7184b2e73ec1a5b116472aa44b303f7d4ce068d57f7ffde5026cb8cb681d78636e82d0e SHA512 4ac9434237377c4fc9bb57e04649665508d71f9ed2239e3ad025a13d65a0ccec0bf1c1d043e06ec7f70a72c27e609e66bc92fac9dd00dea2b7e90cf094405068
|
||||
MISC metadata.xml 511 BLAKE2B 072d543a0ca6f8b747549d6802bc2089a2e6d59640a18ee7de6d98e40f4323d7710b5934d710fb93082f06f1ea871711bfccdb3b9dd493c5d16577c1782301a7 SHA512 16203ac2d505933f68efd3f4d137646f1593210b37f0e1cd05420b92f1c64b6235231559f1917075287c85c0a1944f8abd45d2c727502b904e5e229c8238c361
|
16
www-apps/mattermost/files/mattermost.init
Normal file
16
www-apps/mattermost/files/mattermost.init
Normal file
@ -0,0 +1,16 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
command=/usr/bin/mattermost
|
||||
command_args="-c /etc/mattermost.json"
|
||||
pidfile=/var/run/mattermost/mattermost.pid
|
||||
start_stop_daemon_args="--make-pidfile --background --user nobody --group nobody --chdir /usr/share/webapps/mattermost/"
|
||||
|
||||
depend() {
|
||||
need localmount net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0750 -o nobody:nobody /var/run/mattermost/ /var/lib/mattermost/
|
||||
}
|
117
www-apps/mattermost/mattermost-4.8.1.ebuild
Normal file
117
www-apps/mattermost/mattermost-4.8.1.ebuild
Normal file
@ -0,0 +1,117 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
EGO_PN=github.com/mattermost/mattermost-server
|
||||
|
||||
KEYWORDS="~amd64 ~arm"
|
||||
SRC_URI="https://github.com/mattermost/mattermost-server/archive/v${PV}.tar.gz -> ${P}.tar.gz
|
||||
build-client? ( https://github.com/mattermost/mattermost-webapp/archive/v${PV}.tar.gz -> ${P}-webapp.tar.gz )
|
||||
!build-client? ( https://releases.mattermost.com/${PV}/mattermost-team-${PV}-linux-amd64.tar.gz )"
|
||||
|
||||
DESCRIPTION="Open source Slack-alternative in Golang and React"
|
||||
HOMEPAGE="https://mattermost.com"
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
IUSE="+build-client"
|
||||
DEPEND="dev-lang/go
|
||||
build-client? ( sys-apps/yarn )"
|
||||
RDEPEND=""
|
||||
|
||||
S="${WORKDIR}/src/github.com/mattermost/mattermost-server"
|
||||
|
||||
src_unpack() {
|
||||
mkdir -p ${WORKDIR}/bin/ ${WORKDIR}/src/github.com/mattermost/
|
||||
default
|
||||
mv "${WORKDIR}/mattermost-server-${PV}" ${WORKDIR}/src/github.com/mattermost/mattermost-server
|
||||
use build-client && mv "${WORKDIR}/mattermost-webapp-${PV}" ${WORKDIR}/src/github.com/mattermost/mattermost-webapp
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# We are not using docker, no need to stop it.
|
||||
sed -r -i ${S}/Makefile \
|
||||
-e 's/^clean: stop-docker/clean:/'
|
||||
|
||||
# Enforce build hash to Arch Linux (Enterprise hash is already set to
|
||||
# none), instead of the official git hash value.
|
||||
sed -r -i ${S}/Makefile \
|
||||
-e "s/^(\s*)BUILD_HASH(_ENTERPRISE)? =.*/\1BUILD_HASH\2 = Gentoo \(${CHOST}\)/" \
|
||||
-e 's/-X (.*)(\$\(BUILD_HASH(_ENTERPRISE)?\))(.*)/-X '\''\1\2'\''\4/'
|
||||
|
||||
# The configuration isn't available at this time yet, modify the default.
|
||||
sed -r -i ${S}/build/release.mk \
|
||||
-e 's/\$\(DIST_PATH\)\/config\/config.json/\$\(DIST_PATH\)\/config\/default.json/'
|
||||
|
||||
# The Go programming language only supports 8 instruction sets, therefore
|
||||
# we cannot rely on ${CARCH} and need to cast manually.
|
||||
# src.: https://golang.org/doc/install/source#introduction
|
||||
case "${CHOST}" in
|
||||
i686*)
|
||||
sed -r -i ${S}/build/release.mk \
|
||||
-e "5,6s/amd64/386/"
|
||||
;;
|
||||
armv8*|aarch64*)
|
||||
sed -r -i ${S}/build/release.mk \
|
||||
-e "5,6s/amd64/arm64/"
|
||||
;;
|
||||
arm*)
|
||||
sed -r -i ${S}/build/release.mk \
|
||||
-e "5,6s/amd64/arm/"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Remove platform specific lines from the Makefile from the line beginning
|
||||
# with that statement to the end of file (we do not care of the additional
|
||||
# file copy, nor the tar compression defined below the file).
|
||||
sed '/# ----- PLATFORM SPECIFIC -----/,//d' -i ${S}/build/release.mk
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
export BUILD_NUMBER=${PVR}
|
||||
export LANG=C
|
||||
export GOPATH=${WORKDIR}
|
||||
|
||||
emake build-linux
|
||||
use build-client && emake build-client && emake package-linux
|
||||
}
|
||||
|
||||
src_install() {
|
||||
install -dm755 \
|
||||
"${D}"/usr/share/webapps \
|
||||
"${D}"/var/log/${PN} \
|
||||
"${D}"/usr/share/doc/${PN} || die
|
||||
|
||||
if use build-client; then
|
||||
cp -a ${S}/dist/${PN} "${D}"/usr/share/webapps/ || die
|
||||
else
|
||||
install -dm755 "${D}"/usr/share/webapps/${PN} || die
|
||||
cp -a ${PN}/client ${PN}/fonts ${PN}/i18n ${PN}/templates "${D}"/usr/share/webapps/${PN} || die
|
||||
fi
|
||||
|
||||
rm -rf \
|
||||
${D}/usr/share/webapps/${PN}/logs \
|
||||
${D}/usr/share/webapps/${PN}/plugins \
|
||||
${D}/usr/share/webapps/${PN}/MIT-COMPILED-LICENSE.md \
|
||||
${D}/usr/share/webapps/${PN}/NOTICE.txt \
|
||||
${D}/usr/share/webapps/${PN}/README.md || die
|
||||
|
||||
keepdir /var/lib/${PN}/logs/
|
||||
keepdir /var/lib/${PN}/plugins/
|
||||
ln -s /var/lib/${PN}/logs/ ${D}/usr/share/webapps/${PN}/logs || die
|
||||
ln -s /var/lib/${PN}/plugins/ ${D}/usr/share/webapps/${PN}/plugins || die
|
||||
|
||||
insinto /etc/
|
||||
sed -e 's@"Directory": ".*"@"Directory": "/var/lib/mattermost/"@g' \
|
||||
-e 's@tcp(dockerhost:3306)@unix(/run/mysqld/mysqld.sock)@g' \
|
||||
-i "${S}/config/default.json" || die
|
||||
newins "${S}/config/default.json" mattermost.json
|
||||
|
||||
dodoc NOTICE.txt README.md
|
||||
|
||||
mv ${WORKDIR}/bin/platform ${PN}
|
||||
dobin ${PN}
|
||||
newinitd "${FILESDIR}"/${PN}.init ${PN}
|
||||
}
|
13
www-apps/mattermost/metadata.xml
Normal file
13
www-apps/mattermost/metadata.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>nemunaire@nemunai.re</email>
|
||||
<name>Pierre-Olivier Mercier</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="build-client">
|
||||
Also build the client code, instead of getting precompiled one from archive. This requires sys-apps/yarn (that doesn't work on some architectures) and network connectivity during the compilation.
|
||||
</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
Loading…
Reference in New Issue
Block a user