Add riot-web ebuilds

This commit is contained in:
rexy712 2019-10-25 13:55:20 -07:00
parent 9b8c7ff24a
commit aebe745210
5 changed files with 327 additions and 0 deletions

3
net-im/riot-web/Manifest Normal file
View File

@ -0,0 +1,3 @@
DIST riot-web-1.4.0-rc.2.tar.gz 1500710 BLAKE2B a71cbc49db1b80112c150a26126b8b8baf760b222a9ade83ee6f8cda1674b2c4fc0a210fb16fdb01828e7cc485ab71a4b3ba1e672eeb6c5fd2dda074220f8b55 SHA512 a7b8cc8ee1f8a5bdcc2261f4779500914f547dfaef9d1a60b1ffedd125d99a0bc4f3e35035f974a3b1156b2dd0d1d379a4c19718552314e9c5df6d0f9a450f64
DIST riot-web-1.4.2.tar.gz 1509372 BLAKE2B 8491674aae6a912b9b6b67318ca2eaff642525101f15c12d2dd80f76ff9d405a0673a940ba8cd08ca83871233cf4cd36f0815c6798fee92c3dbf1c35f5951888 SHA512 2911c8e8c53fdf43f393727505c6c24fcd7304189ca9a40679bdbfef7308accfca2f02e4bc1a9ffe833918dc0f25428a09733b69802546a75439d1e423df97df
DIST riot-web-1.5.0.tar.gz 1512020 BLAKE2B 0ab27789a7bdb8a1a909db8eefab43edcddff9c28bb86414dc4b7b6ad2e8253067484f5c1a3016553c3292b8d34ee6774e774091e9e63d72e99b2c552c2f72af SHA512 38c9141df97f82574dd3c9d2efa93aef382d66077071a7c007fb1bfc93e51fc2ab75f1ac0a6db6aa4b09d73a5100b6dc9ce6a9d2e8c90c2c2a2b368d077e5e3c

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>rexerton.rexy@tutamail.com</email>
<name>rexy712</name>
</maintainer>
<longdescription>
</longdescription>
<use>
<flag name="emoji">Include support for rendering emoji</flag>
<flag name="proxy">Use http_proxy environment variable with `yarn install`</flag>
</use>
</pkgmetadata>

View File

@ -0,0 +1,102 @@
# 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
if [ "${PR}" != "r0" ];then
rc_num="${PR:1}"
MY_PV="${PV}-rc.${rc_num}"
else
MY_PV="${PV}"
fi
MY_PF="${PN}-${MY_PV}"
SRC_URI="https://github.com/vector-im/riot-web/archive/v${MY_PV}.tar.gz -> ${MY_PF}.tar.gz" #change source tar file name to include package name
KEYWORDS="~amd64"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="+emoji proxy"
REQUIRED_USE=""
RESTRICT="network-sandbox" #need network sandbox disabled for `yarn install` to work
DEPEND="sys-devel/binutils:*
>=net-libs/nodejs-10.0
>=sys-apps/yarn-1.15
x11-libs/libXScrnSaver
net-print/cups
dev-libs/nss
gnome-base/gconf
emoji? ( >=media-fonts/noto-emoji-20180823 )
>=media-video/ffmpeg-4.0
|| ( dev-util/electron dev-util/electron-bin )"
RDEPEND="${DEPEND}"
DESTINATION="/opt/Riot"
#create sh file to run the webapp in an electron window
create_the_executable_file() {
echo -e '#!/bin/sh
install_location="'"${DESTINATION}"'"
if [ ! -d "$install_location" ];then
echo -n "Could not chdir to install location: " >&2
if [ ! -e "$install_location" ];then
echo "No such file or directory" >&2
else
echo "Not a directory" >&2
fi
exit 1
fi
cd "$install_location"
if [ ! -e 'index.html' ];then
echo "Could not find index.html in '$install_location'" >&2
exit 2
fi
exec electron index.html\n' > "${1}"
}
src_prepare() {
default
if use "proxy";then
yarn install || die "Yarn module installation failed"
else
http_proxy="" yarn install || die "Yarn module installation failed"
fi
if [[ "${PV}" == "9999" ]]; then
"${S}"/scripts/fetch-develop.deps.sh
fi
if [ -e "${DESTINATION}/config.json" ];then
cp "${DESTINATION}/config.json" "${S}"/config.json
else
cp "${S}"/config.sample.json "${S}"/config.json
fi
}
src_compile() {
yarn build || die "Build failed"
}
src_install() {
insinto "${DESTINATION}"
doins -r "${S}/webapp/"*
create_the_executable_file "${S}/webapp/${PN}"
insopts "-m755"
doins "${S}/webapp/${PN}"
dosym "${DESTINATION}/${PN}" "/usr/bin/${PN}"
}

View File

