# Copyright 1999-2021 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/element-web networkaccess # # this avoids disabling `network-sandbox` globally. EAPI=8 DESCRIPTION="A glossy Matrix collaboration client for the web" HOMEPAGE="https://element.io/" MY_PV="${PV/_rc/-rc.}" MY_P="$PN-$MY_PV" TMP_P="element-web-$MY_PV" S="${WORKDIR}/${TMP_P}" if [[ ${PV} == "9999" ]]; then SCM="git-r3" SRC_URI="" EGIT_REPO_URI="https://github.com/vector-im/element-web.git" EGIT_BRANCH="develop" else SRC_URI="https://github.com/vector-im/element-web/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~x86" fi # TODO: inherit from webapp inherit desktop ${SCM} LICENSE="Apache-2.0 MIT BSD" SLOT="0" IUSE="" REQUIRED_USE="" RESTRICT="network-sandbox" # =dev-libs/openssl-3.0.0"; then # node:internal/crypto/hash:71 # this[kHandle] = new _Hash(algorithm, xofLen); # ^ # Error: error:0308010C:digital envelope routines::unsupported # # https://github.com/nodejs/node/commit/86d1c0cc6a5dcf57e413a1cc1c29203e87cf9a14 export NODE_OPTIONS=--openssl-legacy-provider fi 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/element/img/logos/element-logo.svg element.svg } pkg_postinst() { einfo "element-web only contains a static webapp" einfo "for the electron-executable, please install element-desktop" }