mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-10 23:52:59 -04:00
net-vpn/riseup-vpn: fix build, add keywords
workaround is to create git repo *and* set tag to PV Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
This commit is contained in:
@@ -5,11 +5,11 @@ EAPI=7
|
||||
|
||||
DOCS_BUILDER="sphinx"
|
||||
DOCS_DIR="docs"
|
||||
DOCS_AUTODOC=0
|
||||
DOCS_DEPEND="dev-python/alabaster"
|
||||
|
||||
PYTHON_COMPAT=( python3_{7,8,9} )
|
||||
|
||||
inherit desktop python-r1 docs go-module l10n xdg
|
||||
inherit desktop python-r1 docs go-module l10n virtualx xdg
|
||||
|
||||
EGO_SUM=(
|
||||
"0xacab.org/leap/shapeshifter v0.0.0-20191029173606-85d3e8ac43e2"
|
||||
@@ -64,21 +64,25 @@ SRC_URI="https://0xacab.org/leap/bitmask-vpn/-/archive/${PV}/bitmask-vpn-${PV}.t
|
||||
${EGO_SUM_SRC_URI}"
|
||||
|
||||
# Save a lot of Error 404's since this is not mirrored
|
||||
# Tests require internet access to connect to Riseup Networks
|
||||
IUSE="test"
|
||||
RESTRICT="mirror test"
|
||||
RESTRICT="mirror !test? ( test )"
|
||||
|
||||
# Generated with dev-go/golicense
|
||||
LICENSE="GPL-3 BSD-2 CC0-1.0 MIT BSD"
|
||||
KEYWORDS=""
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
SLOT="0"
|
||||
|
||||
# TODO: Get locales working, at the moment it failes
|
||||
# to build because it wants to fetch things from the internet
|
||||
PLOCALES="ar bn br ca de el en-GB en-US en es-ES es eu fa-IR fr he hu it lt nl pl pt-BR pt-PT ro ru sk sv tr ug zh-TW zh"
|
||||
|
||||
QA_PRESTRIPPED="
|
||||
/usr/bin/bitmask-vpn
|
||||
/usr/bin/bitmask-helper
|
||||
/usr/bin/bitmask-connect
|
||||
/usr/bin/riseup-vpn
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
test? ( dev-qt/qttest )
|
||||
"
|
||||
|
||||
DEPEND="
|
||||
@@ -89,12 +93,6 @@ DEPEND="
|
||||
x11-libs/gtk+:3
|
||||
dev-qt/qtdeclarative[widgets]
|
||||
dev-qt/qtquickcontrols2[widgets]
|
||||
doc? ( $(python_gen_any_dep 'dev-python/alabaster[${PYTHON_USEDEP}]') )
|
||||
"
|
||||
|
||||
BDEPEND="
|
||||
virtual/pkgconfig
|
||||
test? ( dev-qt/qttest )
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}
|
||||
@@ -110,18 +108,40 @@ PATH="/usr/lib/go/bin:${PATH}"
|
||||
|
||||
S="${WORKDIR}/bitmask-vpn-${PV}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
# build system calls git describe to get version number
|
||||
# we need to init git and set a tag according to the PV
|
||||
git init || die
|
||||
git config user.email "larry@gentoo.org" || die
|
||||
git config user.name "Larry the Cow" || die
|
||||
git add . || die
|
||||
git commit -m "init" || die
|
||||
git tag -a "${PV}" -m "${PV}" || die
|
||||
|
||||
# add autodoc to the extensions because this actually
|
||||
# does require extra dependencies
|
||||
sed -i -e "/^extensions = \[/a \ \ \ \ \'sphinx.ext.autodoc\'," docs/conf.py || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake build
|
||||
# does not build with j>1
|
||||
emake -j1 build
|
||||
docs_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# these tests require internet access to connect to Riseup Networks
|
||||
# the UI tests do work though
|
||||
#emake test
|
||||
virtx emake test_ui
|
||||
}
|
||||
|
||||
src_install() {
|
||||
einstalldocs
|
||||
|
||||
dobin "build/bin/linux/bitmask-connect"
|
||||
dobin "build/bin/linux/bitmask-helper"
|
||||
dobin "build/bin/linux/bitmask-vpn"
|
||||
dosym "bitmask-vpn" "/usr/bin/riseup-vpn"
|
||||
dobin "build/qt/release/riseup-vpn"
|
||||
|
||||
python_scriptinto /usr/sbin
|
||||
python_foreach_impl python_doscript "helpers/bitmask-root"
|
||||
@@ -129,15 +149,10 @@ src_install() {
|
||||
insinto /usr/share/polkit-1/actions
|
||||
doins "helpers/se.leap.bitmask.policy"
|
||||
|
||||
newicon -s scalable "branding/assets/riseup/icon.svg" riseup.svg
|
||||
newicon -s scalable "providers/riseup/assets/icon.svg" riseup.svg
|
||||
make_desktop_entry "${PN}" RiseupVPN riseup Network
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake test
|
||||
emake test_ui
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
go-module_pkg_postinst
|
||||
|
||||
Reference in New Issue
Block a user