commit:     7421df2888ed102b5b905b393301333c112403e9
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  7 21:39:32 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Wed Oct  7 21:39:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7421df28

net-im/prosody-modules: new package

Prosody can be customized extensively using modules (plugins) to change
its default behaviour and to add new features and functionality.

This package contains all modules, which are provided and supported by
the prosody community for all prosody users.

This package supports 'savedconfig', so not all modules have to be
installed, it not wished.

Closes: https://bugs.gentoo.org/358969
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 net-im/prosody-modules/Manifest                    |  1 +
 net-im/prosody-modules/metadata.xml                | 16 +++++++
 .../prosody-modules-0_pre20201004.ebuild           | 55 ++++++++++++++++++++++
 net-im/prosody-modules/prosody-modules-9999.ebuild | 55 ++++++++++++++++++++++
 4 files changed, 127 insertions(+)

diff --git a/net-im/prosody-modules/Manifest b/net-im/prosody-modules/Manifest
new file mode 100644
index 00000000000..18c71611ce9
--- /dev/null
+++ b/net-im/prosody-modules/Manifest
@@ -0,0 +1 @@
+DIST prosody-modules-0_pre20201004.tar.xz 1152400 BLAKE2B 
66170cbeea156d8843aad2ace62294a40b6168170cd3da3b59cf660aa9d6aab743a7bfe1a5d313e83a69336ef7165a4a45ac27da9afa239a7f97413f275883fe
 SHA512 
b4201c108b6ba5ed2404d65efa3fbb50ca1493e204b6cfe55893c19fe22a01bcb23244fa35f2c03cf52ecabdac1354aa388740fc62b5516cb2a85fdd753e9efc

diff --git a/net-im/prosody-modules/metadata.xml 
b/net-im/prosody-modules/metadata.xml
new file mode 100644
index 00000000000..fdabf81a3e5
--- /dev/null
+++ b/net-im/prosody-modules/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Conrad Kostecki</name>
+       </maintainer>
+       <longdescription>
+               Prosody can be customized extensively using modules (plugins) 
to change
+               its default behaviour and to add new features and functionality.
+
+               Please note that each module is in a different state of 
development.
+               Some are proof-of-concept, others are quite stable and ready 
for production use.
+               Be sure to read the documentation page of any module before 
installing it on your server.
+       </longdescription>
+</pkgmetadata>

diff --git a/net-im/prosody-modules/prosody-modules-0_pre20201004.ebuild 
b/net-im/prosody-modules/prosody-modules-0_pre20201004.ebuild
new file mode 100644
index 00000000000..949393ac4e6
--- /dev/null
+++ b/net-im/prosody-modules/prosody-modules-0_pre20201004.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit savedconfig
+
+DESCRIPTION="A collection of community-maintained modules for Prosody"
+HOMEPAGE="https://modules.prosody.im";
+SRC_URI="https://dev.gentoo.org/~conikost/distfiles/${P}.tar.xz";
+S="${WORKDIR}/${PN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+RDEPEND="net-im/prosody"
+
+src_prepare() {
+       default
+
+       # Exclude 'misc' folder from install, since it does not provide any 
modules.
+       echo "# Remove all modules from this list, which you don't want to 
install." > prosody-modules.conf || die
+       find * -maxdepth 0 -type d ! -name misc >> prosody-modules.conf || die
+
+       use savedconfig && restore_config prosody-modules.conf
+}
+
+src_install() {
+       insinto "/usr/$(get_libdir)/prosody/community-modules"
+       while read prosody_module; do
+               if ! [[ "${prosody_module}" = \#* ]]; then
+                       if [[ -f "${prosody_module}/README.markdown" ]]; then
+                               newdoc "${prosody_module}/README.markdown" 
"README.${prosody_module}"
+                               rm "${prosody_module}/README.markdown" || die
+                       fi
+
+                       doins -r "${prosody_module}"
+               fi
+       done <prosody-modules.conf
+
+       save_config prosody-modules.conf
+
+       einstalldocs
+}
+
+pkg_postinst() {
+       savedconfig_pkg_postinst
+
+       einfo "In order to use the community modules on an existing instance, 
you have to add"
+       einfo "'/usr/$(get_libdir)/prosody/community-modules' into 
'plugin_paths'"
+       einfo "into your prosody configuration file 
'/etc/jabber/prosody.cfg.lua.'"
+       einfo ""
+       einfo "Example: plugin_paths = { 
/usr/$(get_libdir)/prosody/community-modules };"
+}

diff --git a/net-im/prosody-modules/prosody-modules-9999.ebuild 
b/net-im/prosody-modules/prosody-modules-9999.ebuild
new file mode 100644
index 00000000000..5759297af38
--- /dev/null
+++ b/net-im/prosody-modules/prosody-modules-9999.ebuild
@@ -0,0 +1,55 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit mercurial savedconfig
+
+EHG_REPO_URI="https://hg.prosody.im/${PN}/";
+
+DESCRIPTION="A collection of community-maintained modules for Prosody"
+HOMEPAGE="https://modules.prosody.im";
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+
+RDEPEND="net-im/prosody"
+
+src_prepare() {
+       default
+
+       # Exclude 'misc' folder from install, since it does not provide any 
modules.
+       echo "# Remove all modules from this list, which you don't want to 
install." > prosody-modules.conf || die
+       find * -maxdepth 0 -type d ! -name misc >> prosody-modules.conf || die
+
+       use savedconfig && restore_config prosody-modules.conf
+}
+
+src_install() {
+       insinto "/usr/$(get_libdir)/prosody/community-modules"
+       while read prosody_module; do
+               if ! [[ "${prosody_module}" = \#* ]]; then
+                       if [[ -f "${prosody_module}/README.markdown" ]]; then
+                               newdoc "${prosody_module}/README.markdown" 
"README.${prosody_module}"
+                               rm "${prosody_module}/README.markdown" || die
+                       fi
+
+                       doins -r "${prosody_module}"
+               fi
+       done <prosody-modules.conf
+
+       save_config prosody-modules.conf
+
+       einstalldocs
+}
+
+pkg_postinst() {
+       savedconfig_pkg_postinst
+
+       einfo "In order to use the community modules on an existing instance, 
you have to add"
+       einfo "'/usr/$(get_libdir)/prosody/community-modules' into 
'plugin_paths'"
+       einfo "into your prosody configuration file 
'/etc/jabber/prosody.cfg.lua.'"
+       einfo ""
+       einfo "Example: plugin_paths = { 
/usr/$(get_libdir)/prosody/community-modules };"
+}

Reply via email to