Accepting request 730308 from home:cgiboudeaux:noqt4

- Really use the system speex and opus dependencies.
- Run spec-cleaner, use pkgconfig() style BuildRequires when possible.
- Fix the package requirements.
- Remove obsolete conditions and build options.
- Also recommend the Qt mysql and psql backend. Murmur also supports
  those drivers.

OBS-URL: https://build.opensuse.org/request/show/730308
OBS-URL: https://build.opensuse.org/package/show/games:tools/mumble?expand=0&rev=111
This commit is contained in:
Ferdinand Thiessen 2019-09-12 09:53:10 +00:00 committed by Git OBS Bridge
parent e44fc284a2
commit 93fca400d5
2 changed files with 73 additions and 115 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Sep 11 22:45:27 UTC 2019 - Christophe Giboudeaux <christophe@krop.fr>
- Really use the system speex and opus dependencies.
- Run spec-cleaner, use pkgconfig() style BuildRequires when possible.
- Fix the package requirements.
- Remove obsolete conditions and build options.
- Also recommend the Qt mysql and psql backend. Murmur also supports
those drivers.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 10 17:33:25 UTC 2019 - Michal Suchanek <msuchanek@suse.de> Tue Sep 10 17:33:25 UTC 2019 - Michal Suchanek <msuchanek@suse.de>

View File

