www-apps/mattermost: bump to 5.0.0

This commit is contained in:
nemunaire 2018-06-26 23:27:39 +02:00
parent 9487e88189
commit 3cd2b4d936
2 changed files with 120 additions and 0 deletions

View File

@ -1,6 +1,10 @@
AUX mattermost.init 524 BLAKE2B a56c5474c4699c97923df90623591d77b19dce3a23a84c83389250baefffce97837ed588ae530bb7b1087a3be2a1f15beeb8e2220d196cfe45ab751329411b06 SHA512 7863e337f418d4b08ee25be1fe203ab85feb688cddbbe99dae9b50b268334e7e75291db117bfa12a5193826a9c8dac849e66ca80f4f2bec0ba74c1212d11e056
DIST mattermost-4.10.1-webapp.tar.gz 20468457 BLAKE2B c3701afb3ebd81518345c6bacfa08904ddecd5103d82206aa9bf0c28aa6e19f99be436c9112e555d20b3278aa5d323b47808a584baa1145a6a638249a6b1f452 SHA512 98d0faddbdd86e5e93b3b0acea040ac44a042a75ca92a8be66bf82aef3e41240e8e4fe0e9b22b33a1e9d87806a6820d4a7cc78bdb0762dd40eb4e0da09f490dc
DIST mattermost-4.10.1.tar.gz 39796610 BLAKE2B a4253bf23b039185db8b739bf01abeea604c19f701505ce3725396d1421556d8b9f273b3419e2d50765ee8c6479be3318a3ade0dfe6a52a5a96762f23bf308cb SHA512 a4da2063a7ccda749f2bb3b90e6af285603c021196085e87ee95bd055ff450b1b4e63a1938fd373fe0d99bf1ed3969179328ebf980b75f241ced9b820ea5d1bf
DIST mattermost-5.0.0-webapp.tar.gz 20585027 BLAKE2B d7d608dd23b28a0d117cc6885e1bd576e4141de5f5e7aa3eeb4045508579bc41fb16cd7a3e34cd58cc415fdfc2ae11fd89ded37de3795467885b3cde555e3c96 SHA512 a5b3752af7a6d70c8b9da32082a145bc9007723a29bacc546c9a12695db802a4420d95e97ef46eead84b1f30d252d9e4dda15fc54eaf27594fee4a4ee481de50
DIST mattermost-5.0.0.tar.gz 39831672 BLAKE2B 12e312374adb5f232e268e4d1bb212055c3f141b9fe3325b9d2e5eda316b3de9cc0c7d7f7fbc2097ed615483f82522d475a62bbe5d7cf7e2d83d4ac5fba3f64d SHA512 3a865d20f0fa2f3972ed3b4514c7fc368c40b273b0d168ea6680e5d0c5945f03d68e402217a7290190f674811e5b46361170047ba04ebb061a79e8a773019332
DIST mattermost-team-4.10.1-linux-amd64.tar.gz 47038536 BLAKE2B ec9ccee0da7a6ab08f7654e1c0a79fd000c4aa95a208ce15646a9f748425acf3ef3f36fcddbdbcf9541ba15e5f25b7aa6b629f32a0191eabf309ab8d8b273eac SHA512 ad4da45b5b0d1a04df0ed862e3f169f0c29c15631f39a40b58ab7e98d5b0ec09b66c8fb4f85a3f09acc3c4a34e5f7d9a7208fc2af7d4ee64710a415f6abdae76
DIST mattermost-team-5.0.0-linux-amd64.tar.gz 44994593 BLAKE2B e325a8b3daff22fdf2f4bcb2ece6dcf3af02ee01b8092390626efa0fdb94de7bdfe3b5705bdcebdabbb98bad7f0917351b3c3cdbc6b701d93ae1c64bbabc877e SHA512 5177315b6bc17bad012bc7880a8c9d4bc163f75ac964b7475781aa44acf9e8c854bfea820a038312a81c28be5e241e13136e292b6b3c2187307a5ec781cc7c82
EBUILD mattermost-4.10.1.ebuild 3844 BLAKE2B 2bc4643d7bf23f0e46251dcb4025f766b1e23a30b0b88f1235ac627f46029d66f423ff83a29bcba14b081fd98ec21cc3d9861df0bb6c98e82ab51d5d8cf1b1f0 SHA512 228ee748dfa5b0a5bb3e4071f4c2c091851579edec7b405b8b6ed06e5f52b65c64106931cde744625e4464988ad3eb5cf1caac29dd6fbc39f11c50fef06cf486
EBUILD mattermost-5.0.0.ebuild 3825 BLAKE2B 0f52747fa6ff2e1daf39985df1347305e824681810bb239f683a0b1547b87a98b5750ff4ae08afc475455a9c055529ffb604ef6e42d58417fd248f6b66993151 SHA512 d54e241b256d970e3e007aa6a7787c13ed5195b786761894668c0c06371d08c65f65f90792e1880b41ae129db5ee578761a7475f6d640a596cdaead9f5a3fd55
MISC metadata.xml 511 BLAKE2B 072d543a0ca6f8b747549d6802bc2089a2e6d59640a18ee7de6d98e40f4323d7710b5934d710fb93082f06f1ea871711bfccdb3b9dd493c5d16577c1782301a7 SHA512 16203ac2d505933f68efd3f4d137646f1593210b37f0e1cd05420b92f1c64b6235231559f1917075287c85c0a1944f8abd45d2c727502b904e5e229c8238c361

View File

@ -0,0 +1,116 @@
# 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 "s/amd64/386/"
;;
armv8*|aarch64*)
sed -r -i ${S}/build/release.mk \
-e "s/amd64/arm64/"
;;
arm*)
sed -r -i ${S}/build/release.mk \
-e "s/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
}
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 ${WORKDIR}/${PN}/client ${WORKDIR}/${PN}/fonts ${WORKDIR}/${PN}/i18n ${WORKDIR}/${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/log/${PN}/
keepdir /var/lib/${PN}/plugins/
ln -s /var/log/${PN}/ ${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
dobin ${WORKDIR}/bin/${PN}
newinitd "${FILESDIR}"/${PN}.init ${PN}
}