@ -0,0 +1,102 @@
# 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
if [ "${PR}" != "r0" ];then
rc_num="${PR:1}"
MY_PV="${PV}-rc.${rc_num}"
else
MY_PV="${PV}"
fi
MY_PF="${PN}-${MY_PV}"
SRC_URI="https://github.com/vector-im/riot-web/archive/v${MY_PV}.tar.gz -> ${MY_PF}.tar.gz" #change source tar file name to include package name
KEYWORDS="~amd64"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="+emoji proxy"
REQUIRED_USE=""
RESTRICT="network-sandbox" #need network sandbox disabled for `yarn install` to work
DEPEND="sys-devel/binutils:*
>=net-libs/nodejs-10.0
>=sys-apps/yarn-1.15
x11-libs/libXScrnSaver
net-print/cups
dev-libs/nss
gnome-base/gconf
emoji? ( >=media-fonts/noto-emoji-20180823 )
>=media-video/ffmpeg-4.0
|| ( dev-util/electron dev-util/electron-bin )"
RDEPEND="${DEPEND}"
DESTINATION="/opt/Riot"
#create sh file to run the webapp in an electron window
create_the_executable_file() {
echo -e '#!/bin/sh
install_location="'"${DESTINATION}"'"
if [ ! -d "$install_location" ];then
echo -n "Could not chdir to install location: " >&2
if [ ! -e "$install_location" ];then
echo "No such file or directory" >&2
else
echo "Not a directory" >&2
fi
exit 1
fi
cd "$install_location"
if [ ! -e 'index.html' ];then
echo "Could not find index.html in '$install_location'" >&2
exit 2
fi
exec electron index.html\n' > "${1}"
}
src_prepare() {
default
if use "proxy";then
yarn install || die "Yarn module installation failed"
else
http_proxy="" yarn install || die "Yarn module installation failed"
fi
if [[ "${PV}" == "9999" ]]; then
"${S}"/scripts/fetch-develop.deps.sh
fi
if [ -e "${DESTINATION}/config.json" ];then
cp "${DESTINATION}/config.json" "${S}"/config.json
else
cp "${S}"/config.sample.json "${S}"/config.json
fi
}
src_compile() {
yarn build || die "Build failed"
}
src_install() {
insinto "${DESTINATION}"
doins -r "${S}/webapp/"*
create_the_executable_file "${S}/webapp/${PN}"
insopts "-m755"
doins "${S}/webapp/${PN}"
dosym "${DESTINATION}/${PN}" "/usr/bin/${PN}"
}

View File

@ -0,0 +1,102 @@
# 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
if [ "${PR}" != "r0" ];then
rc_num="${PR:1}"
MY_PV="${PV}-rc.${rc_num}"
else
MY_PV="${PV}"
fi
MY_PF="${PN}-${MY_PV}"
SRC_URI="https://github.com/vector-im/riot-web/archive/v${MY_PV}.tar.gz -> ${MY_PF}.tar.gz" #change source tar file name to include package name
KEYWORDS="~amd64"
LICENSE="Apache-2.0"
SLOT="0"
IUSE="+emoji proxy"
REQUIRED_USE=""
RESTRICT="network-sandbox" #need network sandbox disabled for `yarn install` to work
DEPEND="sys-devel/binutils:*
>=net-libs/nodejs-10.0
>=sys-apps/yarn-1.15
x11-libs/libXScrnSaver
net-print/cups
dev-libs/nss
gnome-base/gconf
emoji? ( >=media-fonts/noto-emoji-20180823 )
>=media-video/ffmpeg-4.0
|| ( dev-util/electron dev-util/electron-bin )"
RDEPEND="${DEPEND}"
DESTINATION="/opt/Riot"
#create sh file to run the webapp in an electron window
create_the_executable_file() {
echo -e '#!/bin/sh
install_location="'"${DESTINATION}"'"
if [ ! -d "$install_location" ];then
echo -n "Could not chdir to install location: " >&2
if [ ! -e "$install_location" ];then
echo "No such file or directory" >&2
else
echo "Not a directory" >&2
fi
exit 1
fi
cd "$install_location"
if [ ! -e 'index.html' ];then
echo "Could not find index.html in '$install_location'" >&2
exit 2
fi
exec electron index.html\n' > "${1}"
}
src_prepare() {
default
if use "proxy";then
yarn install || die "Yarn module installation failed"
else
http_proxy="" yarn install || die "Yarn module installation failed"
fi
if [[ "${PV}" == "9999" ]]; then
"${S}"/scripts/fetch-develop.deps.sh
fi
if [ -e "${DESTINATION}/config.json" ];then
cp "${DESTINATION}/config.json" "${S}"/config.json
else
cp "${S}"/config.sample.json "${S}"/config.json
fi
}
src_compile() {
yarn build || die "Build failed"
}
src_install() {
insinto "${DESTINATION}"
doins -r "${S}/webapp/"*
create_the_executable_file "${S}/webapp/${PN}"
insopts "-m755"
doins "${S}/webapp/${PN}"
dosym "${DESTINATION}/${PN}" "/usr/bin/${PN}"
}