www-apps/converse-js: Add OMEMO support
Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
This commit is contained in:
parent
d534f3d10b
commit
8920ac2d9f
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
EAPI=7
|
EAPI=7
|
||||||
|
|
||||||
inherit webapp
|
inherit savedconfig webapp
|
||||||
|
|
||||||
MY_PN="${PN/-/.}"
|
MY_PN="${PN/-/.}"
|
||||||
MY_P="${MY_PN}-${PV}"
|
MY_P="${MY_PN}-${PV}"
|
||||||
|
@ -14,14 +14,21 @@ SRC_URI="https://github.com/${MY_GITHUB_AUTHOR}/${MY_PN}/releases/download/v${PV
|
||||||
|
|
||||||
LICENSE="MPL-2.0"
|
LICENSE="MPL-2.0"
|
||||||
KEYWORDS="~amd64 ~x86"
|
KEYWORDS="~amd64 ~x86"
|
||||||
IUSE=""
|
IUSE="+omemo"
|
||||||
|
REQUIRED_USE="omemo? ( savedconfig )"
|
||||||
|
|
||||||
DEPEND=""
|
DEPEND="omemo? ( www-apps/libsignal-protocol-javascript )"
|
||||||
RDEPEND="${DEPEND}"
|
RDEPEND="${DEPEND}"
|
||||||
BDEPEND=""
|
BDEPEND=""
|
||||||
|
|
||||||
S="${WORKDIR}/package"
|
S="${WORKDIR}/package"
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
default
|
||||||
|
|
||||||
|
restore_config index.html
|
||||||
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
webapp_src_preinst
|
webapp_src_preinst
|
||||||
|
|
||||||
|
@ -30,7 +37,17 @@ src_install() {
|
||||||
|
|
||||||
insinto "${MY_HTDOCSDIR}/"
|
insinto "${MY_HTDOCSDIR}/"
|
||||||
doins -r .
|
doins -r .
|
||||||
doins "${FILESDIR}/index.html"
|
|
||||||
|
use savedconfig && save_config index.html || doins "${FILESDIR}/index.html"
|
||||||
|
|
||||||
webapp_src_install
|
webapp_src_install
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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>."
|
||||||
|
}
|
||||||
|
|
|
@ -5,4 +5,10 @@
|
||||||
<email>alarig@swordarmor.fr</email>
|
<email>alarig@swordarmor.fr</email>
|
||||||
<name>Alarig Le Lay</name>
|
<name>Alarig Le Lay</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="omemo">
|
||||||
|
Enable OMEMO encryption with
|
||||||
|
<pkg>www-apps/libsignal-protocol-javascript</pkg>.
|
||||||
|
</flag>
|
||||||
|
</use>
|
||||||
</pkgmetadata>
|
</pkgmetadata>
|
||||||
|
|
Loading…
Reference in a new issue