Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # configuration options for the server (murmur)
- %define build_server 1
- %define build_web 1
- %define build_ice 0
- # configuration options for the client
- %define build_client 1
- %define build_speechd 1
- %define build_g15 1
- %{?_without_server: %{expand: %%global build_server 0}}
- %{?_without_server: %{expand: %%global build_ice 0}}
- %{?_with_server: %{expand: %%global build_server 1}}
- %{?_without_ice: %{expand: %%global build_ice 0}}
- %{?_with_ice: %{expand: %%global build_ice 1}}
- %{?_without_client: %{expand: %%global build_client 0}}
- %{?_without_client: %{expand: %%global build_speechd 0}}
- %{?_without_client: %{expand: %%global build_g15 0}}
- %{?_with_client: %{expand: %%global build_client 1}}
- %{?_without_speechd: %{expand: %%global build_speechd 0}}
- %{?_with_speechd: %{expand: %%global build_speechd 1}}
- %{?_without_g15: %{expand: %%global build_g15 0}}
- %{?_with_g15: %{expand: %%global build_g15 1}}
- Summary: Low-latency, high-quality voice communication for gamers
- Name: mumble
- Version: 1.2.5
- Release: %mkrel 1
- License: BSD
- Group: Communications/Telephony
- Url: http://mumble.sourceforge.net/
- Source0: http://sourceforge.net/projects/mumble/files/Mumble/%{version}/%{name}-%{version}.tar.gz
- # conf files courtesy of debian package
- Source1: mumble-server.ini
- Source2: mumble-server-web.conf
- Source3: MurmurPHP.ini
- Source4: README.install.urpmi.mumble-server-web
- Source5: mumble-server-init.mdv
- Source6: mumble-server.logrotate
- Source7: mumble-tmpfiles.conf
- Patch0: mumble-1.2.5-fdr-slice2cpp.patch
- Patch1: mumble-1.2.4-fdr-celt_include_dir.patch
- # Fix broken logrotate script (start-stop-daemon not available anymore), BZ 730129
- Patch2: mumble-1.2.3-fdr-logrotate.patch
- Patch3: mumble-1.2.5-fdr-mga-fix-speechd.patch
- # Upstream patch to fix hang on startup
- # https://github.com/mumble-voip/mumble/commit/dee463ef52d8406d0a925facfabead616f0f9dc2
- Patch4: 0001-bonjour-use-Qt-AutoConnection-for-BonjourServiceReso.patch
- BuildRequires: kde4-macros
- BuildRequires: desktop-file-utils
- BuildRequires: qt4-devel >= 4.4.1
- BuildRequires: qt4-linguist >= 4.4.1
- BuildRequires: boost-devel
- BuildRequires: protobuf-devel
- BuildRequires: protobuf-compiler
- BuildRequires: avahi-compat-libdns_sd-devel
- BuildRequires: cap-devel
- BuildRequires: pkgconfig(speex) >= 1.2
- BuildRequires: pkgconfig(celt071)
- BuildRequires: pkgconfig(libpulse)
- BuildRequires: pkgconfig(alsa)
- BuildRequires: pkgconfig(ogg)
- BuildRequires: pkgconfig(libssl)
- BuildRequires: pkgconfig(xevie)
- BuildRequires: pkgconfig(xi) >= 1.6.0
- BuildRequires: pkgconfig(sndfile)
- BuildRequires: pkgconfig(libcap-ng)
- BuildRequires: pkgconfig(opus)
- %if %build_speechd
- BuildRequires: speech-dispatcher-devel
- %endif
- %if %build_g15
- BuildRequires: g15daemon_client-devel
- %endif
- # (cg) The celt libraries are loaded dynamically but we need at least 0.7.1 to
- # be compatible with the Windows and OSX clients
- # The 0.11 version can work if the clients (and presumably the server) all
- # support it.
- # Using mklibname is not ideal but it's the easiest option for now
- Requires: %{mklibname celt 071 0}
- Suggests: %{mklibname celt 0 2}
- Requires: qt4-database-plugin-sqlite >= 4.3.0
- Requires: %{name}-plugins = %{version}-%{release}
- Suggests: %{name}.protocol
- Obsoletes: mumble-11x < 1.2.3-15
- %if %build_speechd
- Suggests: speech-dispatcher
- %endif
- %if %build_g15
- Suggests: g15daemon
- %endif
- %description
- Low-latency, high-quality voice communication for gamers.
- Includes game linking, so voice from other players comes
- from the direction of their characters, and has echo
- cancellation so the sound from your loudspeakers won't be
- audible to other players.
- %package protocol-kde4
- Summary: The mumble protocol for KDE4
- Group: Graphical desktop/KDE
- Requires: %{name} = %{version}-%{release}
- %description protocol-kde4
- The mumble protocol for KDE4.
- %package plugins
- Summary: Mumble plugins
- Group: Communications/Telephony
- Requires: %{name} = %{version}-%{release}
- %description plugins
- This packages provides the Mumble plugins.
- %if %build_server
- %package server
- Summary: Murmur, the VOIP server for Mumble
- Group: Communications/Telephony
- Requires(post): systemd >= %{systemd_required_version}
- Requires(pre): rpm-helper
- Requires(post): rpm-helper
- Requires(preun): rpm-helper
- %if %build_ice
- BuildRequires: ice-devel
- # (cg) ice-devel should require this itself, but it doesn't...
- BuildRequires: ice
- %endif
- Requires: qt4-database-plugin-sqlite >= 4.3.0
- Requires: dbus
- %if !%build_web
- Conflicts: %{name}-server-web
- %endif
- %description server
- This package provides Murmur, the VOIP server for Mumble.
- %if %build_web
- %package server-web
- Summary: Web scripts for mumble-server
- Group: Communications/Telephony
- Requires: apache
- Requires: perl-CGI
- Requires: mail-server
- %if %build_ice
- Requires: php-ice
- Requires: ice
- %endif
- Requires: %{name}-server = %{version}-%{release}
- %description server-web
- This package contains the web scripts for mumble-server.
- %endif
- %endif
- %prep
- %setup -q
- %apply_patches
- cp -pr %{SOURCE4} README.install.urpmi
- #remove bundled celt
- rm -rf celt*
- %build
- %qmake_qt4 main.pro \
- %if %build_server == 0
- CONFIG+=no-server \
- %endif
- %if %build_ice == 0
- CONFIG+=no-ice \
- %endif
- %if %build_client == 0
- CONFIG+=no-client \
- %endif
- %if %build_speechd == 0
- CONFIG+=no-speechd \
- %endif
- %if %build_g15 == 0
- CONFIG+=no-g15 \
- %endif
- CONFIG+=no-bundled-speex \
- CONFIG+=no-bundled-celt \
- CONFIG+=no-embed-qt-translations \
- CONFIG+=no-update \
- DEFINES+=PLUGIN_PATH=%{_libdir}/%{name} \
- DEFINES+=DEFAULT_SOUNDSYSTEM=PulseAudio
- %make
- %{qt4bin}/lrelease src/mumble/*.ts
- %install
- %if %build_client
- # --- Mumble install ---
- install -D -m 0755 release/%{name} %{buildroot}%{_bindir}/%{name}
- install -m 0755 scripts/%{name}-overlay %{buildroot}%{_bindir}/%{name}-overlay
- install -D -m 0644 scripts/%{name}.protocol %{buildroot}%{_kde_services}/%{name}.protocol
- install -d -m 0755 %{buildroot}%{_libdir}/%{name}/plugins
- cp -pr release/libmumble* %{buildroot}%{_libdir}/%{name}/
- cp -pr release/plugins/liblink.so %{buildroot}%{_libdir}/%{name}/
- # Mumble icons
- install -D -m 0644 icons/%{name}.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
- # Mumble desktop file
- install -d -m 0755 %{buildroot}%{_datadir}/applications
- install -m 0644 scripts/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
- desktop-file-install \
- --remove-category="Qt" \
- --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/*
- #translations
- mkdir -p %{buildroot}%{_datadir}/%{name}/translations
- install -m 0644 src/%{name}/*.qm %{buildroot}%{_datadir}/%{name}/translations/
- %endif
- %if %build_server
- # --- Mumble-server/Murmur install ---
- install -D -m 0755 release/murmurd "%{buildroot}%{_sbindir}/murmurd"
- install -D -m 0755 scripts/murmur-user-wrapper %{buildroot}%{_bindir}/murmur-user-wrapper
- mkdir -p %{buildroot}%{_sysconfdir}/{dbus-1/system.d,logrotate.d}
- install -m 0644 scripts/murmur.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/%{name}-server.conf
- install -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-server
- install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}-server.ini
- %if %build_ice
- # install Mumur.ice in /usr/share/slice
- install -D -m 0755 src/murmur/Murmur.ice %{buildroot}%{_datadir}/slice/Murmur.ice
- %endif
- # install initscript
- mkdir -p %{buildroot}%{_initrddir}
- install -m 0744 %{SOURCE5} %{buildroot}%{_initrddir}/%{name}-server
- # create database directory
- install -d -m 0755 %{buildroot}%{_var}/lib/%{name}-server
- # create log directory
- install -d -m 0755 %{buildroot}%{_var}/log/%{name}-server
- # create tmpfiles directory
- install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}-server.conf
- # install example
- mkdir -p %{buildroot}%{_var}/%{name}-server/examples
- # create pidfile directory
- install -d -m 0755 %{buildroot}%{_var}/run/%{name}-server
- %if %build_web
- # --- Mumble-server-web files ---
- install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf
- %if %build_ice
- install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/php.d/MurmurPHP.ini
- install -D -m 0644 scripts/weblist.php %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.php
- %endif
- install -D -m 0755 scripts/weblist.pl %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.cgi
- install -D -m 0755 scripts/murmur.pl %{buildroot}%{_datadir}/%{name}-server-web/www/register.cgi
- pushd %{buildroot}%{_datadir}/%{name}-server-web/www
- ln -s weblist.php index.php
- popd
- %endif
- %endif
- # --- Manpages ---
- install -d -m 0755 %{buildroot}%{_mandir}/man1
- %if %build_server
- install -m 0644 man/murmur* %{buildroot}%{_mandir}/man1
- %endif
- %if %build_client
- install -m 0644 man/mumble* %{buildroot}%{_mandir}/man1
- %endif
- %if %build_server
- %pre server
- %_pre_useradd %{name}-server %{_var}/lib/%{name}-server /bin/sh
- %post server
- %_tmpfilescreate %{name}-server
- %_post_service %{name}-server
- %preun server
- %_preun_service %{name}-server
- %postun server
- %_postun_userdel %{name}-server
- %endif
- %if %build_client
- %files
- %doc README README.Linux CHANGES LICENSE
- %{_bindir}/%{name}
- %{_bindir}/%{name}-overlay
- %{_datadir}/%{name}/
- %{_datadir}/applications/%{name}.desktop
- %{_iconsdir}/hicolor/*/apps/%{name}.svg
- %{_mandir}/man1/%{name}.*
- %{_mandir}/man1/%{name}-overlay.*
- %files protocol-kde4
- %{_kde_services}/%{name}.protocol
- %files plugins
- %{_libdir}/%{name}
- %endif
- %if %build_server
- %files server
- %if %build_client == 0
- %doc README README.Linux CHANGES LICENSE
- %endif
- %doc scripts/murmur.ini
- %{_bindir}/murmur-user-wrapper
- %{_sbindir}/murmurd
- %{_initrddir}/%{name}-server
- %{_tmpfilesdir}/%{name}-server.conf
- %config(noreplace) %{_sysconfdir}/%{name}-server.ini
- %{_sysconfdir}/logrotate.d/%{name}-server
- %{_sysconfdir}/dbus-1/system.d/%{name}-server.conf
- %attr(-,mumble-server,mumble-server) %dir %{_var}/lib/%{name}-server
- %attr(-,mumble-server,root) %dir %{_var}/log/%{name}-server
- %attr(-,mumble-server,mumble-server) %dir %{_var}/run/%{name}-server
- %if %build_ice
- %{_datadir}/slice/Murmur.ice
- %endif
- %{_mandir}/man1/murmur-user-wrapper.*
- %{_mandir}/man1/murmurd.*
- %if %build_web
- %files server-web
- %doc README.install.urpmi
- %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf
- %if %build_ice
- %config(noreplace) %{_sysconfdir}/php.d/MurmurPHP.ini
- %endif
- %{_datadir}/%{name}-server-web
- %endif
- %endif
Advertisement
Add Comment
Please, Sign In to add comment