Add element 1.7.2

and remove riot
This commit is contained in:
Sergey Morozov
2020-07-29 02:01:48 +03:00
parent 330f54e4a3
commit c623a47d46
6 changed files with 24 additions and 23 deletions

View File

@@ -0,0 +1,2 @@
DIST element-desktop-1.7.2.tar.gz 1881622 BLAKE2B 3536035684953f3b16952febab9372116c71b84fc857a78ef83adaa1c11098a6363b1f8c1162b2bb5af98a50c9105df42c6f7791d5f02338286963f7c5621030 SHA512 bb22ef4c5876d9f290340d1b6212523e32cf6a8049d06aa5eae33b9e02547910a4e07f697fddc66be52a5ab4611e45596f0059c36393967b677a6f2c01605db8
EBUILD element-desktop-1.7.2.ebuild 2413 BLAKE2B cd1f6c642f3502ca26cba811be8abf9d99c4b1db329f0d3f33c1e1aab97c3fda210e64d7d22e1cf9a1fe5ceff87bbd0ab22f9f49d895a7339ac2d50d35d9899a SHA512 7c39bc91b118588ab26354f149c2bb784c3cafcfda445aa2085591b6ec75801dea8a4b90492d3bd47c8e6a5d6de63a7b6bf48a6c1204f9dffa6ed86e53b06937

View File

@@ -0,0 +1,114 @@
# 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/element-desktop networkaccess
#
# this avoids disabling `network-sandbox` globally.
EAPI=7
DESCRIPTION="A glossy Matrix collaboration client for desktop"
HOMEPAGE="https://element.io"
MY_PV="${PV/_rc/-rc.}"
MY_P="$PN-$MY_PV"
TMP_P="riot-desktop-$MY_PV"
S="${WORKDIR}/${TMP_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 element-desktop...
RDEPEND="
x11-libs/cairo
x11-libs/pango
media-libs/fontconfig
=net-im/element-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}/element.io/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 element-desktop` says only libffmpeg.so is needed
doins libffmpeg.so
doexe ${PN}
popd
# symlink to the actual webapp
dosym ../../../usr/share/webapps/element-web opt/${PN}/resources/webapp
# config symlink
dosym /etc/${PN}/config.json etc/webapps/element-web/config.json
insinto etc/${PN}
doins ${S}/element.io/release/config.json
# symlink to main binary
dosym ../../opt/${PN}/${PN} usr/bin/${PN}
make_desktop_entry /usr/bin/${PN} Element element
}
pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
}
pkg_postrm() {
xdg_icon_cache_update
xdg_desktop_database_update
}