summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/murmur/README24
-rw-r--r--network/murmur/doinst.sh28
-rw-r--r--network/murmur/murmur.SlackBuild86
-rw-r--r--network/murmur/murmur.info12
-rw-r--r--network/murmur/murmur.logrotate15
-rw-r--r--network/murmur/rc.murmur2
-rw-r--r--network/murmur/slack-desc10
7 files changed, 128 insertions, 49 deletions
diff --git a/network/murmur/README b/network/murmur/README
index 04d71e391f..bebdb01949 100644
--- a/network/murmur/README
+++ b/network/murmur/README
@@ -4,8 +4,24 @@ 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:
+NOTE: If you're upgrading from 1.1.4, the SlackBuild has changed:
+ /var/{lib,log,run}/mumble-server moved to /var/{lib,log,run}/murmur
-if [ -x /etc/rc.d/rc.murmur ]; then
- /etc/rc.d/rc.murmur start
-fi
+This script requires the system to have a murmur user and group:
+
+ # groupadd -g 261 murmur
+ # useradd -g murmur -u 261 -d /var/lib/murmur -s /bin/false murmur
+
+To use a different user and/or group:
+
+ # MURMUR_USER=user MURMUR_GROUP=group ./murmur.SlackBuild
+
+To run murmur at boot:
+
+ # chmod +x /etc/rc.d/rc.murmur
+
+ 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/network/murmur/doinst.sh b/network/murmur/doinst.sh
index 4632adfb54..116fd0b4fa 100644
--- a/network/murmur/doinst.sh
+++ b/network/murmur/doinst.sh
@@ -3,24 +3,26 @@
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
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
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
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
-config etc/rc.d/rc.murmur.new
+config etc/logrotate.d/murmur.new
config etc/murmur.ini.new
+
+preserve_perms etc/rc.d/rc.murmur.new
diff --git a/network/murmur/murmur.SlackBuild b/network/murmur/murmur.SlackBuild
index d8e87cae9d..a80ec32282 100644
--- a/network/murmur/murmur.SlackBuild
+++ b/network/murmur/murmur.SlackBuild
@@ -4,16 +4,14 @@
PRGNAM=murmur
SRCNAM=mumble
-VERSION=${VERSION:-1.1.4}
+VERSION=${VERSION:-1.2.3}
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
@@ -23,6 +21,23 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+MURMUR_GROUP=${MURMUR_GROUP:-murmur}
+MURMUR_USER=${MURMUR_USER:-murmur}
+
+if ! getent group $MURMUR_GROUP; then
+ echo "Group $MURMUR_GROUP does not exist. Create it with:"
+ echo " # groupadd -g 261 $MURMUR_GROUP"
+ echo""
+ exit 1
+fi
+
+if ! getent passwd $MURMUR_USER; then
+ echo "User $MURMUR_USER does not exist. Create it with:"
+ echo " # useradd -g $MURMUR_GROUP -u 261 -d /var/lib/$PRGNAM -s /bin/false $MURMUR_USER"
+ echo ""
+ exit 1
+fi
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -53,32 +68,63 @@ find . \
-exec chmod 644 {} \;
qmake \
+ -recursive \
main.pro \
- CONFIG+=no-client
+ CONFIG+=no-update \
+ CONFIG+=no-client \
+ CONFIG+=no-ice \
+ CONFIG+=no-bonjour
+
+make release
+
+mkdir -p \
+ $PKG/etc/{logrotate.d,rc.d} \
+ $PKG/usr/bin \
+ $PKG/usr/man/man1 \
+ $PKG/var/{lib,log,run}/$PRGNAM
+
+install -m 644 $CWD/rc.$PRGNAM $PKG/etc/rc.d/rc.$PRGNAM.new
+install -m 755 release/murmurd $PKG/usr/bin
+install -m 644 man/murmurd.1 $PKG/usr/man/man1
+
+sed \
+ -e "s,database=.*,database=/var/lib/$PRGNAM/$PRGNAM.sqlite," \
+ -e "s,logfile=.*,logfile=/var/log/$PRGNAM/$PRGNAM.log," \
+ -e "s,pidfile=.*,pidfile=/var/run/$PRGNAM/$PRGNAM.pid," \
+ -e "s,uname=.*,uname=$MURMUR_USER," \
+ scripts/murmur.ini.system > $PKG/etc/$PRGNAM.ini.new
+
+sed \
+ -i "s,PIDFILE=.*,PIDFILE=/var/run/$PRGNAM/$PRGNAM.pid," \
+ $PKG/etc/rc.d/rc.$PRGNAM.new
+
+sed \
+ -e "s,@LOGFILE@,/var/log/$PRGNAM/$PRGNAM.log," \
+ -e "s,@USER@,$MURMUR_USER," \
+ -e "s,@GROUP@,$MURMUR_GROUP," \
+ $CWD/$PRGNAM.logrotate > $PKG/etc/logrotate.d/$PRGNAM.new
+
+chown root:$MURMUR_GROUP $PKG/etc/$PRGNAM.ini.new
+chmod o-rwx $PKG/etc/murmur.ini.new
-make
+chown $MURMUR_USER:$MURMUR_GROUP $PKG/var/{lib,log,run}/$PRGNAM
+chmod o-rwx $PKG/var/lib/$PRGNAM
-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
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 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/*
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-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
+cp -a \
+ CHANGES INSTALL LICENSE README README.Linux \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-mkdir -p $PKG/install $PKG/etc/rc.d
+mkdir -p $PKG/install
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/network/murmur/murmur.info b/network/murmur/murmur.info
index 06ff80def1..c50deadbbe 100644
--- a/network/murmur/murmur.info
+++ b/network/murmur/murmur.info
@@ -1,10 +1,10 @@
PRGNAM="murmur"
-VERSION="1.1.4"
+VERSION="1.2.3"
HOMEPAGE="http://mumble.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/mumble/mumble-1.1.4.tar.gz"
-MD5SUM="06fdd23043fd987b2eb6b56913fac181"
+DOWNLOAD="http://downloads.sourceforge.net/mumble/mumble-1.2.3.tar.gz"
+MD5SUM="55804e3dfe98b16eeb40abca6c254625"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-MAINTAINER="adev"
-EMAIL="adev@linuxmail.org"
-APPROVED="David Somero,pprkut"
+MAINTAINER="James Geboski"
+EMAIL="jgeboski@gmail.com"
+APPROVED="dsomero"
diff --git a/network/murmur/murmur.logrotate b/network/murmur/murmur.logrotate
new file mode 100644
index 0000000000..a74e6297fd
--- /dev/null
+++ b/network/murmur/murmur.logrotate
@@ -0,0 +1,15 @@
+@LOGFILE@ {
+ weekly
+ rotate 7
+ compress
+ create 660 @USER@ @GROUP@
+ delaycompress
+ missingok
+ notifempty
+ sharedscripts
+ postrotate
+ if [ -x /etc/rc.d/rc.murmur ]; then
+ /etc/rc.d/rc.murmur restart
+ fi
+ endscript
+}
diff --git a/network/murmur/rc.murmur b/network/murmur/rc.murmur
index 8c2b159872..71720ac96a 100644
--- a/network/murmur/rc.murmur
+++ b/network/murmur/rc.murmur
@@ -1,6 +1,6 @@
#!/bin/bash
-PIDFILE="/var/run/mumble-server/mumble-server.pid"
+PIDFILE=
murmur_start() {
echo -n "Starting Murmur Server: "
diff --git a/network/murmur/slack-desc b/network/murmur/slack-desc
index ead230892a..3aff14bf06 100644
--- a/network/murmur/slack-desc
+++ b/network/murmur/slack-desc
@@ -5,15 +5,15 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-------------------------------------------------|
+ |-----handy-ruler------------------------------------------------------|
murmur: murmur (low latency voip server)
-murmur:
+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:
murmur: Homepage: http://mumble.sourceforge.net/
-murmur:
-murmur:
+murmur:
+murmur: