Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2022-08-29 19:08:32 +0300
committerRobert Adam <dev@robert-adam.de>2022-09-10 18:28:34 +0300
commit077c58453b5085a721c97845bdeb85bb48a02d77 (patch)
treec17e7e7c1baa9cf2832aae6b06b2d1636d32b46d
parent8b54b6fd0c1abb392186c3dd9025be769da22012 (diff)
BUILD: Ensure aux files always use correct names
The auxiliary files will now make use of configure_file in order to ensure that e.g. the binary names used in them always match the names of the actually built binaries.
-rw-r--r--CMakeLists.txt15
-rw-r--r--auxiliary_files/CMakeLists.txt73
-rw-r--r--auxiliary_files/config_files/info.mumble.Mumble.appdata.xml.in8
-rw-r--r--auxiliary_files/config_files/info.mumble.Mumble.desktop.in4
-rw-r--r--auxiliary_files/config_files/mumble-server.logrotate10
-rw-r--r--auxiliary_files/config_files/mumble-server.logrotate.in10
-rw-r--r--auxiliary_files/config_files/mumble-server.service.in (renamed from auxiliary_files/config_files/mumble-server.service)4
-rw-r--r--auxiliary_files/mumble-server.ini (renamed from auxiliary_files/mumble_server.ini)10
-rwxr-xr-xauxiliary_files/run_scripts/mumble-overlay.in (renamed from auxiliary_files/run_scripts/mumble-overlay)10
-rwxr-xr-xauxiliary_files/run_scripts/mumble-server-user-wrapper.in (renamed from auxiliary_files/run_scripts/mumble-server-user-wrapper)40
-rw-r--r--src/CMakeLists.txt14
11 files changed, 125 insertions, 73 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0959b0dc9..2b69a987d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,6 +51,21 @@ include(pkg-utils)
include(project-utils)
include(TargetArch)
include(CheckIPOSupported)
+include(FindPythonInterpreter)
+
+# Locate a usable Python3 interpreter
+set(PYTHON_HINTS
+ "C:/Python39-x64" # Path on the AppVeyor CI server
+)
+
+find_python_interpreter(
+ VERSION 3
+ INTERPRETER_OUT_VAR PYTHON_INTERPRETER
+ HINTS ${PYTHON_HINTS}
+ REQUIRED
+)
+
+
check_ipo_supported(RESULT LTO_DEFAULT)
diff --git a/auxiliary_files/CMakeLists.txt b/auxiliary_files/CMakeLists.txt
index 8b6e8830a..9da461c98 100644
--- a/auxiliary_files/CMakeLists.txt
+++ b/auxiliary_files/CMakeLists.txt
@@ -3,34 +3,85 @@
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-if(client)
- # Install Mumble man files
- install(FILES "man_files/mumble.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)
+include(delayed_configure_files)
+
+if(NOT BUILD_RELEASE_DATE)
+ # If BUILD_RELEASE_DATE has not been set, default to time of build
+ string(TIMESTAMP BUILD_RELEASE_DATE "%Y-%m-%d")
+endif()
+if(client)
if(UNIX AND NOT APPLE)
- configure_file("config_files/info.mumble.Mumble.appdata.xml.in" "${CMAKE_BINARY_DIR}/info.mumble.Mumble.appdata.xml")
- configure_file("config_files/info.mumble.Mumble.desktop.in" "${CMAKE_BINARY_DIR}/info.mumble.Mumble.desktop")
- install(FILES "${CMAKE_BINARY_DIR}/info.mumble.Mumble.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
- install(FILES "${CMAKE_BINARY_DIR}/info.mumble.Mumble.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
+ delayed_configure_files(
+ TARGET mumble
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/config_files/info.mumble.Mumble.appdata.xml.in=${CMAKE_CURRENT_BINARY_DIR}/info.mumble.Mumble.appdata.xml"
+ "${CMAKE_CURRENT_SOURCE_DIR}/config_files/info.mumble.Mumble.desktop.in=${CMAKE_CURRENT_BINARY_DIR}/info.mumble.Mumble.desktop"
+ PASSTHROUGH_VARIABLES
+ MUMBLE_BUILD_YEAR
+ CMAKE_PROJECT_VERSION
+ BUILD_RELEASE_DATE
+ CMAKE_PROJECT_HOMEPAGE_URL
+ CMAKE_PROJECT_DESCRIPTION
+ VARIABLES
+ "MUMBLE_CLIENT_BINARY_NAME=$<TARGET_FILE_NAME:mumble>"
+ PYTHON_INTERPRETER "${PYTHON_INTERPRETER}"
+ @ONLY
+ )
+
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/info.mumble.Mumble.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/info.mumble.Mumble.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications")
+
+ # Install Mumble client man files
+ install(FILES "man_files/mumble.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)
+
endif()
endif()
if(server)
- file(COPY "mumble_server.ini" DESTINATION ${CMAKE_BINARY_DIR})
+ file(COPY "mumble-server.ini" DESTINATION ${CMAKE_BINARY_DIR})
file(COPY "config_files/mumble-server.conf" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
- if(UNIX)
- # Install Murmur man files
+ if(UNIX AND NOT APPLE)
+ delayed_configure_files(
+ TARGET mumble-server
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/config_files/mumble-server.logrotate.in=${CMAKE_CURRENT_BINARY_DIR}/mumble-server.logrotate"
+ "${CMAKE_CURRENT_SOURCE_DIR}/config_files/mumble-server.service.in=${CMAKE_CURRENT_BINARY_DIR}/mumble-server.service"
+ "${CMAKE_CURRENT_SOURCE_DIR}/run_scripts/mumble-server-user-wrapper.in=${CMAKE_CURRENT_BINARY_DIR}/mumble-server-user-wrapper"
+ PASSTHROUGH_VARIABLES
+ MUMBLE_BUILD_YEAR
+ VARIABLES
+ "MUMBLE_SERVER_BINARY_NAME=$<TARGET_FILE_NAME:mumble-server>"
+ PYTHON_INTERPRETER "${PYTHON_INTERPRETER}"
+ @ONLY
+ )
+
+ # Install Mumble server man files
install(FILES "man_files/mumble-server.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)
install(FILES "man_files/mumble-server-user-wrapper.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)
endif()
endif()
+
if(overlay)
if(UNIX)
+ delayed_configure_files(
+ TARGET overlay_gl
+ FILES
+ "${CMAKE_CURRENT_SOURCE_DIR}/run_scripts/mumble-overlay.in=${CMAKE_CURRENT_BINARY_DIR}/mumble-overlay"
+ PASSTHROUGH_VARIABLES
+ MUMBLE_BUILD_YEAR
+ VARIABLES
+ "MUMBLE_OVERLAY_BINARY_BASENAME=$<TARGET_FILE_BASE_NAME:overlay_gl>"
+ PYTHON_INTERPRETER "${PYTHON_INTERPRETER}"
+ @ONLY
+ )
+
# install overlay script
- install(PROGRAMS "run_scripts/mumble-overlay" DESTINATION "${MUMBLE_INSTALL_SCRIPTDIR}")
+ install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/mumble-overlay" DESTINATION "${MUMBLE_INSTALL_SCRIPTDIR}")
# install overlay man-files
install(FILES "man_files/mumble-overlay.1" DESTINATION "${MUMBLE_INSTALL_MANDIR}" COMPONENT doc)
endif()
endif()
+
diff --git a/auxiliary_files/config_files/info.mumble.Mumble.appdata.xml.in b/auxiliary_files/config_files/info.mumble.Mumble.appdata.xml.in
index c55463c74..ac6dd1713 100644
--- a/auxiliary_files/config_files/info.mumble.Mumble.appdata.xml.in
+++ b/auxiliary_files/config_files/info.mumble.Mumble.appdata.xml.in
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2019-2022 The Mumble Developers -->
+<!-- Copyright 2019-@MUMBLE_BUILD_YEAR@ The Mumble Developers -->
<component type="desktop-application">
<id>info.mumble.Mumble</id>
<name>Mumble</name>
@@ -8,13 +8,13 @@
<metadata_license>CC0-1.0</metadata_license>
<developer_name>The Mumble Dev-Team</developer_name>
<description>
- <p>Mumble is an open source, low-latency, high quality voice chat software.</p>
+ <p>@CMAKE_PROJECT_DESCRIPTION@</p>
</description>
<content_rating type="oars-1.0">
<content_attribute id="social-chat">intense</content_attribute>
<content_attribute id="social-audio">intense</content_attribute>
</content_rating>
- <url type="homepage">https://www.mumble.info/</url>
+ <url type="homepage">@CMAKE_PROJECT_HOMEPAGE_URL@</url>
<url type="bugtracker">https://github.com/mumble-voip/mumble/issues</url>
<url type="help">https://wiki.mumble.info/wiki/Main_Page</url>
<url type="translate">https://wiki.mumble.info/wiki/Language_Translation</url>
@@ -30,6 +30,6 @@
<release type="stable" version="@CMAKE_PROJECT_VERSION@" date="@BUILD_RELEASE_DATE@" />
</releases>
<provides>
- <binary>mumble</binary>
+ <binary>@MUMBLE_CLIENT_BINARY_NAME@</binary>
</provides>
</component>
diff --git a/auxiliary_files/config_files/info.mumble.Mumble.desktop.in b/auxiliary_files/config_files/info.mumble.Mumble.desktop.in
index bfb06ff2c..d22599b5b 100644
--- a/auxiliary_files/config_files/info.mumble.Mumble.desktop.in
+++ b/auxiliary_files/config_files/info.mumble.Mumble.desktop.in
@@ -3,10 +3,10 @@ Name=Mumble
GenericName=Voice Chat
GenericName[de]=Sprachkonferenz
GenericName[fr]=Chat vocal
-Comment=An open source low-latency, high quality voice chat program
+Comment=@CMAKE_PROJECT_DESCRIPTION@
Comment[de]=Ein Open Source Sprachkonferenzprogramm mit niedriger Latenz und hoher Qualität
Comment[fr]=Un logiciel de chat vocal de haute qualité et de faible latence
-Exec=mumble %u
+Exec=@MUMBLE_CLIENT_BINARY_NAME@ %u
Icon=mumble
Terminal=false
Type=Application
diff --git a/auxiliary_files/config_files/mumble-server.logrotate b/auxiliary_files/config_files/mumble-server.logrotate
deleted file mode 100644
index a6b7a3859..000000000
--- a/auxiliary_files/config_files/mumble-server.logrotate
+++ /dev/null
@@ -1,10 +0,0 @@
-/var/log/mumble-server/mumble-server.log {
- weekly
- rotate 7
- compress
- delaycompress
- missingok
- postrotate
- start-stop-daemon --quiet --oknodo --stop --signal 1 --exec /usr/sbin/murmurd --user mumble-server --pidfile /var/run/mumble-server/mumble-server.pid
- endscript
-}
diff --git a/auxiliary_files/config_files/mumble-server.logrotate.in b/auxiliary_files/config_files/mumble-server.logrotate.in
new file mode 100644
index 000000000..e92479d3e
--- /dev/null
+++ b/auxiliary_files/config_files/mumble-server.logrotate.in
@@ -0,0 +1,10 @@
+/var/log/@MUMBLE_SERVER_BINARY_NAME@/mumble-server.log {
+ weekly
+ rotate 7
+ compress
+ delaycompress
+ missingok
+ postrotate
+ start-stop-daemon --quiet --oknodo --stop --signal 1 --exec /usr/sbin/@MUMBLE_SERVER_BINARY_NAME@ --user mumble-server --pidfile /var/run/@MUMBLE_SERVER_BINARY_NAME@/mumble-server.pid
+ endscript
+}
diff --git a/auxiliary_files/config_files/mumble-server.service b/auxiliary_files/config_files/mumble-server.service.in
index 5b3192b08..2363a1553 100644
--- a/auxiliary_files/config_files/mumble-server.service
+++ b/auxiliary_files/config_files/mumble-server.service.in
@@ -1,10 +1,10 @@
[Unit]
-Description=Mumble Daemon
+Description=Mumble server
After=network.target
[Service]
Type=exec
-ExecStart=/usr/bin/murmurd -fg -ini /etc/murmur.ini
+ExecStart=/usr/bin/@MUMBLE_SERVER_BINARY_NAME@ -fg -ini /etc/mumble-server.ini
Restart=always
PrivateDevices=true
PrivateTmp=true
diff --git a/auxiliary_files/mumble_server.ini b/auxiliary_files/mumble-server.ini
index 8ea70527e..9722b4445 100644
--- a/auxiliary_files/mumble_server.ini
+++ b/auxiliary_files/mumble-server.ini
@@ -12,7 +12,7 @@
; NOT regex = \w* BUT regex = \\w*
; Path to database. If blank, will search for
-; mumble_server.sqlite in default locations or create it if not found.
+; mumble-server.sqlite in default locations or create it if not found.
database=
; The server defaults to using SQLite with its default rollback journal.
@@ -45,7 +45,7 @@ database=
;dbPassword=
;dbHost=
;dbPort=
-;dbPrefix=mumble_server_
+;dbPrefix=mumble-server_
;dbOpts=
; The server defaults to not using D-Bus. If you wish to use dbus, which is one of the
@@ -80,10 +80,10 @@ ice="tcp -h 127.0.0.1 -p 6502"
icesecretwrite=
; Specifies the file the server should log to. By default the server
-; logs to the file 'mumble_server.log'. If you leave this field blank
+; logs to the file 'mumble-server.log'. If you leave this field blank
; on Unix-like systems, the server will force itself into foreground
; mode which logs to the console.
-;logfile=mumble_server.log
+;logfile=mumble-server.log
; If set, the server will write its process ID to this file
; when running in daemon mode (when the -fg flag is not
@@ -255,7 +255,7 @@ allowping=true
; If the keyfile specified above is encrypted with a passphrase, you can enter
; it in this setting. It must be plaintext, so you may wish to adjust the
-; permissions on your mumble_server.ini file accordingly.
+; permissions on your mumble-server.ini file accordingly.
;sslPassPhrase=
; If your certificate is signed by an authority that uses a sub-signed or
diff --git a/auxiliary_files/run_scripts/mumble-overlay b/auxiliary_files/run_scripts/mumble-overlay.in
index f512c5c98..6f32babfa 100755
--- a/auxiliary_files/run_scripts/mumble-overlay
+++ b/auxiliary_files/run_scripts/mumble-overlay.in
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright 2005-2020 The Mumble Developers. All rights reserved.
+# Copyright 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
@@ -12,7 +12,7 @@ fi
for libpath in /usr/lib /usr/lib/mumble /usr/lib32 /usr/lib32/mumble /usr/lib64 /usr/lib64/mumble; do
if [ -d "$libpath" ]; then
- for lib in $libpath/libmumbleoverlay*.so
+ for lib in $libpath/lib@MUMBLE_OVERLAY_BINARY_BASENAME@*.so
do
case $(file -L "$lib") in
*64-bit*) MUMBLE_OVERLAY_PATH_64="$lib" ; echo set ;;
@@ -41,14 +41,14 @@ is32=no
case $(file -L "$binary") in
*64-bit*)
if [ -z "${MUMBLE_OVERLAY_PATH_64}" ]; then
- echo "64-bit libmumbleoverlay.so not found" >&2
+ echo "64-bit lib@MUMBLE_OVERLAY_BINARY_BASENAME@.so not found" >&2
exit 1
fi
MUMBLE_PRELOAD="${MUMBLE_OVERLAY_PATH_64}"
;;
*32-bit*)
if [ -z "${MUMBLE_OVERLAY_PATH_32}" ]; then
- echo "32-bit libmumbleoverlay.so not found" >&2
+ echo "32-bit lib@MUMBLE_OVERLAY_BINARY_BASENAME@.so not found" >&2
exit 1
fi
MUMBLE_PRELOAD="${MUMBLE_OVERLAY_PATH_32}"
@@ -61,7 +61,7 @@ case $(file -L "$binary") in
MUMBLE_PRELOAD="${MUMBLE_PRELOAD} ${MUMBLE_OVERLAY_PATH_32}"
fi
if [ -z "${MUMBLE_PRELOAD}" ]; then
- echo "Neither 32-bit or 64-bit libmumbleoverlay.so found"
+ echo "Neither 32-bit or 64-bit lib@MUMBLE_OVERLAY_BINARY_BASENAME@.so found"
exit 1
fi
esac
diff --git a/auxiliary_files/run_scripts/mumble-server-user-wrapper b/auxiliary_files/run_scripts/mumble-server-user-wrapper.in
index a2c3f50fe..3890e5753 100755
--- a/auxiliary_files/run_scripts/mumble-server-user-wrapper
+++ b/auxiliary_files/run_scripts/mumble-server-user-wrapper.in
@@ -1,11 +1,11 @@
#! /bin/bash
#
-# Copyright 2005-2020 The Mumble Developers. All rights reserved.
+# Copyright 2005-@MUMBLE_BUILD_YEAR@ The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
-DIR=$HOME/murmur
+DIR=$HOME/mumble-server
SYSDIR=/usr/share/doc/mumble-server/examples
if [ $UID == 0 ] || [ $EUID == 0 ]; then
@@ -44,10 +44,10 @@ done
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 "/usr/sbin/@MUMBLE_SERVER_BINARY_NAME@ -ini $DIR/mumble-server.ini"; then
echo "Termination signal sent"
else
- echo "Murmur process not found; not terminated"
+ echo "Mumble server process not found; not terminated"
exit 2
fi
exit 0
@@ -60,46 +60,46 @@ fi
cd $DIR || exit 2
-if [ ! -f $DIR/murmur.ini ]; then
- echo "Creating $DIR/murmur.ini"
- if [ -f $SYSDIR/murmur.ini ]; then
- cp $SYSDIR/murmur.ini $DIR
- elif [ -f $SYSDIR/murmur.ini.gz ]; then
- gzip -cd $SYSDIR/murmur.ini.gz > $DIR/murmur.ini
+if [ ! -f $DIR/mumble-server.ini ]; then
+ echo "Creating $DIR/mumble-server.ini"
+ if [ -f $SYSDIR/mumble-server.ini ]; then
+ cp $SYSDIR/mumble-server.ini $DIR
+ elif [ -f $SYSDIR/mumble-server.ini.gz ]; then
+ gzip -cd $SYSDIR/mumble-server.ini.gz > $DIR/mumble-server.ini
else
- echo "Could not find template for murmur.ini in $SYSDIR."
+ echo "Could not find template for mumble-server.ini in $SYSDIR."
exit 2
fi
elif [ $DO_INITONLY == 1 ]; then
- echo "$DIR/murmur.ini already exists, initialization failed."
+ echo "$DIR/mumble-server.ini already exists, initialization failed."
exit 2
fi
if [ $DO_INITONLY == 1 ]; then
- echo "Initialization done. Please edit $DIR/murmur.ini"
+ echo "Initialization done. Please edit $DIR/mumble-server.ini"
exit 0
fi
if [ "X$SETPW" != "X" ]; then
echo "Setting superuser password to \"$SETPW\""
- /usr/sbin/murmurd -ini $DIR/murmur.ini -supw $SETPW
+ /usr/sbin/@MUMBLE_SERVER_BINARY_NAME@ -ini $DIR/mumble-server.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 "/usr/sbin/@MUMBLE_SERVER_BINARY_NAME@ -ini $DIR/mumble-server.ini")
if [ $DO_STATUS == 1 ]; then
if [ "X$PID" != "X" ]; then
- echo "Murmur is running"
+ echo "Mumble server is running"
exit 1
else
- echo "Murmur is not running"
+ echo "Mumble server is not running"
exit 0
fi
fi
if [ "X$PID" != "X" ]; then
- echo "Murmur is already running."
+ echo "Mumble server is already running."
exit 1
fi
@@ -116,5 +116,5 @@ if ! dbus-send --print-reply --dest=org.freedesktop.DBus --type=method_call / or
fi
fi
-echo "Starting Murmur"
-exec /usr/sbin/murmurd -ini $DIR/murmur.ini
+echo "Starting Mumble server"
+exec /usr/sbin/@MUMBLE_SERVER_BINARY_NAME@ -ini $DIR/mumble-server.ini
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c6ad8bff9..afc09be06 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -21,20 +21,6 @@ option(tracy "Enable the tracy profiler." OFF)
option(bundled-gsl "Use the bundled GSL version instead of looking for one on the system" ON)
-# Locate a usable Python3 interpreter
-include(FindPythonInterpreter)
-set(PYTHON_HINTS
- "C:/Python39-x64" # Path on the AppVeyor CI server
-)
-
-find_python_interpreter(
- VERSION 3
- INTERPRETER_OUT_VAR PYTHON_INTERPRETER
- HINTS ${PYTHON_HINTS}
- REQUIRED
-)
-
-
find_pkg(Qt5
COMPONENTS