diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2023-02-21 20:12:14 +0100 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2023-02-21 21:03:04 +0100 |
commit | 85d123709dfdcba647c2d0a9d5c3edf53bab283c (patch) | |
tree | e51ea94881f73ee093db75d29ca007a763b8f6a5 /net-im/prosody-modules/prosody-modules-0_pre20230221.ebuild | |
parent | net-im/prosody: add 0.12.3 (diff) | |
download | gentoo-85d123709dfdcba647c2d0a9d5c3edf53bab283c.tar.gz gentoo-85d123709dfdcba647c2d0a9d5c3edf53bab283c.tar.bz2 gentoo-85d123709dfdcba647c2d0a9d5c3edf53bab283c.zip |
net-im/prosody-modules: add 0_pre20230221
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-im/prosody-modules/prosody-modules-0_pre20230221.ebuild')
-rw-r--r-- | net-im/prosody-modules/prosody-modules-0_pre20230221.ebuild | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/net-im/prosody-modules/prosody-modules-0_pre20230221.ebuild b/net-im/prosody-modules/prosody-modules-0_pre20230221.ebuild new file mode 100644 index 000000000000..9b0ba076aa2b --- /dev/null +++ b/net-im/prosody-modules/prosody-modules-0_pre20230221.ebuild @@ -0,0 +1,55 @@ +# Copyright 2020-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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 ~arm64 ~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/modules\", \"/usr/$(get_libdir)/prosody/community-modules\" };" +} |