From 82fb2be05b4fa9fa8340ccafbe1b21f571941eff Mon Sep 17 00:00:00 2001 From: The Doctor Date: Sat, 7 Apr 2012 21:29:56 +0000 Subject: [PATCH 1/2] Initial commit of Murmur SlackBuild from slackbuilds.org. It's the server component of the Mumble VoIP system. It also means that I don't have to write my own initscript. Signed-off-by: The Doctor --- porteus/murmur/README | 11 +++++ porteus/murmur/doinst.sh | 26 ++++++++++ porteus/murmur/murmur.SlackBuild | 84 ++++++++++++++++++++++++++++++++ porteus/murmur/murmur.info | 10 ++++ porteus/murmur/rc.murmur | 41 ++++++++++++++++ porteus/murmur/slack-desc | 19 ++++++++ 6 files changed, 191 insertions(+) create mode 100644 porteus/murmur/README create mode 100644 porteus/murmur/doinst.sh create mode 100755 porteus/murmur/murmur.SlackBuild create mode 100644 porteus/murmur/murmur.info create mode 100644 porteus/murmur/rc.murmur create mode 100644 porteus/murmur/slack-desc diff --git a/porteus/murmur/README b/porteus/murmur/README new file mode 100644 index 00000000..04d71e39 --- /dev/null +++ b/porteus/murmur/README @@ -0,0 +1,11 @@ +Murmur is the VoIP server component for Mumble. Murmur is +installed in a system-wide fashion, but can also be run by +individual users. Each murmur process supports multiple virtual +servers, each with their own user base and channel list. +Administration of murmur is done through D-Bus. + +To run murmur at boot, add the following to /etc/rc.d/rc.local: + +if [ -x /etc/rc.d/rc.murmur ]; then + /etc/rc.d/rc.murmur start +fi diff --git a/porteus/murmur/doinst.sh b/porteus/murmur/doinst.sh new file mode 100644 index 00000000..4632adfb --- /dev/null +++ b/porteus/murmur/doinst.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.murmur.new: +if [ -e etc/rc.d/rc.murmur ]; then + cp -a etc/rc.d/rc.murmur etc/rc.d/rc.murmur.new.incoming + cat etc/rc.d/rc.murmur.new > etc/rc.d/rc.murmur.new.incoming + mv etc/rc.d/rc.murmur.new.incoming etc/rc.d/rc.murmur.new +else + # Install executable otherwise - irrelevant unless user starts in rc.local + chmod 0755 etc/rc.d/rc.murmur.new +fi + +config etc/rc.d/rc.murmur.new +config etc/murmur.ini.new diff --git a/porteus/murmur/murmur.SlackBuild b/porteus/murmur/murmur.SlackBuild new file mode 100755 index 00000000..d8e87cae --- /dev/null +++ b/porteus/murmur/murmur.SlackBuild @@ -0,0 +1,84 @@ +#!/bin/bash + +# Slackware build script for murmur + +PRGNAM=murmur +SRCNAM=mumble +VERSION=${VERSION:-1.1.4} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +qmake \ + main.pro \ + CONFIG+=no-client + +make + +mkdir -p $PKG/usr/bin \ + $PKG/etc \ + $PKG/var/lib/mumble-server \ + $PKG/var/run/mumble-server \ + $PKG/var/log/mumble-server +install -m 0755 ./release/murmurd $PKG/usr/bin +install -m 0644 ./scripts/murmur.ini.system $PKG/etc/murmur.ini.new +strip --strip-unneeded $PKG/usr/bin/* 2>/dev/null || true + +mkdir -p $PKG/usr/man/man1 +install -m 0644 ./man/murmurd.1 $PKG/usr/man/man1 +gzip -9 $PKG/usr/man/man1/* + +DOCS="CHANGES INSTALL LICENSE README README.Linux $CWD/$PRGNAM.SlackBuild" +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +install -m 0644 $DOCS $PKG/usr/doc/$PRGNAM-$VERSION + +mkdir -p $PKG/install $PKG/etc/rc.d +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/rc.murmur > $PKG/etc/rc.d/rc.murmur.new + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/porteus/murmur/murmur.info b/porteus/murmur/murmur.info new file mode 100644 index 00000000..06ff80de --- /dev/null +++ b/porteus/murmur/murmur.info @@ -0,0 +1,10 @@ +PRGNAM="murmur" +VERSION="1.1.4" +HOMEPAGE="http://mumble.sourceforge.net/" +DOWNLOAD="http://downloads.sourceforge.net/mumble/mumble-1.1.4.tar.gz" +MD5SUM="06fdd23043fd987b2eb6b56913fac181" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="adev" +EMAIL="adev@linuxmail.org" +APPROVED="David Somero,pprkut" diff --git a/porteus/murmur/rc.murmur b/porteus/murmur/rc.murmur new file mode 100644 index 00000000..8c2b1598 --- /dev/null +++ b/porteus/murmur/rc.murmur @@ -0,0 +1,41 @@ +#!/bin/bash + +PIDFILE="/var/run/mumble-server/mumble-server.pid" + +murmur_start() { + echo -n "Starting Murmur Server: " + if [ ! -f $PIDFILE ]; then + /usr/bin/murmurd -ini /etc/murmur.ini & > /dev/null 2>&1 + echo "OK" + else + echo -n "Removing stale lock.. " + /bin/rm -f $PIDFILE + /usr/bin/murmurd -ini /etc/murmur.ini & > /dev/null 2>&1 + echo "OK" + fi +} + +murmur_stop() { + echo -n "Stopping Murmur: " + if [ -f $PIDFILE ]; then + /bin/kill $(/bin/cat $PIDFILE) + /bin/rm -f $PIDFILE + echo "OK" + else + echo "Not Running" + fi +} + +case "$1" in + start) + murmur_start + ;; + stop) + murmur_stop + ;; + restart) + murmur_stop && (/bin/sleep 1 && murmur_start) + ;; + *) + echo "Usage: rc.murmur {start|stop|restart}" +esac diff --git a/porteus/murmur/slack-desc b/porteus/murmur/slack-desc new file mode 100644 index 00000000..ead23089 --- /dev/null +++ b/porteus/murmur/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-------------------------------------------------| +murmur: murmur (low latency voip server) +murmur: +murmur: Murmur is the VoIP server component for Mumble. Murmur is +murmur: installed in a system-wide fashion, but can also be run by +murmur: individual users. Each murmur process supports multiple virtual +murmur: servers, each with their own user base and channel list. +murmur: Administration of murmur is done through D-Bus. +murmur: +murmur: Homepage: http://mumble.sourceforge.net/ +murmur: +murmur: From 74cbb8779f06643c63dfddb87d72c161498480c0 Mon Sep 17 00:00:00 2001 From: The Doctor Date: Sat, 7 Apr 2012 21:42:12 +0000 Subject: [PATCH 2/2] Initial commit of a murmur server configuration file, /etc/murmur.ini Signed-off-by: The Doctor --- porteus/murmur/murmur.ini | 77 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 porteus/murmur/murmur.ini diff --git a/porteus/murmur/murmur.ini b/porteus/murmur/murmur.ini new file mode 100644 index 00000000..74515330 --- /dev/null +++ b/porteus/murmur/murmur.ini @@ -0,0 +1,77 @@ +# To enable username registration through +# http://webserver/cgi-bin/mumble-server/register.cgi +# then this value must be set to a valid email +# and you must be running a SMTP server on this +# machine. +#emailfrom = + +# How many login attempts do we tolerate from one IP +# inside a given timeframe before we ban the connection? +# Note that this is global (shared between all virtual servers), and that +# it counts both successfull and unsuccessfull connection attempts. +# Set either Attempts or Timeframe to 0 to disable. +#autobanAttempts = 10 +#autobanTimeframe = 120 +#autobanTime = 300 + +# The below will be used as defaults for new configured servers. +# If you're just running one server (the default), it's easier to +# configure it here than through DBus/SQL. +# +# Welcome message sent to users +welcometext="
Welcome to the Byzantium Murmur network.
Watch your backs.
" + +# Port to bind TCP and UDP sockets to +port=64738 + +# Specific IP or hostname to bind to. +# If this is left blank (default), murmur will bind to all available addresses. +#host= + +# Password to join server +serverpassword= + +# Maximum bandwidth (in bytes per second) clients are allowed +# send speech at. +bandwidth=10000 + +# Maximum number of concurrent clients allowed. +users=50 + +# Murmur retains the per-server log entries in an internal database which +# allows it to be accessed over D-Bus. +# How many days should such entries be kept? +#logdays=31 + +# To enable public registration, the serverpassword must be blank, and this +# must all be filled out. +# The password here is used to create a registry for the server name; subsequent +# updates will need the same password. Don't loose your password. +# The URL is your own website, and only set the registerHostname for static IP +# addresses. +# +registerName=Byzantium Mumble Network +registerPassword= +registerUrl=http://byzantium.mesh/ +registerHostname= + +# If you have a proper SSL certificate, you can provide the filenames here. +sslCert=/etc/httpd/server.crt +sslKey=/etc/httpd/server.key + +# Path to database. If blank, will search for +# murmur.sqlite in default locations. +database=/var/lib/mumble-server/mumble-server.sqlite + +# PIDfile to use +# Leave blank to place pidfile in current directory +pidfile=/var/run/mumble-server/mumble-server.pid + +# Murmur defaults to not using D-Bus. If you wish to use dbus, please +# specify so here. +# +dbus=system + +# Murmur default to logging to murmur.log. If you leave this blank, +# murmur will log to the console (linux) or through message boxes (win32). +logfile=