Replace riot

This commit is contained in:
Sergey Morozov 2020-05-30 20:14:51 +03:00
parent b69783cc4c
commit 4eb76f0230
5 changed files with 223 additions and 83 deletions

View File

@ -0,0 +1,2 @@
DIST riot-desktop-1.6.2.tar.gz 401236 BLAKE2B 0df29f11778d85988b4368de974c2e3ce62b3dfdda4b0c063def27d6bad9ed01814fb85c195aedfc0133b5da34fb49ddb5935fd0ef7149f274f76fcb75056791 SHA512 9709a4704aaef0e670c734c17d2499cd3299cd6cfc3160cda2a9f88954823a47874d619442e25c4f4a35182174db939f95017977af62037471daeae7b61ee666
EBUILD riot-desktop-1.6.2.ebuild 2358 BLAKE2B 0da8789dd31cf5291d190a18e36f1504df0638e3b920c46331d1c0a5d4049c8fec64b8fde857ad1ed30be39600669e41770fe8f7f8ca124bba49c1828ee73d32 SHA512 0496b78fac5ce8d93379617af40aae48d6fe3a9867f9843a2d97f54dfbaf848518716d8de71cb28f2c3e71e7fefb144bcb923957c151dc92066e31a1f4ff245c

View File

@ -0,0 +1,113 @@
# Copyright 1999-2020 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# NETWORK ACCESS
#
# this ebuild requires internet access! because javascript packaging.
#
# to allow network access just for this package:
#
# * /etc/portage/env/networkaccess:
# FEATURES="${FEATURES} -network-sandbox"
#
# * /etc/portage/package.env/package.env:
# net-im/riot-desktop networkaccess
#
# this avoids disabling `network-sandbox` globally.
EAPI=7
DESCRIPTION="A glossy Matrix collaboration client for desktop"
HOMEPAGE="https://riot.im"
MY_PV="${PV/_rc/-rc.}"
MY_P="$PN-$MY_PV"
S="${WORKDIR}/${MY_P}"
if [[ ${PV} == "9999" ]]; then
SCM="git-r3"
SRC_URI=""
EGIT_REPO_URI="https://github.com/vector-im/riot-desktop.git"
EGIT_BRANCH="develop"
else
SRC_URI="https://github.com/vector-im/riot-desktop/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
inherit eutils desktop xdg-utils ${SCM}
LICENSE="Apache-2.0 MIT BSD"
SLOT="0"
IUSE="+native-extensions"
REQUIRED_USE=""
# get dependencies via readelf -a riot-desktop...
RDEPEND="
x11-libs/cairo
x11-libs/pango
media-libs/fontconfig
=net-im/riot-web-${PV}
"
DEPEND="
${RDEPEND}
sys-apps/yarn
native-extensions? ( dev-db/sqlcipher virtual/rust )
"
src_prepare() {
default
sed -i 's@"https://packages.riot.im/desktop/update/"@null@g' ${S}/riot.im/release/config.json
yarn install || die "yarn module installation failed"
}
src_compile() {
if use native-extensions; then
yarn run build:native || die "native extensions build failed"
fi
yarn run build || die "build failed"
}
src_install() {
dodoc LICENSE*
insinto opt/${PN}
exeinto opt/${PN}
pushd ${S}/dist/linux-unpacked
doins -r locales resources
doins *.{pak,bin,dat}
# `ldd riot-desktop` says only libffmpeg.so is needed
doins libffmpeg.so
doexe ${PN}
popd
# symlink to the actual webapp
dosym ../../../usr/share/webapps/riot-web opt/${PN}/resources/webapp
# config symlink
dosym /etc/${PN}/config.json etc/webapps/riot-web/config.json
insinto etc/${PN}
doins ${S}/riot.im/release/config.json
# symlink to main binary
dosym ../../opt/${PN}/${PN} usr/bin/${PN}
make_desktop_entry /usr/bin/${PN} Riot riot-im.svg
}
pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
}
pkg_postrm() {
xdg_icon_cache_update
xdg_desktop_database_update
}

View File

@ -1 +1,2 @@
EBUILD riot-web-9999.ebuild 1762 BLAKE2B 01eaf55d44ffb5c327cbdb406445373a019949a8887f5e9f6b75bcbef3755bbd0c299c335d85ffaa108a808291f9e45c6ec7e25e01c0836ad28e56c9150bf238 SHA512 26779f6e3d7fcb1f996af08e75d535da1f9f7db0168d8c0bfd19b693331e4e39e20466d952bbdb5c29fbabdbaa66eac1fc173b9bf403bbafdc1891209692fa41
DIST riot-web-1.6.2.tar.gz 1150424 BLAKE2B 47436ac75160338abe2c38991256fb4ee6587433d6635e36d761c2d01c35cbc8a9585756da1bd9681c9385828661e0b4d9eeb8fd49bf6b6d70329b1aa205b024 SHA512 0b6287f806f14b7408315d34935b7f7f5f36d23e3bf5870141747ec988c9f30acfc74281103369b7b2ee30709c4a89c998c7855a917fd0cedd455dd0156128ec
EBUILD riot-web-1.6.2.ebuild 2159 BLAKE2B daac5ad125db9b6e100290de1bb9c047cb911aa0cb8c7b206c98974fe7d8458fd14fee93bd57181080da4eae1e686cd22331f521e91028bba1d9a8bf8d404823 SHA512 b48de6ed23f1be7e1dc3dddada2188adadc28680c03e93f189d88b3647944f74ac93b2ae7dd9b278d2647f9c2b9a09c75c55f8bebc0f07a10ba279c0d44377db

