summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-sound/umurmur/Manifest6
-rw-r--r--media-sound/umurmur/files/umurmur-0.2.8-polarssl-1.1.1.patch69
-rw-r--r--media-sound/umurmur/files/umurmur.conf58
-rw-r--r--media-sound/umurmur/files/umurmurd.confd9
-rw-r--r--media-sound/umurmur/files/umurmurd.initd23
-rw-r--r--media-sound/umurmur/umurmur-0.2.8.ebuild77
6 files changed, 242 insertions, 0 deletions
diff --git a/media-sound/umurmur/Manifest b/media-sound/umurmur/Manifest
new file mode 100644
index 0000000..0db0551
--- /dev/null
+++ b/media-sound/umurmur/Manifest
@@ -0,0 +1,6 @@
+AUX umurmur-0.2.8-polarssl-1.1.1.patch 1766 RMD160 e2e21da917bbb1865aef89f60d576b0417993c34 SHA1 81b19ea4bc7aa12a0c21c18d9e23012646c04181 SHA256 8d0ee47be178a04c2cbc43ead2e8cb789e69b5958ddd81208eea5c79d2ce971c
+AUX umurmur.conf 1639 RMD160 5dd94d9f8358b65afb2187dca1cd060d8ff0afb8 SHA1 8134cea75f16a01d10f64be03e334f570b78869f SHA256 32ee6824594e16e5f20c8b08923a517063a54cbdf5116caa6f76f4098be97442
+AUX umurmurd.confd 185 RMD160 877c8d10f263317b17b47f52592568ab20d99a48 SHA1 f7b21d7f094fbe7b541cdd0a143cf27019a290e5 SHA256 ed2d207e2ec5f3df61b9d28827e59513c7d3a72b891488206a59c4d7a571893e
+AUX umurmurd.initd 475 RMD160 de59bf25897e09c54f2ec4554c0f501a95607b48 SHA1 5b9fde01b6f3ceff74a3b00c3f5671f2f3cc84ce SHA256 5e53c46069a3473eb5cb849c3dea5e4beb36b7ef742b10022bf7dc7bff3c72ce
+DIST umurmur-0.2.8.tar.gz 155357 RMD160 a7f5f002def702b2820067e51a86e35386bb9895 SHA1 4e497663d0612efb1b61f61663a8d4c27e90777f SHA256 62c43da2f07125977cf8024a0775ed697101816c3fa8f36345780901aaf08736
+EBUILD umurmur-0.2.8.ebuild 2197 RMD160 db6ce3d14ce0eda5b431abcbee7e0c5d284191fb SHA1 5dcc1faa592154a0135af9acabd63d1916f14b12 SHA256 bd8cf76ae3ed6511119d7e5baddb2eff9b2db2a73beff111324b3b5351a75559
diff --git a/media-sound/umurmur/files/umurmur-0.2.8-polarssl-1.1.1.patch b/media-sound/umurmur/files/umurmur-0.2.8-polarssl-1.1.1.patch
new file mode 100644
index 0000000..7cf1267
--- /dev/null
+++ b/media-sound/umurmur/files/umurmur-0.2.8-polarssl-1.1.1.patch
@@ -0,0 +1,69 @@
+diff --git a/src/crypt.c b/src/crypt.c
+index 7188c2d..5025ba7 100644
+--- a/src/crypt.c
++++ b/src/crypt.c
+@@ -41,16 +41,10 @@
+ #include <string.h>
+ #include <arpa/inet.h>
+ #include "crypt.h"
++#include "ssl.h"
+
+ #ifdef USE_POLARSSL
+ #include <polarssl/havege.h>
+-#define RAND_bytes(_dst_, _size_) do { \
+- int i; \
+- for (i = 0; i < _size_; i++) { \
+- _dst_[i] = havege_rand(&hs); \
+- } \
+- } while (0);
+-
+ extern havege_state hs;
+ #endif
+
+diff --git a/src/ssl.c b/src/ssl.c
+index ab953f3..1f2ef6a 100644
+--- a/src/ssl.c
++++ b/src/ssl.c
+@@ -187,7 +187,7 @@ SSL_handle_t *SSLi_newconnection(int *fd, bool_t *SSLready)
+ ssl_set_endpoint(ssl, SSL_IS_SERVER);
+ ssl_set_authmode(ssl, SSL_VERIFY_NONE);
+
+- ssl_set_rng(ssl, havege_rand, &hs);
++ ssl_set_rng(ssl, HAVEGE_RAND, &hs);
+ ssl_set_dbg(ssl, pssl_debug, NULL);
+ ssl_set_bio(ssl, net_recv, fd, net_send, fd);
+
+diff --git a/src/ssl.h b/src/ssl.h
+index 5629c4c..8aa3f30 100644
+--- a/src/ssl.h
++++ b/src/ssl.h
+@@ -45,8 +45,29 @@
+ #else
+ #if (POLARSSL_VERSION_MAJOR == 0)
+ #define POLARSSL_API_V0
++ #define HAVEGE_RAND (havege_rand)
++ #define RAND_bytes(_dst_, _size_) do { \
++ int i; \
++ for (i = 0; i < _size_; i++) { \
++ _dst_[i] = havege_rand(&hs); \
++ } \
++ } while (0)
+ #else
+ #define POLARSSL_API_V1
++ #if (POLARSSL_VERSION_MINOR >= 1)
++ #define HAVEGE_RAND (havege_random)
++ #define RAND_bytes(_dst_, _size_) do { \
++ havege_random(&hs, _dst_, _size_); \
++ } while (0)
++ #else
++ #define HAVEGE_RAND (havege_rand)
++ #define RAND_bytes(_dst_, _size_) do { \
++ int i; \
++ for (i = 0; i < _size_; i++) { \
++ _dst_[i] = havege_rand(&hs); \
++ } \
++ } while (0)
++ #endif
+ #endif
+ #endif
+
diff --git a/media-sound/umurmur/files/umurmur.conf b/media-sound/umurmur/files/umurmur.conf
new file mode 100644
index 0000000..dc8c222
--- /dev/null
+++ b/media-sound/umurmur/files/umurmur.conf
@@ -0,0 +1,58 @@
+# This configuration is based on the official example configuration. More information can be found
+# at http://code.google.com/p/umurmur/wiki/Configuring02x
+
+max_bandwidth = 48000;
+welcometext = "Welcome to uMurmur!";
+certificate = "/etc/umurmur/cert.crt";
+private_key = "/etc/umurmur/key.key";
+password = "";
+max_users = 10;
+
+# Specify port and/or address to bind to. Typically not needed.
+# Default is '*' for address and 64738 for port.
+# Can also be specified on the command line, which takes precedence if
+# both are specified.
+# bindport = 64738;
+# bindaddr = "192.168.1.1";
+
+# Specify this for privilege dropping. If username is specified but not
+# the groupname, the user's login group is used.
+username = "umurmur";
+groupname = "umurmur";
+
+# Root channel must always be defined first.
+# If a channel has a parent, the parent must be defined before the child channel(s).
+channels = ( {
+ name = "Root";
+ parent = "";
+ description = "The Root of all channels";
+ noenter = true;
+ },
+ {
+ name = "Lobby";
+ parent = "Root";
+ description = "Lobby channel";
+ },
+ {
+ name = "Red team";
+ parent = "Lobby";
+ description = "The Red team channel";
+ },
+ {
+ name = "Blue team";
+ parent = "Lobby";
+ description = "The Blue team channel";
+ }
+);
+# Channel links configuration.
+channel_links = ( {
+ source = "Lobby";
+ destination = "Red team";
+ },
+ {
+ source = "Lobby";
+ destination = "Blue team";
+ }
+);
+
+default_channel = "Lobby";
diff --git a/media-sound/umurmur/files/umurmurd.confd b/media-sound/umurmur/files/umurmurd.confd
new file mode 100644
index 0000000..8365800
--- /dev/null
+++ b/media-sound/umurmur/files/umurmurd.confd
@@ -0,0 +1,9 @@
+# Path to configuration file
+UMURMURD_CONF="/etc/umurmur.conf"
+
+# Path to PID file
+UMURMURD_PID="/var/run/umurmurd.pid"
+
+# Additional flags to be passed to umurmurd
+UMURMURD_OPTS="-r"
+
diff --git a/media-sound/umurmur/files/umurmurd.initd b/media-sound/umurmur/files/umurmurd.initd
new file mode 100644
index 0000000..1db3e52
--- /dev/null
+++ b/media-sound/umurmur/files/umurmurd.initd
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+ use logger
+}
+
+start() {
+ ebegin "Starting umurmurd"
+ start-stop-daemon --start --exec /usr/bin/umurmurd --pidfile "${UMURMURD_PID}" -- \
+ -c "${UMURMURD_CONF}" -p "${UMURMURD_PID}" ${UMURMURD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping umurmurd"
+ start-stop-daemon --stop --pidfile "${UMURMURD_PID}"
+ eend $?
+}
+
diff --git a/media-sound/umurmur/umurmur-0.2.8.ebuild b/media-sound/umurmur/umurmur-0.2.8.ebuild
new file mode 100644
index 0000000..b6b30e1
--- /dev/null
+++ b/media-sound/umurmur/umurmur-0.2.8.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils
+
+DESCRIPTION="Minimalistic Murmur (Mumble server)"
+HOMEPAGE="http://code.google.com/p/umurmur/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="BSD-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="polarssl"
+
+DEPEND="dev-libs/protobuf-c
+ dev-libs/libconfig
+ polarssl? ( net-libs/polarssl )
+ !polarssl? ( dev-libs/openssl )"
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup umurmur || die
+ enewuser umurmur "" "" "" umurmur || die
+}
+
+src_prepare() {
+ # Fixes building with new polarssl api, taken from upstream git (18d8a6a)
+ use polarssl && epatch "${FILESDIR}/${P}-polarssl-1.1.1.patch"
+}
+
+src_configure() {
+ local myconf
+
+ # build uses polarssl by default, but instead, make it use openssl unless
+ # polarssl is desired.
+ use !polarssl && myconf="${myconf} --with-ssl=openssl"
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ newinitd "${FILESDIR}/umurmurd.initd" umurmurd || die
+ newconfd "${FILESDIR}/umurmurd.confd" umurmurd || die
+
+ dodoc AUTHORS ChangeLog || die "dodoc failed"
+ newdoc README.md README || die "newdoc failed"
+
+ # Some permissions are adjusted as the config may contain a server
+ # password, and /etc/umurmur will typically contain the cert and the key
+ # used to sign it, which are read after priveleges are dropped.
+ insinto /etc
+ doins "${FILESDIR}/umurmur.conf" || die
+ fperms 0640 /etc/umurmur.conf || die
+
+ dodir /etc/umurmur || die
+ fperms 0750 /etc/umurmur || die
+ fowners root:umurmur /etc/umurmur || die
+}
+
+pkg_postinst() {
+ elog "A configuration file has been installed at /etc/umurmur.conf - you may "
+ elog "want to review it. See also http://code.google.com/p/umurmur/wiki/Configuring02x"
+
+ if use polarssl ; then
+ elog
+ elog "Because you have enabled PolarSSL support, umurmurd will use a"
+ elog "predefined test-certificate and key if none are configured, which"
+ elog "is insecure. See http://code.google.com/p/umurmur/wiki/Installing02x#Installing_uMurmur_with_PolarSSL_support"
+ elog "for more information on how to create your certificate and key"
+ fi
+}