@ -25,45 +25,47 @@
%endif %endif
%bcond_without pulseaudio %bcond_without pulseaudio
%bcond_without systemd %bcond_without systemd
%bcond_with mumble11x
%bcond_without bonjour %bcond_without bonjour
%bcond_without system_opus
%bcond_without system_speex
# mumble must be able to talk to other clients which may use # mumble must be able to talk to other clients which may use
# differnt versions of celt. Since each celt release is # different versions of celt. Since each celt release is
# incompatible to each other mumble bundles some specific # incompatible to each other mumble bundles some specific
# versions. # versions.
%bcond_with system_celt %bcond_with system_celt
%bcond_with system_opus
%bcond_with system_speex
Name: mumble Name: mumble
Version: %{ver}%{?snapshot:_%{snapshot}} Version: %{ver}%{?snapshot:_%{snapshot}}
Release: 0 Release: 0
Summary: Voice Communication Client for Gamers Summary: Voice Communication Client for Gamers
License: BSD-3-Clause # For Legal: the bundled opus and speex subdirectories are not built.
# Most files are BSD-3-Clause, celt also contains BSD-2-Clause files.
License: BSD-2-Clause AND BSD-3-Clause
Group: Productivity/Multimedia/Sound/Utilities Group: Productivity/Multimedia/Sound/Utilities
Url: http://mumble.sourceforge.net/ URL: http://mumble.sourceforge.net/
Source: https://github.com/mumble-voip/mumble/releases/download/%{ver}%{?snapshot:-%{snapshot}}/%{name}-%{ver}%{?snapshot:-%{snapshot}}.tar.gz
Source1: https://github.com/mumble-voip/mumble/releases/download/%{ver}%{?snapshot:-%{snapshot}}/%{name}-%{ver}%{?snapshot:-%{snapshot}}.tar.gz.sig
Source2: mumble-server.init Source2: mumble-server.init
Source3: murmur.apparmor Source3: murmur.apparmor
# http://mumble.info/gpg/gpg.txt # http://mumble.info/gpg/gpg.txt
Source4: https://raw.githubusercontent.com/mumble-voip/mumble-gpg-signatures/master/mumble-auto-build-2019.asc#/%{name}.keyring Source4: https://raw.githubusercontent.com/mumble-voip/mumble-gpg-signatures/master/mumble-auto-build-2019.asc#/%{name}.keyring
Source5: mumble-server.service Source5: mumble-server.service
Source6: baselibs.conf Source6: baselibs.conf
Patch: add-speechd-include-path.patch Patch0: add-speechd-include-path.patch
BuildRequires: gcc-c++
BuildRequires: libcap-devel
BuildRequires: libogg-devel
BuildRequires: libsndfile-devel
BuildRequires: libspeechd-devel
BuildRequires: protobuf-devel
Requires: lsb-release
%if 0%{?suse_version} > 1325 %if 0%{?suse_version} > 1325
BuildRequires: libboost_headers-devel BuildRequires: libboost_headers-devel
%else %else
BuildRequires: boost-devel BuildRequires: boost-devel
%endif %endif
BuildRequires: gcc-c++
BuildRequires: libcap-devel
BuildRequires: libogg-devel
BuildRequires: libsndfile-devel
BuildRequires: protobuf-devel
Requires: lsb-release
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with bonjour} %if %{with bonjour}
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: avahi-compat-mDNSResponder-devel BuildRequires: pkgconfig(avahi-compat-libdns_sd)
%else %else
BuildRequires: avahi-compat-libdns_sd-devel BuildRequires: avahi-compat-libdns_sd-devel
%endif %endif
@ -76,23 +78,25 @@ Requires: libcelt0 > 0.7.0
BuildRequires: pkgconfig(opus) BuildRequires: pkgconfig(opus)
%endif %endif
%if %{with system_speex} %if %{with system_speex}
BuildRequires: speex-devel BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(speexdsp) BuildRequires: pkgconfig(speexdsp)
%endif %endif
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: Mesa-libGL-devel
BuildRequires: alsa-devel
BuildRequires: libQt5DBus-devel
BuildRequires: libQt5Gui-devel
BuildRequires: libQt5Network-devel
BuildRequires: libQt5Sql-devel
BuildRequires: libQt5Xml-devel
BuildRequires: libXi-devel
BuildRequires: libopenssl-devel
BuildRequires: libqt5-linguist BuildRequires: libqt5-linguist
BuildRequires: libqt5-qtsvg-devel BuildRequires: pkgconfig
BuildRequires: pkg-config
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5TextToSpeech)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(libopenssl)
BuildRequires: pkgconfig(xi)
%endif %endif
%if 0%{?fedora_version} %if 0%{?fedora_version}
BuildRequires: Mesa-libGL-devel BuildRequires: Mesa-libGL-devel
@ -131,11 +135,7 @@ BuildRequires: pkgconfig
%if %{with pulseaudio} %if %{with pulseaudio}
BuildRequires: pulseaudio-devel BuildRequires: pulseaudio-devel
%endif %endif
BuildRequires: libspeechd-devel
Source: https://github.com/mumble-voip/mumble/releases/download/%{ver}%{?snapshot:-%{snapshot}}/%{name}-%{ver}%{?snapshot:-%{snapshot}}.tar.gz
Source1: https://github.com/mumble-voip/mumble/releases/download/%{ver}%{?snapshot:-%{snapshot}}/%{name}-%{ver}%{?snapshot:-%{snapshot}}.tar.gz.sig
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: qt-sql-sqlite
%ifarch x86_64 %ifarch x86_64
Recommends: %{name}-32bit Recommends: %{name}-32bit
Conflicts: %{name}-32bit < %{version} Conflicts: %{name}-32bit < %{version}
@ -144,8 +144,6 @@ Conflicts: %{name}-32bit < %{version}
Recommends: %{name}-64bit Recommends: %{name}-64bit
Conflicts: %{name}-64bit < %{version} Conflicts: %{name}-64bit < %{version}
%endif %endif
%else
Requires: qt4-sqlite
%endif %endif
# #
%if 0%{?snapshot:1} %if 0%{?snapshot:1}
@ -163,8 +161,10 @@ won't be audible to other players.
%package server %package server
Summary: Voice Communication Server for Gamers Summary: Voice Communication Server for Gamers
Group: Productivity/Multimedia/Sound/Utilities Group: Productivity/Multimedia/Sound/Utilities
Recommends: libQt5Sql5-mysql
Recommends: libQt5Sql5-postgresql
Requires: libQt5Sql5-sqlite
Requires: lsb-release Requires: lsb-release
Requires: qt-sql-sqlite
Requires(pre): %{_sbindir}/useradd Requires(pre): %{_sbindir}/useradd
%if 0%{?snapshot:1} %if 0%{?snapshot:1}
Conflicts: mumble-server < %{version} Conflicts: mumble-server < %{version}
@ -182,85 +182,51 @@ won't be audible to other players.
%prep %prep
%setup -q -n %{name}-%{ver} %setup -q -n %{name}-%{ver}
%patch -p1 %patch0 -p1
rm -v scripts/*.bak rm -v scripts/*.bak
%build %build
export PATH=%{_libdir}/qt5/bin:$PATH
export QTDIR=%{_libdir}/qt5/
# #
# #
%if 0 %if 0
# for not having to wait for compile when testing packaging stuff.. # for not having to wait for compile when testing packaging stuff..
mkdir release mkdir release
touch release/mumble release/murmurd release/libmumble.so.1.1.1 touch release/mumble release/murmurd release/libmumble.so.1.1.1
%else
%if 0%{?mandriva_version}
# HACK: mandriva forgot to package qt translations
if [ ! -e %{_libexecdir}/qt4/translations/qt_de.qm ]; then
sed -i -e '/QMAKE_EXTRA_TARGETS/s/copytrans//;/PRE_TARGETDEPS/s/qt_de\.qm//' src/mumble/mumble.pro
sed -i -e '/qt_.*\.qm/d' src/mumble/mumble.qrc
fi
%endif %endif
%qmake5 \ %qmake5 \
QMAKE_CFLAGS_RELEASE="%{optflags} -Wall -fno-strict-aliasing" \ QMAKE_CFLAGS_RELEASE="%{optflags} -Wall -fno-strict-aliasing" \
QMAKE_CXXFLAGS_RELEASE="%{optflags} -Wall -fno-strict-aliasing" \ QMAKE_CXXFLAGS_RELEASE="%{optflags} -Wall -fno-strict-aliasing" \
QMAKE_LRELEASE="%{_bindir}/lrelease-qt5" \ QMAKE_LRELEASE="%{_bindir}/lrelease-qt5" \
DEFINES*=NO_UPDATE_CHECK \ DEFINES*=NO_UPDATE_CHECK \
DEFINES*=MUMBLE_VERSION=%{version} \ DEFINES*=MUMBLE_VERSION=%{version} \
DEFINES*=PLUGIN_PATH=%{_libdir}/mumble/plugins \ DEFINES*=PLUGIN_PATH=%{_libdir}/mumble/plugins \
CONFIG*=packaged \ CONFIG*=packaged \
%if 0%{?suse_version} %if 0%{?suse_version}
DEFINES*=NO_SYSTEM_CA_OVERRIDE \ DEFINES*=NO_SYSTEM_CA_OVERRIDE \
%endif %endif
CONFIG*=no-g15 \ CONFIG*=no-g15 \
CONFIG*=no-embed-qt-translations \ CONFIG*=no-embed-qt-translations \
%if !%{with ice} %if !%{with ice}
CONFIG*=no-ice \ CONFIG*=no-ice \
%endif %endif
%if %{with system_celt} %if %{with system_celt}
CONFIG*=no-bundled-celt \ CONFIG*=no-bundled-celt \
%endif %endif
%if %{with system_speex} %if %{with system_speex}
CONFIG*=no-bundled-opus \ CONFIG*=no-bundled-opus \
%endif %endif
%if %{with system_speex} %if %{with system_speex}
CONFIG*=no-bundled-speex \ CONFIG*=no-bundled-speex \
%endif
%if !%{with mumble11x}
CONFIG*=no-11x \
%endif %endif
%if !%{with bonjour} %if !%{with bonjour}
CONFIG*=no-bonjour \ CONFIG*=no-bonjour \
%endif %endif
%if !%{with pulseaudio} %if !%{with pulseaudio}
CONFIG*=no-pulseaudio \ CONFIG*=no-pulseaudio \
%endif %endif
%if 0%{?suse_version} == 1110 CONFIG*=no-crash-report \
CONFIG*=no-xinput2 \ -recursive
%endif
%if 0%{?suse_version} > 1500
CONFIG*=c++1z \
%endif
CONFIG*=no-crash-report \
-recursive
# #
### XXX: hack for incomplete dependencies
make %{?_smp_mflags} qmake
%if 0
# that translation stuff is just broken
# copy the available ones manually
%if 0%{?suse_version}
cp %{_datadir}/qt4/translations/qt_*.qm src/mumble
# 10.3 doesn't have that one
touch src/mumble/qt_pl.qm
%endif
make %{?_smp_mflags} -C src/mumble mumble_en.qm
%if !0%{?mandriva_version}
make %{?_smp_mflags} -C src/mumble qt_de.qm
%endif
#
%endif
# Include is broken for openSUSE, so fix it. # Include is broken for openSUSE, so fix it.
sed -i "s,<libspeechd.h>,<speech-dispatcher/libspeechd.h>," src/mumble/TextToSpeech_unix.cpp sed -i "s,<libspeechd.h>,<speech-dispatcher/libspeechd.h>," src/mumble/TextToSpeech_unix.cpp
### ###
@ -269,11 +235,10 @@ sed -i "s,<libspeechd.h>,<speech-dispatcher/libspeechd.h>," src/mumble/TextToSpe
# them manually first # them manually first
for i in src/* ; do for i in src/* ; do
grep -q compiler_pb_make_all $i/Makefile.Release || continue grep -q compiler_pb_make_all $i/Makefile.Release || continue
make -C $i -f Makefile.Release compiler_pb_make_all make %{?_smp_mflags} -C $i -f Makefile.Release compiler_pb_make_all
done done
make %{?_smp_mflags} make %{?_smp_mflags}
%endif
%install %install
# client # client
@ -299,13 +264,6 @@ install -m0755 release/libmumble.so.*.*.* "%{buildroot}%{_libdir}/mumble"
install -m 644 release/libcelt0.so.0.*.* "%{buildroot}%{_libdir}/mumble" install -m 644 release/libcelt0.so.0.*.* "%{buildroot}%{_libdir}/mumble"
%endif %endif
#
%if %{with mumble11x}
install -D -m 0755 release/mumble11x %{buildroot}%{_bindir}/mumble11x
%else
# XXX
/bin/rm -f "%{buildroot}%{_mandir}"/man1/mumble11x*
%endif
# #
# server # server
install -D -m 0755 release/murmurd "%{buildroot}%{_sbindir}/murmurd" install -D -m 0755 release/murmurd "%{buildroot}%{_sbindir}/murmurd"
@ -330,30 +288,26 @@ install -D -m 0644 scripts/murmur.conf %{buildroot}%{_sysconfdir}/dbus-1/system.
install -D -m 0644 scripts/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini install -D -m 0644 scripts/murmur.ini %{buildroot}%{_sysconfdir}/mumble-server.ini
# fix up config file # fix up config file
sed -i -e 's/^dbus=session/dbus=system/' \ sed -i -e 's/^dbus=session/dbus=system/' \
-e 's/#uname=/uname=mumble-server/' \ -e 's/#uname=/uname=mumble-server/' \
-e 's@#pidfile=@pidfile=%{_localstatedir}/run/mumble-server/mumble-server.pid@' \ -e 's@#pidfile=@pidfile=%{_localstatedir}/run/mumble-server/mumble-server.pid@' \
-e 's@#logfile=@logfile=%{_localstatedir}/log/mumble-server/@' \ -e 's@#logfile=@logfile=%{_localstatedir}/log/mumble-server/@' \
%{buildroot}%{_sysconfdir}/mumble-server.ini %{buildroot}%{_sysconfdir}/mumble-server.ini
install -D -m 0755 scripts/murmur-user-wrapper %{buildroot}%{_bindir}/murmur-user-wrapper install -D -m 0755 scripts/murmur-user-wrapper %{buildroot}%{_bindir}/murmur-user-wrapper
sed -i -e '/^SYSDIR=/s@=.*@=%{_docdir}/%{name}/scripts@' %{buildroot}%{_bindir}/murmur-user-wrapper sed -i -e '/^SYSDIR=/s@=.*@=%{_docdir}/%{name}/scripts@' %{buildroot}%{_bindir}/murmur-user-wrapper
for i in log lib run; do for i in log lib run; do
install -d -m755 %{buildroot}%{_localstatedir}/$i/mumble-server install -d -m755 %{buildroot}%{_localstatedir}/$i/mumble-server
done done
# #
install -d %{buildroot}/%{_datadir}/applications install -d %{buildroot}/%{_datadir}/applications
%if 0%{?suse_version} %if 0%{?suse_version}
sed 's/^Categories.*/Categories=X-SuSE-Core-Game;/' \ sed 's/^Categories.*/Categories=X-SuSE-Core-Game;/' \
< scripts/mumble.desktop \ < scripts/mumble.desktop \
> %{buildroot}/%{_datadir}/applications/mumble.desktop > %{buildroot}/%{_datadir}/applications/mumble.desktop
%suse_update_desktop_file mumble %suse_update_desktop_file mumble
%else %else
install -m 644 scripts/mumble.desktop %{buildroot}/%{_datadir}/applications/mumble.desktop install -m 644 scripts/mumble.desktop %{buildroot}/%{_datadir}/applications/mumble.desktop
%endif %endif
%if %{with mumble11x}
sed -e '/^Name=/s/$/ 1.1.x/;/^Exec=/s/$/11x/' \
< %{buildroot}/%{_datadir}/applications/mumble.desktop \
> %{buildroot}/%{_datadir}/applications/mumble11x.desktop
%endif
mkdir -p %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_docdir}/%{name}
cp -a scripts LICENSE README README.Linux %{buildroot}%{_docdir}/%{name} cp -a scripts LICENSE README README.Linux %{buildroot}%{_docdir}/%{name}
# #
@ -393,17 +347,12 @@ systemd-tmpfiles --create %{_libexecdir}/tmpfiles.d/mumble-server.conf || true
%endif %endif
%files %files
%defattr(-, root, root)
%exclude %{_docdir}/%{name}/scripts/murmur.ini %exclude %{_docdir}/%{name}/scripts/murmur.ini
%doc %{_docdir}/%{name} %doc %{_docdir}/%{name}
%{_bindir}/mumble %{_bindir}/mumble
%{_bindir}/mumble-overlay %{_bindir}/mumble-overlay
%{_mandir}/man1/mumble-overlay.* %{_mandir}/man1/mumble-overlay.*
%{_mandir}/man1/mumble.* %{_mandir}/man1/mumble.*
%if %{with mumble11x}
%{_bindir}/mumble11x
%{_mandir}/man1/mumble11x*
%endif
%dir %{_datadir}/icons/hicolor %dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/* %dir %{_datadir}/icons/hicolor/*
%dir %{_datadir}/icons/hicolor/*/apps %dir %{_datadir}/icons/hicolor/*/apps
@ -413,7 +362,6 @@ systemd-tmpfiles --create %{_libexecdir}/tmpfiles.d/mumble-server.conf || true
%{_libdir}/mumble %{_libdir}/mumble
%files server %files server
%defattr(-,root,root)
%doc %{_docdir}/%{name}/scripts/murmur.ini %doc %{_docdir}/%{name}/scripts/murmur.ini
%config %{_sysconfdir}/dbus-1/system.d/mumble-server.conf %config %{_sysconfdir}/dbus-1/system.d/mumble-server.conf
%config(noreplace) %{_sysconfdir}/mumble-server.ini %config(noreplace) %{_sysconfdir}/mumble-server.ini