# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
PortGroup qt4 1.0
name murmur
version 1.2.2
revision 3
categories net audio
license GPL
maintainers snc openmaintainer
description server for mumble - low latency voice chat for gaming
long_description \
Server component of Mumble - an open source, low-latency, high quality \
voice chat software primarily intended for use while gaming.
homepage http://mumble.sourceforge.net/
platforms macosx
master_sites sourceforge:mumble
distname mumble-${version}
dist_subdir mumble
checksums rmd160 501aa1c4c170fb5aad2841cdfe3421376e62a07b \
sha256 2c564e3d5b7481129482f2365375a2dc77e134c0c00012073cfdfbeadaa49be8
livecheck.type regex
livecheck.url http://sourceforge.net/project/showfiles.php?group_id=147372&package_id=162594
livecheck.regex mumble-(\\d+(\\.\\d+)+).tar.gz
depends_lib-append \
port:openssl \
port:protobuf-cpp
depends_build-append \
port:boost
configure.cmd ${qt_qmake_cmd}
configure.pre_args CONFIG-=app_bundle CONFIG+=\"
configure.post_args \"
configure.args release no-universal no-client no-ice no-g15 no-update
if {[variant_isset universal]} {
supported_archs i386 ppc
} else {
supported_archs x86_64
}
variant universal {
configure.args-delete no-universal
}
variant ice description "Enable ice support" {
configure.args-delete no-ice
depends_lib-append port:ice-cpp
}
startupitem.create yes
startupitem.type launchd
startupitem.name Murmur
startupitem.start "${prefix}/sbin/murmurd -ini ${prefix}/etc/murmur/murmur.ini"
startupitem.stop "kill -TERM `cat ${prefix}/var/run/murmur/murmur.pid`"
startupitem.pidfile auto "${prefix}/var/run/murmur/murmur.pid"
build {
system "cd ${worksrcpath} && make"
}
destroot {
add_users murmur group=murmur realname=Murmur\ -\ Mumble\ Voice\ Chat
set dp ${destroot}${prefix}
set w ${worksrcpath}
set logdir ${dp}/var/log/murmur/
set dbdir ${dp}/var/lib/murmur/
set piddir ${dp}/var/run/murmur/
xinstall -m 740 -o murmur -g murmur -d \
${logdir} \
${dbdir} \
${piddir}
destroot.keepdirs-append \
${logdir} \
${dbdir} \
${piddir}
file mkdir ${dp}/etc/murmur/
file mkdir ${dp}/sbin/
file mkdir ${dp}/etc/dbus-1/system.d/
file copy ${w}/release/murmurd ${dp}/sbin/murmurd
set conf ${dp}/etc/murmur/murmur.ini
file copy ${w}/scripts/murmur.ini.system ${conf}
reinplace "s,database=.*,database=${prefix}/var/lib/murmur/murmur.sqlite," ${conf}
reinplace "s,pidfile=.*,pidfile=${prefix}/var/run/murmur/murmur.pid," ${conf}
reinplace "s,logfile=.*,logfile=${prefix}/var/log/murmur/murmur.log," ${conf}
if {![variant_isset ice]} {
# This change is made only to avoid confusion. Murmur ignores
# the ice= config option when built without Ice support.
reinplace "s,ice=,#ice=," ${destroot}${prefix}/etc/murmur/murmur.ini
}
set dbusservice ${dp}/etc/dbus-1/system.d/murmur.conf
file copy ${w}/scripts/murmur.conf ${dbusservice}
reinplace "s,user=.*\",user=\"murmur\"," ${dbusservice}
}
pre-install {
set plist ${destroot}${prefix}/etc/LaunchDaemons/org.macports.Murmur/org.macports.Murmur.plist
reinplace "s,,UserNamemurmur," ${plist}
}
notes "\
To set up a password for the SuperUser user on your Murmur\
server, execute:\
\n\n\
${prefix}/sbin/murmurd -ini ${prefix}/etc/murmur/murmur.ini -supw \[password\]\
\n\n\
In case you want to interface with a different database than\
sqlite, then take a look at the +psql and +mysql5 variants of\
qt4-mac.\
"