2020-04-21 09:20:54 +02:00
|
|
|
# Copyright 2020 Gentoo Authors
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=7
|
|
|
|
|
2020-04-22 19:48:13 +02:00
|
|
|
inherit savedconfig webapp
|
2020-04-21 09:20:54 +02:00
|
|
|
|
|
|
|
MY_PN="${PN/-/.}"
|
|
|
|
MY_P="${MY_PN}-${PV}"
|
|
|
|
DESCRIPTION="Free and open-source browser XMPP chat client"
|
|
|
|
HOMEPAGE="https://conversejs.org/"
|
|
|
|
MY_GITHUB_AUTHOR="conversejs"
|
|
|
|
SRC_URI="https://github.com/${MY_GITHUB_AUTHOR}/${MY_PN}/releases/download/v${PV}/${MY_P}.tgz"
|
|
|
|
|
|
|
|
LICENSE="MPL-2.0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
2020-04-22 19:48:13 +02:00
|
|
|
IUSE="+omemo"
|
|
|
|
REQUIRED_USE="omemo? ( savedconfig )"
|
2020-04-21 09:20:54 +02:00
|
|
|
|
2020-04-22 19:48:13 +02:00
|
|
|
DEPEND="omemo? ( www-apps/libsignal-protocol-javascript )"
|
2020-04-21 09:20:54 +02:00
|
|
|
RDEPEND="${DEPEND}"
|
|
|
|
BDEPEND=""
|
|
|
|
|
|
|
|
S="${WORKDIR}/package"
|
|
|
|
|
2020-04-22 19:48:13 +02:00
|
|
|
src_prepare() {
|
|
|
|
default
|
|
|
|
|
|
|
|
restore_config index.html
|
|
|
|
}
|
|
|
|
|
2020-04-21 09:20:54 +02:00
|
|
|
src_install() {
|
|
|
|
webapp_src_preinst
|
|
|
|
|
|
|
|
dodoc README.md
|
|
|
|
rm -f README.md
|
|
|
|
|
2020-04-22 20:25:18 +02:00
|
|
|
use savedconfig && save_config index.html || doins "${FILESDIR}/index.html"
|
|
|
|
|
2020-04-21 09:20:54 +02:00
|
|
|
insinto "${MY_HTDOCSDIR}/"
|
|
|
|
doins -r .
|
2020-04-22 19:48:13 +02:00
|
|
|
|
2020-04-21 09:20:54 +02:00
|
|
|
webapp_src_install
|
|
|
|
}
|
2020-04-22 19:48:13 +02:00
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
use omemo &&
|
|
|
|
einfo "To enable OMEMO encryption, you have to edit index.html to add"
|
|
|
|
einfo " omemo_default: 'true'"
|
|
|
|
einfo "in converse.initialize and"
|
|
|
|
einfo " <script type=\"text/javascript\" src=\"libsignal-protocol-javascript/dist/libsignal-protocol.js\">"
|
|
|
|
einfo "in <head>."
|
|
|
|
}
|