summaryrefslogtreecommitdiff
blob: 9fa65b5197fd39726a3f87bda5b8459a65a76e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{8,9,10} )
inherit python-any-r1

DESCRIPTION="HTML5 client to connect to any xpra server"
HOMEPAGE="https://xpra.org/"
SRC_URI="https://github.com/Xpra-org/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="brotli +gzip minify"

BDEPEND="
	${PYTHON_DEPS}
	brotli? ( app-arch/brotli )
	minify? ( dev-util/uglifyjs )
"

src_configure() {
	cat <<EOF > vcs-info || die
BRANCH=gentoo
REVISION=${PR#r}
LOCAL_MODIFICATIONS=0
EOF
}

src_install() {
	"${PYTHON}" <<EOF || die
import setup
setup.set_version("${PV}")
setup.install_html5(
	"${ED}/usr/share/xpra/www",
	"$(usex minify uglifyjs copy)",
	brotli=$(usex brotli True False),
	gzip=$(usex gzip True False)
)
EOF
}