View File

@ -0,0 +1,106 @@
# Copyright 1999-2020 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# NETWORK ACCESS
#
# this ebuild requires internet access! because javascript packaging.
#
# to allow network access just for this package:
#
# * /etc/portage/env/networkaccess:
# FEATURES="${FEATURES} -network-sandbox"
#
# * /etc/portage/package.env/package.env:
# net-im/riot-web networkaccess
#
# this avoids disabling `network-sandbox` globally.
EAPI=7
DESCRIPTION="A glossy Matrix collaboration client for the web"
HOMEPAGE="https://riot.im"
MY_PV="${PV/_rc/-rc.}"
MY_P="$PN-$MY_PV"
S="${WORKDIR}/${MY_P}"
if [[ ${PV} == "9999" ]]; then
SCM="git-r3"
SRC_URI=""
EGIT_REPO_URI="https://github.com/vector-im/riot-web.git"
EGIT_BRANCH="develop"
else
SRC_URI="https://github.com/vector-im/riot-web/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
# TODO: inherit from webapp
inherit eutils desktop ${SCM}
LICENSE="Apache-2.0 MIT BSD"
SLOT="0"
IUSE=""
REQUIRED_USE=""
# get dependencies via readelf -a riot-web...
RDEPEND="
x11-libs/cairo
x11-libs/pango
media-libs/fontconfig
"
DEPEND="${RDEPEND}
sys-apps/yarn
"
src_prepare() {
default
yarn install || die "yarn module installation failed"
if [[ ${PV} == "9999" ]]; then
pushd ${S}/node_modules/
rm -rf matrix-js-sdk
git clone https://github.com/matrix-org/matrix-js-sdk --branch develop
pushd matrix-js-sdk
yarn install
popd
popd
fi
if [[ ${PV} == "9999" ]]; then
pushd ${S}/node_modules/
rm -rf matrix-react-sdk
git clone https://github.com/matrix-org/matrix-react-sdk --branch develop
pushd matrix-react-sdk
yarn install
popd
popd
fi
}
src_compile() {
yarn run build || die "build failed"
}
src_install() {
insinto usr/share/webapps/${PN}
dodoc LICENSE*
doins -r webapp/*
insinto etc/webapps/${PN}
doins config.sample.json
dosym etc/webapps/${PN}/config.json ../../../usr/share/webapps/${PN}/config.json
newicon res/themes/riot/img/logos/riot-im-logo.svg riot-im.svg
}
pkg_postinst() {
einfo "riot-web only contains a static webapp"
einfo "for the electron-executable, please install riot-desktop"
}

View File

@ -1,82 +0,0 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="A glossy Matrix collaboration client for the web"
HOMEPAGE="https://riot.im"
inherit eutils gnome2-utils
if [[ ${PV} == "9999" ]]; then
echo PV=9999
inherit git-r3
SRC_URI=""
EGIT_REPO_URI="https://github.com/vector-im/riot-web.git"
EGIT_BRANCH="develop"
else
SRC_URI="https://github.com/vector-im/riot-web/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="Apache-2.0"
SLOT="0"
IUSE="+emoji"
REQUIRED_USE=""
DEPEND="sys-devel/binutils:*
net-libs/nodejs
sys-apps/yarn
x11-libs/libXScrnSaver
net-print/cups
dev-libs/nss
gnome-base/gconf
emoji? ( >=media-fonts/noto-emoji-20180823 )"
RDEPEND="${DEPEND}"
QA_PREBUILT="
opt/Riot/libffmpeg.so
opt/Riot/libnode.so
opt/Riot/riot-web"
DESTINATION="/" # We build and unpack a Debian installer, which already has everything in the proper directories {usr,opt}, so we just set the destination to "/"
src_prepare() {
default
if [[ ${PV} == "9999" ]]; then
"${S}"/scripts/fetch-develop.deps.sh
fi
yarn install || die "Yarn module installation failed"
cp "${S}"/config.sample.json "${S}"/config.json
}
src_compile() {
yarn run build || die "Build failed"
"${S}"/node_modules/.bin/electron-builder --linux --x64 || die "Bundling failed"
}
src_install() {
ar x "${S}"/electron_app/dist/riot-web*.deb
tar xvf data.tar.xz
mv usr/share/doc/${PN} usr/share/doc/${PF}
gunzip usr/share/doc/${PF}/changelog.gz
insinto ${DESTINATION}
doins -r usr
doins -r opt
fperms +x /opt/Riot/${PN}
dosym ${DESTINATION}/opt/Riot/${PN} ${DESTINATION}/usr/bin/${PN}
}
pkg_postinst() {
gnome2_icon_cache_update
}
pkg_postrm() {
gnome2_icon_cache_update
}