1 |
commit: 278f521120794ec54f3828f4ad20a3487d50202c |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 29 16:04:44 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 29 16:06:18 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=278f5211 |
7 |
|
8 |
media-sound/umurmur: Added live ebuild with mbedtls support. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/647656 |
11 |
Package-Manager: Portage-2.3.65, Repoman-2.3.12 |
12 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
13 |
|
14 |
media-sound/umurmur/metadata.xml | 1 + |
15 |
media-sound/umurmur/umurmur-9999.ebuild | 114 ++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 115 insertions(+) |
17 |
|
18 |
diff --git a/media-sound/umurmur/metadata.xml b/media-sound/umurmur/metadata.xml |
19 |
index adb73f1fed5..e7684f6b35d 100644 |
20 |
--- a/media-sound/umurmur/metadata.xml |
21 |
+++ b/media-sound/umurmur/metadata.xml |
22 |
@@ -11,6 +11,7 @@ |
23 |
of Mumble is called Murmur, hence the name uMurmur. |
24 |
</longdescription> |
25 |
<use> |
26 |
+ <flag name="mbedtls">Use <pkg>net-libs/mbedtls</pkg> as TLS provider</flag> |
27 |
<flag name="shm">Enable shared memory support</flag> |
28 |
</use> |
29 |
<upstream> |
30 |
|
31 |
diff --git a/media-sound/umurmur/umurmur-9999.ebuild b/media-sound/umurmur/umurmur-9999.ebuild |
32 |
new file mode 100644 |
33 |
index 00000000000..cf1ac28351f |
34 |
--- /dev/null |
35 |
+++ b/media-sound/umurmur/umurmur-9999.ebuild |
36 |
@@ -0,0 +1,114 @@ |
37 |
+# Copyright 1999-2019 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+ |
42 |
+inherit autotools systemd readme.gentoo-r1 user |
43 |
+ |
44 |
+DESCRIPTION="Minimalistic Murmur (Mumble server)" |
45 |
+HOMEPAGE="https://github.com/umurmur/umurmur" |
46 |
+if [[ "${PV}" == 9999 ]] ; then |
47 |
+ inherit git-r3 |
48 |
+ EGIT_REPO_URI="https://github.com/umurmur/umurmur.git" |
49 |
+else |
50 |
+ SRC_URI="https://github.com/${PN}/${PN}/archive/${PV/_}.tar.gz -> ${P}.tar.gz" |
51 |
+ KEYWORDS="~amd64 ~arm ~x86" |
52 |
+fi |
53 |
+LICENSE="BSD" |
54 |
+SLOT="0" |
55 |
+IUSE="gnutls libressl mbedtls shm" |
56 |
+ |
57 |
+# ssl-provider precendence: gnutls, mbedtls, libressl |
58 |
+# and openssl if none specified |
59 |
+DEPEND=">=dev-libs/protobuf-c-1.0.0_rc2 |
60 |
+ dev-libs/libconfig |
61 |
+ gnutls? ( >=net-libs/gnutls-3.0.0 ) |
62 |
+ !gnutls? ( |
63 |
+ mbedtls? ( net-libs/mbedtls ) |
64 |
+ !mbedtls? ( |
65 |
+ libressl? ( dev-libs/libressl:0= ) |
66 |
+ !libressl? ( dev-libs/openssl:0= ) |
67 |
+ ) |
68 |
+ ) |
69 |
+" |
70 |
+ |
71 |
+RDEPEND="${DEPEND}" |
72 |
+ |
73 |
+DOC_CONTENTS=" |
74 |
+ A configuration file has been installed at /etc/umurmur/umurmur.conf - you |
75 |
+ may want to review it. See also\n |
76 |
+ https://github.com/umurmur/umurmur/wiki/Configuration " |
77 |
+ |
78 |
+S="${WORKDIR}/${P/_}" |
79 |
+ |
80 |
+get_ssl_impl() { |
81 |
+ local ssl_provider=() |
82 |
+ |
83 |
+ use gnutls && ssl_provider+=( gnutls ) |
84 |
+ use mbedtls && ssl_provider+=( mbedtls ) |
85 |
+ use libressl && ssl_provider+=( libressl ) |
86 |
+ |
87 |
+ if ! use gnutls && ! use mbedtls && ! use libressl ; then |
88 |
+ ssl_provider+=( openssl ) |
89 |
+ fi |
90 |
+ echo ${ssl_provider[@]} |
91 |
+} |
92 |
+ |
93 |
+pkg_pretend() { |
94 |
+ local ssl_provider=( $(get_ssl_impl) ) |
95 |
+ |
96 |
+ if [[ ${#ssl_provider[@]} -gt 1 ]] ; then |
97 |
+ ewarn "More than one ssl provider selected (${ssl_provider[@]})" |
98 |
+ ewarn "defaulting to ${ssl_provider[0]}." |
99 |
+ fi |
100 |
+} |
101 |
+ |
102 |
+pkg_setup() { |
103 |
+ enewgroup murmur |
104 |
+ enewuser murmur "" "" "" murmur |
105 |
+} |
106 |
+ |
107 |
+src_prepare() { |
108 |
+ default |
109 |
+ eautoreconf |
110 |
+} |
111 |
+ |
112 |
+src_configure() { |
113 |
+ local ssl_provider=( $(get_ssl_impl) ) |
114 |
+ |
115 |
+ local myeconfargs=( |
116 |
+ --with-ssl="${ssl_provider[@]}" |
117 |
+ $(use_enable shm shmapi) |
118 |
+ ) |
119 |
+ econf "${myeconfargs[@]}" |
120 |
+} |
121 |
+ |
122 |
+src_install() { |
123 |
+ local confdir |
124 |
+ |
125 |
+ emake DESTDIR="${D}" install |
126 |
+ |
127 |
+ newinitd "${FILESDIR}"/umurmurd.initd umurmurd |
128 |
+ newconfd "${FILESDIR}"/umurmurd.confd umurmurd |
129 |
+ systemd_dounit "${FILESDIR}"/umurmurd.service |
130 |
+ |
131 |
+ dodoc AUTHORS ChangeLog |
132 |
+ newdoc README.md README |
133 |
+ |
134 |
+ confdir="/etc/umurmur" |
135 |
+ insinto "${confdir}" |
136 |
+ doins "${FILESDIR}"/umurmur.conf |
137 |
+ |
138 |
+ # Some permissions are adjusted as the config may contain a server |
139 |
+ # password, and /etc/umurmur will typically contain the cert and the |
140 |
+ # key used to sign it, which are read after priveleges are dropped. |
141 |
+ fperms 0750 "${confdir}" |
142 |
+ fowners -R root:murmur "${confdir}" |
143 |
+ fperms 0640 "${confdir}"/umurmur.conf |
144 |
+ |
145 |
+ readme.gentoo_create_doc |
146 |
+} |
147 |
+ |
148 |
+pkg_postinst() { |
149 |
+ readme.gentoo_print_elog |
150 |
+} |