new package: mumble-server

This commit is contained in:
Tee KOBAYASHI 2022-02-01 01:53:44 +09:00 committed by Yaksh Bariya
parent 138a7c1a43
commit 4e09da7452
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,36 @@
TERMUX_PKG_HOMEPAGE=https://www.mumble.info/
TERMUX_PKG_DESCRIPTION="Server module for Mumble, an open source voice-chat software"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.4.230
TERMUX_PKG_SRCURL=https://github.com/mumble-voip/mumble.git
TERMUX_PKG_DEPENDS="libcap, libdns-sd, libprotobuf, openssl, qt5-qtbase"
TERMUX_PKG_BUILD_DEPENDS="boost, qt5-qtbase-cross-tools"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Dclient=OFF
-Dice=OFF
-Doverlay=OFF
-Dwarnings-as-errors=OFF
"
termux_step_pre_configure() {
termux_setup_protobuf
LDFLAGS+=" -lcap"
}
termux_step_post_configure() {
if [ "$TERMUX_CMAKE_BUILD" == "Ninja" ]; then
sed -i s:${TERMUX_PREFIX//./\\.}'/bin/protoc[0-9.-]*:'$(which protoc):g \
build.ninja
fi
}
termux_step_post_make_install() {
ln -sfT mumble-server $TERMUX_PREFIX/bin/murmurd
cd $TERMUX_PKG_SRCDIR/scripts
install -Dm600 -t $TERMUX_PREFIX/etc/dbus-1/system.d murmur.conf
install -Dm600 -t $TERMUX_PREFIX/etc murmur.ini
install -Dm700 -t $TERMUX_PREFIX/bin murmur-user-wrapper
install -Dm600 -t $TERMUX_PREFIX/share/doc/mumble-server/examples murmur.ini
}

View File

@ -0,0 +1,40 @@
--- a/scripts/murmur-user-wrapper
+++ b/scripts/murmur-user-wrapper
@@ -6,7 +6,7 @@
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
DIR=$HOME/murmur
-SYSDIR=/usr/share/doc/mumble-server/examples
+SYSDIR=@TERMUX_PREFIX@/share/doc/mumble-server/examples
if [ $UID == 0 ] || [ $EUID == 0 ]; then
echo "You should never run this script as root. If you want a system-wide install, see "
@@ -44,7 +44,7 @@
DBUSFILE=$DIR/.dbus.sh
if [ $DO_KILL == 1 ]; then
- if pkill -U $UID -u $EUID -o -x -f "/usr/sbin/murmurd -ini $DIR/murmur.ini"; then
+ if pkill -U $UID -u $EUID -o -x -f "@TERMUX_PREFIX@/bin/murmurd -ini $DIR/murmur.ini"; then
echo "Termination signal sent"
else
echo "Murmur process not found; not terminated"
@@ -82,11 +82,11 @@
if [ "X$SETPW" != "X" ]; then
echo "Setting superuser password to \"$SETPW\""
- /usr/sbin/murmurd -ini $DIR/murmur.ini -supw $SETPW
+ @TERMUX_PREFIX@/bin/murmurd -ini $DIR/murmur.ini -supw $SETPW
exit 0
fi
-PID=$(pgrep -U $UID -u $EUID -o -x -f "/usr/sbin/murmurd -ini $DIR/murmur.ini")
+PID=$(pgrep -U $UID -u $EUID -o -x -f "@TERMUX_PREFIX@/bin/murmurd -ini $DIR/murmur.ini")
if [ $DO_STATUS == 1 ]; then
if [ "X$PID" != "X" ]; then
@@ -117,4 +117,4 @@
fi
echo "Starting Murmur"
-exec /usr/sbin/murmurd -ini $DIR/murmur.ini
+exec @TERMUX_PREFIX@/bin/murmurd -ini $DIR/murmur.ini

View File

@ -0,0 +1,17 @@
--- a/src/murmur/UnixMurmur.cpp
+++ b/src/murmur/UnixMurmur.cpp
@@ -380,10 +380,10 @@
QStringList inipaths;
- inipaths << QLatin1String("/usr/local/etc/mumble-server.ini");
- inipaths << QLatin1String("/usr/local/etc/murmur.ini");
- inipaths << QLatin1String("/etc/mumble-server.ini");
- inipaths << QLatin1String("/etc/murmur.ini");
+ inipaths << QLatin1String("@TERMUX_PREFIX@/local/etc/mumble-server.ini");
+ inipaths << QLatin1String("@TERMUX_PREFIX@/local/etc/murmur.ini");
+ inipaths << QLatin1String("@TERMUX_PREFIX@/etc/mumble-server.ini");
+ inipaths << QLatin1String("@TERMUX_PREFIX@/etc/murmur.ini");
foreach (const QString &f, inipaths) {
QFileInfo fi(f);