1 |
commit: 7421df2888ed102b5b905b393301333c112403e9 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 7 21:39:32 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 7 21:39:32 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7421df28 |
7 |
|
8 |
net-im/prosody-modules: new package |
9 |
|
10 |
Prosody can be customized extensively using modules (plugins) to change |
11 |
its default behaviour and to add new features and functionality. |
12 |
|
13 |
This package contains all modules, which are provided and supported by |
14 |
the prosody community for all prosody users. |
15 |
|
16 |
This package supports 'savedconfig', so not all modules have to be |
17 |
installed, it not wished. |
18 |
|
19 |
Closes: https://bugs.gentoo.org/358969 |
20 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
21 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
22 |
|
23 |
net-im/prosody-modules/Manifest | 1 + |
24 |
net-im/prosody-modules/metadata.xml | 16 +++++++ |
25 |
.../prosody-modules-0_pre20201004.ebuild | 55 ++++++++++++++++++++++ |
26 |
net-im/prosody-modules/prosody-modules-9999.ebuild | 55 ++++++++++++++++++++++ |
27 |
4 files changed, 127 insertions(+) |
28 |
|
29 |
diff --git a/net-im/prosody-modules/Manifest b/net-im/prosody-modules/Manifest |
30 |
new file mode 100644 |
31 |
index 00000000000..18c71611ce9 |
32 |
--- /dev/null |
33 |
+++ b/net-im/prosody-modules/Manifest |
34 |
@@ -0,0 +1 @@ |
35 |
+DIST prosody-modules-0_pre20201004.tar.xz 1152400 BLAKE2B 66170cbeea156d8843aad2ace62294a40b6168170cd3da3b59cf660aa9d6aab743a7bfe1a5d313e83a69336ef7165a4a45ac27da9afa239a7f97413f275883fe SHA512 b4201c108b6ba5ed2404d65efa3fbb50ca1493e204b6cfe55893c19fe22a01bcb23244fa35f2c03cf52ecabdac1354aa388740fc62b5516cb2a85fdd753e9efc |
36 |
|
37 |
diff --git a/net-im/prosody-modules/metadata.xml b/net-im/prosody-modules/metadata.xml |
38 |
new file mode 100644 |
39 |
index 00000000000..fdabf81a3e5 |
40 |
--- /dev/null |
41 |
+++ b/net-im/prosody-modules/metadata.xml |
42 |
@@ -0,0 +1,16 @@ |
43 |
+<?xml version="1.0" encoding="UTF-8"?> |
44 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
45 |
+<pkgmetadata> |
46 |
+ <maintainer type="person"> |
47 |
+ <email>conikost@g.o</email> |
48 |
+ <name>Conrad Kostecki</name> |
49 |
+ </maintainer> |
50 |
+ <longdescription> |
51 |
+ Prosody can be customized extensively using modules (plugins) to change |
52 |
+ its default behaviour and to add new features and functionality. |
53 |
+ |
54 |
+ Please note that each module is in a different state of development. |
55 |
+ Some are proof-of-concept, others are quite stable and ready for production use. |
56 |
+ Be sure to read the documentation page of any module before installing it on your server. |
57 |
+ </longdescription> |
58 |
+</pkgmetadata> |
59 |
|
60 |
diff --git a/net-im/prosody-modules/prosody-modules-0_pre20201004.ebuild b/net-im/prosody-modules/prosody-modules-0_pre20201004.ebuild |
61 |
new file mode 100644 |
62 |
index 00000000000..949393ac4e6 |
63 |
--- /dev/null |
64 |
+++ b/net-im/prosody-modules/prosody-modules-0_pre20201004.ebuild |
65 |
@@ -0,0 +1,55 @@ |
66 |
+# Copyright 2020 Gentoo Authors |
67 |
+# Distributed under the terms of the GNU General Public License v2 |
68 |
+ |
69 |
+EAPI=7 |
70 |
+ |
71 |
+inherit savedconfig |
72 |
+ |
73 |
+DESCRIPTION="A collection of community-maintained modules for Prosody" |
74 |
+HOMEPAGE="https://modules.prosody.im" |
75 |
+SRC_URI="https://dev.gentoo.org/~conikost/distfiles/${P}.tar.xz" |
76 |
+S="${WORKDIR}/${PN}" |
77 |
+ |
78 |
+LICENSE="MIT" |
79 |
+SLOT="0" |
80 |
+KEYWORDS="~amd64 ~arm ~x86" |
81 |
+ |
82 |
+RDEPEND="net-im/prosody" |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ default |
86 |
+ |
87 |
+ # Exclude 'misc' folder from install, since it does not provide any modules. |
88 |
+ echo "# Remove all modules from this list, which you don't want to install." > prosody-modules.conf || die |
89 |
+ find * -maxdepth 0 -type d ! -name misc >> prosody-modules.conf || die |
90 |
+ |
91 |
+ use savedconfig && restore_config prosody-modules.conf |
92 |
+} |
93 |
+ |
94 |
+src_install() { |
95 |
+ insinto "/usr/$(get_libdir)/prosody/community-modules" |
96 |
+ while read prosody_module; do |
97 |
+ if ! [[ "${prosody_module}" = \#* ]]; then |
98 |
+ if [[ -f "${prosody_module}/README.markdown" ]]; then |
99 |
+ newdoc "${prosody_module}/README.markdown" "README.${prosody_module}" |
100 |
+ rm "${prosody_module}/README.markdown" || die |
101 |
+ fi |
102 |
+ |
103 |
+ doins -r "${prosody_module}" |
104 |
+ fi |
105 |
+ done <prosody-modules.conf |
106 |
+ |
107 |
+ save_config prosody-modules.conf |
108 |
+ |
109 |
+ einstalldocs |
110 |
+} |
111 |
+ |
112 |
+pkg_postinst() { |
113 |
+ savedconfig_pkg_postinst |
114 |
+ |
115 |
+ einfo "In order to use the community modules on an existing instance, you have to add" |
116 |
+ einfo "'/usr/$(get_libdir)/prosody/community-modules' into 'plugin_paths'" |
117 |
+ einfo "into your prosody configuration file '/etc/jabber/prosody.cfg.lua.'" |
118 |
+ einfo "" |
119 |
+ einfo "Example: plugin_paths = { /usr/$(get_libdir)/prosody/community-modules };" |
120 |
+} |
121 |
|
122 |
diff --git a/net-im/prosody-modules/prosody-modules-9999.ebuild b/net-im/prosody-modules/prosody-modules-9999.ebuild |
123 |
new file mode 100644 |
124 |
index 00000000000..5759297af38 |
125 |
--- /dev/null |
126 |
+++ b/net-im/prosody-modules/prosody-modules-9999.ebuild |
127 |
@@ -0,0 +1,55 @@ |
128 |
+# Copyright 2020 Gentoo Authors |
129 |
+# Distributed under the terms of the GNU General Public License v2 |
130 |
+ |
131 |
+EAPI=7 |
132 |
+ |
133 |
+inherit mercurial savedconfig |
134 |
+ |
135 |
+EHG_REPO_URI="https://hg.prosody.im/${PN}/" |
136 |
+ |
137 |
+DESCRIPTION="A collection of community-maintained modules for Prosody" |
138 |
+HOMEPAGE="https://modules.prosody.im" |
139 |
+ |
140 |
+LICENSE="MIT" |
141 |
+SLOT="0" |
142 |
+KEYWORDS="" |
143 |
+ |
144 |
+RDEPEND="net-im/prosody" |
145 |
+ |
146 |
+src_prepare() { |
147 |
+ default |
148 |
+ |
149 |
+ # Exclude 'misc' folder from install, since it does not provide any modules. |
150 |
+ echo "# Remove all modules from this list, which you don't want to install." > prosody-modules.conf || die |
151 |
+ find * -maxdepth 0 -type d ! -name misc >> prosody-modules.conf || die |
152 |
+ |
153 |
+ use savedconfig && restore_config prosody-modules.conf |
154 |
+} |
155 |
+ |
156 |
+src_install() { |
157 |
+ insinto "/usr/$(get_libdir)/prosody/community-modules" |
158 |
+ while read prosody_module; do |
159 |
+ if ! [[ "${prosody_module}" = \#* ]]; then |
160 |
+ if [[ -f "${prosody_module}/README.markdown" ]]; then |
161 |
+ newdoc "${prosody_module}/README.markdown" "README.${prosody_module}" |
162 |
+ rm "${prosody_module}/README.markdown" || die |
163 |
+ fi |
164 |
+ |
165 |
+ doins -r "${prosody_module}" |
166 |
+ fi |
167 |
+ done <prosody-modules.conf |
168 |
+ |
169 |
+ save_config prosody-modules.conf |
170 |
+ |
171 |
+ einstalldocs |
172 |
+} |
173 |
+ |
174 |
+pkg_postinst() { |
175 |
+ savedconfig_pkg_postinst |
176 |
+ |
177 |
+ einfo "In order to use the community modules on an existing instance, you have to add" |
178 |
+ einfo "'/usr/$(get_libdir)/prosody/community-modules' into 'plugin_paths'" |
179 |
+ einfo "into your prosody configuration file '/etc/jabber/prosody.cfg.lua.'" |
180 |
+ einfo "" |
181 |
+ einfo "Example: plugin_paths = { /usr/$(get_libdir)/prosody/community-modules };" |
182 |
+} |