1 |
commit: a7c01843ba339d47ec244309c2d343ebf6b65b28 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 23 15:44:11 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 23 15:44:11 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7c01843 |
7 |
|
8 |
net-im/prosody: fix systemd unit |
9 |
|
10 |
Closes: https://bugs.gentoo.org/750539 |
11 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
net-im/prosody/files/prosody.service-r2 | 13 +++++ |
15 |
net-im/prosody/prosody-0.11.7-r2.ebuild | 96 +++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 109 insertions(+) |
17 |
|
18 |
diff --git a/net-im/prosody/files/prosody.service-r2 b/net-im/prosody/files/prosody.service-r2 |
19 |
new file mode 100644 |
20 |
index 00000000000..81408beefe5 |
21 |
--- /dev/null |
22 |
+++ b/net-im/prosody/files/prosody.service-r2 |
23 |
@@ -0,0 +1,13 @@ |
24 |
+[Unit] |
25 |
+Description=Prosody XMPP server |
26 |
+After=network.target |
27 |
+ |
28 |
+[Service] |
29 |
+Group=jabber |
30 |
+PIDFile=/run/jabber/prosody.pid |
31 |
+ExecStart=/usr/bin/prosody |
32 |
+ExecReload=/bin/kill -HUP $MAINPID |
33 |
+User=jabber |
34 |
+ |
35 |
+[Install] |
36 |
+WantedBy=multi-user.target |
37 |
|
38 |
diff --git a/net-im/prosody/prosody-0.11.7-r2.ebuild b/net-im/prosody/prosody-0.11.7-r2.ebuild |
39 |
new file mode 100644 |
40 |
index 00000000000..4495eed2ee3 |
41 |
--- /dev/null |
42 |
+++ b/net-im/prosody/prosody-0.11.7-r2.ebuild |
43 |
@@ -0,0 +1,96 @@ |
44 |
+# Copyright 1999-2020 Gentoo Authors |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+ |
47 |
+EAPI=7 |
48 |
+ |
49 |
+inherit systemd tmpfiles toolchain-funcs |
50 |
+ |
51 |
+DESCRIPTION="Prosody is a modern XMPP communication server" |
52 |
+HOMEPAGE="https://prosody.im/" |
53 |
+SRC_URI="https://prosody.im/downloads/source/${P}.tar.gz" |
54 |
+ |
55 |
+LICENSE="MIT" |
56 |
+SLOT="0" |
57 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
58 |
+IUSE="+libevent libressl luajit mysql postgres +sqlite +ssl test +zlib" |
59 |
+RESTRICT="!test? ( test )" |
60 |
+ |
61 |
+COMMON_DEPEND=" |
62 |
+ || ( |
63 |
+ >=dev-lang/lua-5.2:* |
64 |
+ dev-lua/lua-bit32 |
65 |
+ ) |
66 |
+ net-dns/libidn |
67 |
+ net-im/jabber-base |
68 |
+ libressl? ( dev-libs/libressl:= ) |
69 |
+ !libressl? ( dev-libs/openssl:0= ) |
70 |
+ luajit? ( dev-lang/luajit:2 ) |
71 |
+ !luajit? ( dev-lang/lua:0 ) |
72 |
+" |
73 |
+ |
74 |
+DEPEND=" |
75 |
+ ${COMMON_DEPEND} |
76 |
+ test? ( dev-lua/busted ) |
77 |
+" |
78 |
+ |
79 |
+RDEPEND=" |
80 |
+ ${COMMON_DEPEND} |
81 |
+ dev-lua/luaexpat |
82 |
+ dev-lua/luafilesystem |
83 |
+ dev-lua/luasocket |
84 |
+ libevent? ( dev-lua/luaevent ) |
85 |
+ mysql? ( dev-lua/luadbi[mysql] ) |
86 |
+ postgres? ( dev-lua/luadbi[postgres] ) |
87 |
+ sqlite? ( dev-lua/luadbi[sqlite] ) |
88 |
+ ssl? ( dev-lua/luasec ) |
89 |
+ zlib? ( dev-lua/lua-zlib ) |
90 |
+" |
91 |
+ |
92 |
+PATCHES=( |
93 |
+ "${FILESDIR}/${PN}-0.11.7-bit32.patch" |
94 |
+ "${FILESDIR}/${PN}-0.11.7-gentoo.patch" |
95 |
+) |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ default |
99 |
+ |
100 |
+ # Set correct plugin path for optional net-im/prosody-modules package |
101 |
+ sed -e "s/GENTOO_LIBDIR/$(get_libdir)/g" -i prosody.cfg.lua.dist || die |
102 |
+} |
103 |
+ |
104 |
+src_configure() { |
105 |
+ local myeconfargs=( |
106 |
+ --c-compiler="$(tc-getCC)" |
107 |
+ --datadir="${EPREFIX}/var/spool/jabber" |
108 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" |
109 |
+ --linker="$(tc-getCC)" |
110 |
+ --ostype="linux" |
111 |
+ --prefix="${EPREFIX}/usr" |
112 |
+ --runwith="$(usex luajit luajit lua)" |
113 |
+ --sysconfdir="${EPREFIX}/etc/jabber" |
114 |
+ --with-lua-include="${EPREFIX}/usr/include" |
115 |
+ --with-lua-lib="${EPREFIX}/usr/$(get_libdir)/lua" |
116 |
+ ) |
117 |
+ |
118 |
+ # Since the configure script is handcrafted, |
119 |
+ # and yells at unknown options, do not use 'econf'. |
120 |
+ ./configure ${myeconfargs[@]} --cflags="${CFLAGS} -Wall -fPIC" --ldflags="${LDFLAGS} -shared" || die |
121 |
+ |
122 |
+ rm makefile || die |
123 |
+ mv GNUmakefile Makefile || die |
124 |
+} |
125 |
+ |
126 |
+src_install() { |
127 |
+ default |
128 |
+ |
129 |
+ newinitd "${FILESDIR}"/prosody.initd-r4 prosody |
130 |
+ systemd_newunit "${FILESDIR}"/prosody.service-r2 prosody.service |
131 |
+ |
132 |
+ newtmpfiles "${FILESDIR}"/prosody.tmpfilesd-r1 prosody.conf |
133 |
+ |
134 |
+ keepdir /var/spool/jabber |
135 |
+} |
136 |
+ |
137 |
+pkg_postinst() { |
138 |
+ tmpfiles_process prosody.conf |
139 |
+} |