1 |
commit: 7cd8c1e754dd2b5fc100520c961e084dff232d00 |
2 |
Author: xdch47 <xdch47 <AT> posteo <DOT> de> |
3 |
AuthorDate: Wed Nov 28 19:18:26 2018 +0000 |
4 |
Commit: Tobias Klausmann <klausman <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 2 17:06:21 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cd8c1e7 |
7 |
|
8 |
net-im/prosody: use get_libdir |
9 |
|
10 |
- fix libdir issue on 32 bit platforms |
11 |
- improve prefix support |
12 |
|
13 |
Closes: https://bugs.gentoo.org/672142 |
14 |
Signed-off-by: Felix Neumärker <xdch47 <AT> posteo.de> |
15 |
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org> |
16 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
17 |
|
18 |
net-im/prosody/prosody-0.11.0-r1.ebuild | 82 +++++++++++++++++++++++++++++++++ |
19 |
1 file changed, 82 insertions(+) |
20 |
|
21 |
diff --git a/net-im/prosody/prosody-0.11.0-r1.ebuild b/net-im/prosody/prosody-0.11.0-r1.ebuild |
22 |
new file mode 100644 |
23 |
index 00000000000..eccd2e1da7b |
24 |
--- /dev/null |
25 |
+++ b/net-im/prosody/prosody-0.11.0-r1.ebuild |
26 |
@@ -0,0 +1,82 @@ |
27 |
+# Copyright 1999-2018 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=7 |
31 |
+ |
32 |
+inherit flag-o-matic multilib systemd |
33 |
+ |
34 |
+MY_PV=$(ver_rs 3 '') |
35 |
+MY_P="${PN}-${MY_PV}" |
36 |
+DESCRIPTION="Prosody is a flexible communications server for Jabber/XMPP written in Lua" |
37 |
+HOMEPAGE="https://prosody.im/" |
38 |
+SRC_URI="https://prosody.im/tmp/${MY_PV}/${MY_P}.tar.gz" |
39 |
+ |
40 |
+LICENSE="MIT" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~arm ~x86" |
43 |
+IUSE="ipv6 libevent mysql postgres sqlite ssl zlib jit libressl" |
44 |
+ |
45 |
+DEPEND="net-im/jabber-base |
46 |
+ dev-lua/LuaBitOp |
47 |
+ !jit? ( >=dev-lang/lua-5.1:0 ) |
48 |
+ jit? ( dev-lang/luajit:2 ) |
49 |
+ >=net-dns/libidn-1.1:= |
50 |
+ !libressl? ( dev-libs/openssl:0 ) libressl? ( dev-libs/libressl:= )" |
51 |
+RDEPEND="${DEPEND} |
52 |
+ >=dev-lua/luaexpat-1.3.0 |
53 |
+ dev-lua/luafilesystem |
54 |
+ ipv6? ( >=dev-lua/luasocket-3 ) |
55 |
+ !ipv6? ( dev-lua/luasocket ) |
56 |
+ libevent? ( >=dev-lua/luaevent-0.4.3 ) |
57 |
+ mysql? ( dev-lua/luadbi[mysql] ) |
58 |
+ postgres? ( dev-lua/luadbi[postgres] ) |
59 |
+ sqlite? ( dev-lua/luadbi[sqlite] ) |
60 |
+ ssl? ( dev-lua/luasec ) |
61 |
+ zlib? ( dev-lua/lua-zlib )" |
62 |
+ |
63 |
+S=${WORKDIR}/${MY_P} |
64 |
+ |
65 |
+JABBER_ETC="/etc/jabber" |
66 |
+JABBER_SPOOL="/var/spool/jabber" |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ default |
70 |
+ rm makefile && mv GNUmakefile Makefile || die |
71 |
+ sed -i -e "s!MODULES = \$(DESTDIR)\$(PREFIX)/lib/!MODULES = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\ |
72 |
+ -e "s!SOURCE = \$(DESTDIR)\$(PREFIX)/lib/!SOURCE = \$(DESTDIR)\$(PREFIX)/$(get_libdir)/!"\ |
73 |
+ -e "s!INSTALLEDSOURCE = \$(PREFIX)/lib/!INSTALLEDSOURCE = \$(PREFIX)/$(get_libdir)/!"\ |
74 |
+ -e "s!INSTALLEDMODULES = \$(PREFIX)/lib/!INSTALLEDMODULES = \$(PREFIX)/$(get_libdir)/!"\ |
75 |
+ Makefile || die |
76 |
+} |
77 |
+ |
78 |
+src_configure() { |
79 |
+ # the configure script is handcrafted (and yells at unknown options) |
80 |
+ # hence do not use 'econf' |
81 |
+ append-cflags -D_GNU_SOURCE |
82 |
+ ./configure \ |
83 |
+ --ostype=linux \ |
84 |
+ --prefix="${EPREFIX}/usr" \ |
85 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
86 |
+ --sysconfdir="${EPREFIX}/${JABBER_ETC}" \ |
87 |
+ --datadir="${EPREFIX}/${JABBER_SPOOL}" \ |
88 |
+ --with-lua-include="${EPREFIX}/usr/include" \ |
89 |
+ --with-lua-lib="${EPREFIX}/usr/$(get_libdir)/lua" \ |
90 |
+ --runwith=lua"$(usev jit)" \ |
91 |
+ --cflags="${CFLAGS} -Wall -fPIC" \ |
92 |
+ --ldflags="${LDFLAGS} -shared" \ |
93 |
+ --c-compiler="$(tc-getCC)" \ |
94 |
+ --linker="$(tc-getCC)" || die "configure failed" |
95 |
+} |
96 |
+ |
97 |
+src_install() { |
98 |
+ emake DESTDIR="${D}" install |
99 |
+ systemd_dounit "${FILESDIR}/${PN}".service |
100 |
+ systemd_newtmpfilesd "${FILESDIR}/${PN}".tmpfilesd "${PN}".conf |
101 |
+ newinitd "${FILESDIR}/${PN}".initd-r2 ${PN} |
102 |
+ keepdir "${JABBER_SPOOL}" |
103 |
+} |
104 |
+ |
105 |
+pkg_postinst() { |
106 |
+ elog "If you are using the MySQL backend, you need to update its schema:" |
107 |
+ elog "https://prosody.im/doc/release/0.11.0#upgrade_notes" |
108 |
+} |