1 |
# configuration options for the server (murmur) |
2 |
%define build_server 1 |
3 |
%define build_web 1 |
4 |
%define build_ice 1 |
5 |
# configuration options for the client |
6 |
%define build_client 1 |
7 |
%define build_speechd 1 |
8 |
%define build_g15 1 |
9 |
|
10 |
%{?_without_server: %{expand: %%global build_server 0}} |
11 |
%{?_without_server: %{expand: %%global build_ice 0}} |
12 |
%{?_with_server: %{expand: %%global build_server 1}} |
13 |
|
14 |
%{?_without_ice: %{expand: %%global build_ice 0}} |
15 |
%{?_with_ice: %{expand: %%global build_ice 1}} |
16 |
|
17 |
%{?_without_client: %{expand: %%global build_client 0}} |
18 |
%{?_without_client: %{expand: %%global build_speechd 0}} |
19 |
%{?_without_client: %{expand: %%global build_g15 0}} |
20 |
%{?_with_client: %{expand: %%global build_client 1}} |
21 |
|
22 |
%{?_without_speechd: %{expand: %%global build_speechd 0}} |
23 |
%{?_with_speechd: %{expand: %%global build_speechd 1}} |
24 |
|
25 |
%{?_without_g15: %{expand: %%global build_g15 0}} |
26 |
%{?_with_g15: %{expand: %%global build_g15 1}} |
27 |
|
28 |
Summary: Low-latency, high-quality voice communication for gamers |
29 |
Name: mumble |
30 |
Version: 1.2.3 |
31 |
Release: %mkrel 9 |
32 |
License: BSD-like |
33 |
Group: Communications/Telephony |
34 |
Url: http://mumble.sourceforge.net/ |
35 |
Source0: http://downloads.sourceforge.net/mumble/%{name}-%{version}.tar.gz |
36 |
# conf files courtesy of debian package |
37 |
Source1: %{name}-server.ini |
38 |
Source2: %{name}-server-web.conf |
39 |
Source3: MurmurPHP.ini |
40 |
Source4: README.install.urpmi.mumble-server-web |
41 |
Source5: %{name}-server-init.mdv |
42 |
Source6: %{name}-server.logrotate |
43 |
Source7: %{name}-tmpfiles.conf |
44 |
Patch0: %{name}-1.2.1-mdv-fix-string-error.patch |
45 |
Patch1: mumble-1.2.2-link.patch |
46 |
Patch2: mumble-1.2.3-build-with-celt071.patch |
47 |
Patch3: mumble-1.2.3-mageia-celt-libnames.patch |
48 |
Patch4: 0001-Explicitly-remove-file-permissions-for-settings-and-.patch |
49 |
Patch5: mumble-1.2.3-ice-3.3.1-path.patch |
50 |
Patch6: mumble-1.2.3-ice-php-include-path.patch |
51 |
BuildConflicts: celt-devel >= 0.7.0 |
52 |
BuildRequires: kde4-macros |
53 |
BuildRequires: libspeex-devel |
54 |
BuildRequires: celt071-devel |
55 |
BuildRequires: qt4-devel >= 4.4.1 |
56 |
BuildRequires: boost-devel |
57 |
BuildRequires: pulseaudio-devel |
58 |
BuildRequires: libalsa-devel |
59 |
BuildRequires: libogg-devel |
60 |
BuildRequires: openssl-devel |
61 |
BuildRequires: libxevie-devel |
62 |
BuildRequires: qt4-linguist >= 4.4.1 |
63 |
BuildRequires: protobuf-devel |
64 |
BuildRequires: protobuf-compiler |
65 |
BuildRequires: avahi-compat-libdns_sd-devel |
66 |
BuildRequires: pkgconfig(sndfile) |
67 |
BuildRequires: cap-devel |
68 |
|
69 |
%if %build_speechd |
70 |
BuildRequires: speech-dispatcher-devel |
71 |
%endif |
72 |
|
73 |
%if %build_g15 |
74 |
BuildRequires: g15daemon_client-devel |
75 |
%endif |
76 |
|
77 |
# (cg) The celt libraries are loaded dynamically but we need at least 0.7.1 to |
78 |
# be compatible with the Windows and OSX clients |
79 |
# The 0.11 version can work if the clients (and presumably the server) all |
80 |
# support it. |
81 |
# Using mklibname is not ideal but it's the easiest option for now |
82 |
Requires: %{mklibname celt 071 0} |
83 |
Suggests: %{mklibname celt 0 2} |
84 |
|
85 |
Requires: qt4-database-plugin-sqlite >= 4.3.0 |
86 |
Requires: %{name}-plugins = %{version}-%{release} |
87 |
Suggests: %{name}.protocol |
88 |
|
89 |
%if %build_speechd |
90 |
Suggests: speech-dispatcher |
91 |
%endif |
92 |
|
93 |
%if %build_g15 |
94 |
Suggests: g15daemon |
95 |
%endif |
96 |
|
97 |
%description |
98 |
Low-latency, high-quality voice communication for gamers. |
99 |
|
100 |
Includes game linking, so voice from other players comes |
101 |
from the direction of their characters, and has echo |
102 |
cancellation so the sound from your loudspeakers won't be |
103 |
audible to other players. |
104 |
|
105 |
%package 11x |
106 |
Summary: The 1.1.x compatible client for mumble |
107 |
Group: Communications/Telephony |
108 |
Requires: %{name} = %{version}-%{release} |
109 |
|
110 |
%description 11x |
111 |
This package provides the 1.1.x compatible client for Mumble, used |
112 |
to connect to older servers. |
113 |
|
114 |
%package protocol-kde4 |
115 |
Summary: The mumble protocol for KDE4 |
116 |
Group: Graphical desktop/KDE |
117 |
Requires: %{name} = %{version}-%{release} |
118 |
|
119 |
%description protocol-kde4 |
120 |
The mumble protocol for KDE4. |
121 |
|
122 |
%package plugins |
123 |
Summary: Mumble plugins |
124 |
Group: Communications/Telephony |
125 |
Requires: %{name} = %{version}-%{release} |
126 |
# 24 may 2009 : necessary for upgrading |
127 |
Provides: %mklibname %{name} 1 |
128 |
Provides: %mklibname %{name} -d |
129 |
Obsoletes: %mklibname %{name} 1 |
130 |
Obsoletes: %mklibname %{name} -d |
131 |
|
132 |
%description plugins |
133 |
This packages provides the Mumble plugins. |
134 |
|
135 |
%if %build_server |
136 |
%package server |
137 |
Summary: Murmur, the VOIP server for Mumble |
138 |
Group: Communications/Telephony |
139 |
Requires(post): systemd >= %{systemd_required_version} |
140 |
Requires(pre): rpm-helper |
141 |
Requires(post): rpm-helper |
142 |
Requires(preun): rpm-helper |
143 |
%if %build_ice |
144 |
BuildRequires: ice-devel |
145 |
# (cg) ice-devel should require this itself, but it doesn't... |
146 |
BuildRequires: ice |
147 |
%endif |
148 |
Requires: qt4-database-plugin-sqlite >= 4.3.0 |
149 |
Requires: dbus |
150 |
%if !%build_web |
151 |
Conflicts: %{name}-server-web |
152 |
%endif |
153 |
|
154 |
%description server |
155 |
This package provides Murmur, the VOIP server for Mumble. |
156 |
|
157 |
%if %build_web |
158 |
%package server-web |
159 |
Summary: Web scripts for mumble-server |
160 |
Group: Communications/Telephony |
161 |
Requires: apache |
162 |
Requires: perl-CGI |
163 |
Requires: mail-server |
164 |
%if %build_ice |
165 |
Requires: php-ice |
166 |
Requires: ice |
167 |
%endif |
168 |
Requires: %{name}-server = %{version}-%{release} |
169 |
|
170 |
%description server-web |
171 |
This package contains the web scripts for mumble-server. |
172 |
|
173 |
%endif |
174 |
%endif |
175 |
|
176 |
%prep |
177 |
%setup -q |
178 |
%patch0 -p0 |
179 |
%patch1 -p0 |
180 |
%patch2 -p0 -b .celt071 |
181 |
%patch3 -p1 -b .celt-lib-names |
182 |
%patch4 -p1 -b .cve-2012-0863 |
183 |
%patch5 -p1 -b .ice-path |
184 |
%patch6 -p0 -b .ice-php-incl-path |
185 |
|
186 |
cp -p %{SOURCE4} README.install.urpmi |
187 |
|
188 |
#remove bundled celt |
189 |
rm -rf celt* |
190 |
|
191 |
%build |
192 |
%qmake_qt4 main.pro \ |
193 |
%if %build_server == 0 |
194 |
CONFIG+=no-server \ |
195 |
%endif |
196 |
%if %build_ice == 0 |
197 |
CONFIG+=no-ice \ |
198 |
%endif |
199 |
%if %build_client == 0 |
200 |
CONFIG+=no-client \ |
201 |
%endif |
202 |
%if %build_speechd == 0 |
203 |
CONFIG+=no-speechd \ |
204 |
%endif |
205 |
%if %build_g15 == 0 |
206 |
CONFIG+=no-g15 \ |
207 |
%endif |
208 |
CONFIG+=no-bundled-speex \ |
209 |
CONFIG+=no-bundled-celt \ |
210 |
CONFIG+=no-embed-qt-translations \ |
211 |
CONFIG+=no-update \ |
212 |
DEFINES+=PLUGIN_PATH=%{_libdir}/%{name} \ |
213 |
DEFINES+=DEFAULT_SOUNDSYSTEM=PulseAudio |
214 |
|
215 |
%make -j2 |
216 |
|
217 |
%install |
218 |
rm -rf %{buildroot} |
219 |
|
220 |
%if %build_client |
221 |
# --- Mumble install --- |
222 |
|
223 |
install -D -m 0755 release/%{name} %{buildroot}%{_bindir}/%{name} |
224 |
install -m 0755 scripts/%{name}-overlay %{buildroot}%{_bindir}/%{name}-overlay |
225 |
install -D -m 0755 scripts/%{name}.protocol %{buildroot}%{_kde_datadir}/kde4/services/%{name}.protocol |
226 |
install -d -m 0755 %{buildroot}%{_libdir}/%{name}/plugins |
227 |
cp -Pp release/libmumble* %{buildroot}%{_libdir}/%{name}/ |
228 |
cp -p release/plugins/liblink.so %{buildroot}%{_libdir}/%{name}/ |
229 |
|
230 |
# ---Mumble 11X --- |
231 |
install -D -m 0755 release/%{name}11x %{buildroot}%{_bindir}/%{name}11x |
232 |
|
233 |
# Mumble icons |
234 |
install -D -m 0644 icons/%{name}.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg |
235 |
|
236 |
# Mumble desktop file |
237 |
install -d -m 0755 %{buildroot}%{_datadir}/applications |
238 |
install -m 0644 scripts/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop |
239 |
desktop-file-install \ |
240 |
--remove-category="Qt" \ |
241 |
--dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* |
242 |
|
243 |
# Create a Mumble11x desktop file from the Mumble one |
244 |
sed -e "s/Name\=Mumble/Name\=Mumble-11x/g" \ |
245 |
-e "s/Exec\=mumble/Exec\=mumble11x/g" \ |
246 |
%{buildroot}%{_datadir}/applications/%{name}.desktop \ |
247 |
> %{buildroot}%{_datadir}/applications/%{name}11x.desktop |
248 |
%endif |
249 |
|
250 |
%if %build_server |
251 |
# --- Mumble-server/Murmur install --- |
252 |
|
253 |
install -D -m0755 release/murmurd "%{buildroot}%{_sbindir}/murmurd" |
254 |
install -D -m0755 scripts/murmur-user-wrapper %{buildroot}%{_bindir}/murmur-user-wrapper |
255 |
mkdir -p %{buildroot}%{_sysconfdir}/{dbus-1/system.d,logrotate.d} |
256 |
install -m0644 scripts/murmur.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/%{name}-server.conf |
257 |
install -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-server |
258 |
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}-server.ini |
259 |
|
260 |
%if %build_ice |
261 |
# install Mumur.ice in /usr/share/slice |
262 |
install -D -m0755 src/murmur/Murmur.ice %{buildroot}%{_datadir}/slice/Murmur.ice |
263 |
%endif |
264 |
|
265 |
# install initscript |
266 |
mkdir -p %{buildroot}%{_initrddir} |
267 |
install -m0744 %{SOURCE5} %{buildroot}%{_initrddir}/%{name}-server |
268 |
|
269 |
# create database directory |
270 |
install -d -m0755 %{buildroot}%{_var}/lib/%{name}-server |
271 |
|
272 |
# create log directory |
273 |
install -d -m0755 %{buildroot}%{_var}/log/%{name}-server |
274 |
|
275 |
# create tmpfiles directory |
276 |
install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}-server.conf |
277 |
|
278 |
# install example |
279 |
mkdir -p %{buildroot}%{_var}/%{name}-server/examples |
280 |
|
281 |
|
282 |
%if %build_web |
283 |
# --- Mumble-server-web files --- |
284 |
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf |
285 |
%if %build_ice |
286 |
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/php.d/MurmurPHP.ini |
287 |
install -D -m0644 scripts/weblist.php %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.php |
288 |
%endif |
289 |
install -D -m0755 scripts/weblist.pl %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.cgi |
290 |
install -D -m0755 scripts/murmur.pl %{buildroot}%{_datadir}/%{name}-server-web/www/register.cgi |
291 |
pushd %{buildroot}%{_datadir}/%{name}-server-web/www |
292 |
ln -s weblist.php index.php |
293 |
popd |
294 |
%endif |
295 |
%endif |
296 |
|
297 |
# --- Manpages --- |
298 |
install -d -m 0755 %{buildroot}%{_mandir}/man1 |
299 |
%if %build_server |
300 |
install -m 0644 man/murmur* %{buildroot}%{_mandir}/man1 |
301 |
%endif |
302 |
%if %build_client |
303 |
install -m 0644 man/mumble* %{buildroot}%{_mandir}/man1 |
304 |
%endif |
305 |
|
306 |
%if %build_server |
307 |
%pre server |
308 |
%_pre_useradd %{name}-server %{_var}/lib/%{name}-server /bin/sh |
309 |
|
310 |
%post server |
311 |
%_tmpfilescreate %{name}-server |
312 |
%_post_service %{name}-server |
313 |
|
314 |
%preun server |
315 |
%_preun_service %{name}-server |
316 |
|
317 |
%postun server |
318 |
%_postun_userdel %{name}-server |
319 |
%endif |
320 |
|
321 |
|
322 |
%if %build_client |
323 |
%files |
324 |
%defattr(-,root,root) |
325 |
%doc README README.Linux CHANGES LICENSE |
326 |
%{_bindir}/%{name} |
327 |
%{_bindir}/%{name}-overlay |
328 |
%{_datadir}/applications/%{name}.desktop |
329 |
%{_iconsdir}/hicolor/*/apps/%{name}.svg |
330 |
%{_mandir}/man1/%{name}.* |
331 |
%{_mandir}/man1/%{name}-overlay.* |
332 |
|
333 |
%files 11x |
334 |
%defattr(-,root,root,-) |
335 |
%{_bindir}/%{name}11x |
336 |
%{_datadir}/applications/%{name}11x.desktop |
337 |
%{_mandir}/man1/%{name}11x.* |
338 |
|
339 |
%files protocol-kde4 |
340 |
%defattr(-,root,root) |
341 |
%{_kde_datadir}/kde4/services/%{name}.protocol |
342 |
|
343 |
%files plugins |
344 |
%defattr(-,root,root,-) |
345 |
%{_libdir}/%{name} |
346 |
%endif |
347 |
|
348 |
%if %build_server |
349 |
%files server |
350 |
%if %build_client == 0 |
351 |
%doc README README.Linux CHANGES LICENSE |
352 |
%endif |
353 |
%defattr(-,root,root) |
354 |
%doc scripts/murmur.ini |
355 |
%{_bindir}/murmur-user-wrapper |
356 |
%{_sbindir}/murmurd |
357 |
%{_initrddir}/%{name}-server |
358 |
%{_tmpfilesdir}/%{name}-server.conf |
359 |
%config(noreplace) %{_sysconfdir}/%{name}-server.ini |
360 |
%{_sysconfdir}/logrotate.d/%{name}-server |
361 |
%{_sysconfdir}/dbus-1/system.d/%{name}-server.conf |
362 |
%attr(-,mumble-server,mumble-server) %dir %{_var}/lib/%{name}-server |
363 |
%attr(-,mumble-server,root) %dir %{_var}/log/%{name}-server |
364 |
%if %build_ice |
365 |
%{_datadir}/slice/Murmur.ice |
366 |
%endif |
367 |
%{_mandir}/man1/murmur-user-wrapper.* |
368 |
%{_mandir}/man1/murmurd.* |
369 |
|
370 |
%if %build_web |
371 |
%files server-web |
372 |
%doc README.install.urpmi |
373 |
%defattr(-,root,root) |
374 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf |
375 |
%if %build_ice |
376 |
%config(noreplace) %{_sysconfdir}/php.d/MurmurPHP.ini |
377 |
%endif |
378 |
%{_datadir}/%{name}-server-web |
379 |
%endif |
380 |
%endif |