1 |
%define subrel 2 |
2 |
# configuration options for the server (murmur) |
3 |
%define build_server 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 1 |
32 |
License: BSD-like |
33 |
Group: Sound |
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 |
Patch0: %{name}-1.2.1-mdv-fix-string-error.patch |
44 |
Patch1: mumble-1.2.2-link.patch |
45 |
Patch2: 0001-Explicitly-remove-file-permissions-for-settings-and-.patch |
46 |
Patch3: mumble-1.2.3-ice-3.3.1-only.patch |
47 |
Patch4: mumble-1.2.3-ice-3.3.1-path.patch |
48 |
Patch5: mumble-1.2.3-ice-php-include-path.patch |
49 |
BuildRequires: kde4-macros |
50 |
BuildRequires: libspeex-devel |
51 |
BuildRequires: celt-devel >= 0.7.0 |
52 |
BuildRequires: qt4-devel >= 4.4.1 |
53 |
BuildRequires: boost-devel |
54 |
BuildRequires: pulseaudio-devel |
55 |
BuildRequires: libalsa-devel |
56 |
BuildRequires: libogg-devel |
57 |
BuildRequires: openssl-devel |
58 |
BuildRequires: libxevie-devel |
59 |
BuildRequires: qt4-linguist >= 4.4.1 |
60 |
BuildRequires: protobuf-devel |
61 |
BuildRequires: protobuf-compiler |
62 |
BuildRequires: avahi-compat-libdns_sd-devel |
63 |
%if %build_speechd |
64 |
BuildRequires: speech-dispatcher-devel |
65 |
%endif |
66 |
%if %build_g15 |
67 |
BuildRequires: g15daemon_client-devel |
68 |
%endif |
69 |
Requires: qt4-database-plugin-sqlite >= 4.3.0 |
70 |
Requires: %{name}-plugins = %{version}-%{release} |
71 |
Suggests: %{name}.protocol |
72 |
%if %build_speechd |
73 |
Suggests: speech-dispatcher |
74 |
%endif |
75 |
%if %build_g15 |
76 |
Suggests: g15daemon |
77 |
%endif |
78 |
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot |
79 |
|
80 |
%description |
81 |
Low-latency, high-quality voice communication for gamers. |
82 |
|
83 |
Includes game linking, so voice from other players comes |
84 |
from the direction of their characters, and has echo |
85 |
cancellation so the sound from your loudspeakers won't be |
86 |
audible to other players. |
87 |
|
88 |
%package 11x |
89 |
Summary: The 1.1.x compatible client for mumble |
90 |
Group: Sound |
91 |
Requires: %{name} = %{version}-%{release} |
92 |
|
93 |
%description 11x |
94 |
This package provides the 1.1.x compatible client for Mumble, used |
95 |
to connect to older servers. |
96 |
|
97 |
%package protocol-kde4 |
98 |
Summary: The mumble protocol for KDE4 |
99 |
Group: Graphical desktop/KDE |
100 |
Requires: %{name} = %{version}-%{release} |
101 |
|
102 |
%description protocol-kde4 |
103 |
The mumble protocol for KDE4. |
104 |
|
105 |
%package plugins |
106 |
Summary: Mumble plugins |
107 |
Group: Sound |
108 |
Requires: %{name} = %{version}-%{release} |
109 |
# 24 may 2009 : necessary for upgrading |
110 |
Provides: %mklibname %{name} 1 |
111 |
Provides: %mklibname %{name} -d |
112 |
Obsoletes: %mklibname %{name} 1 |
113 |
Obsoletes: %mklibname %{name} -d |
114 |
|
115 |
%description plugins |
116 |
This packages provides the Mumble plugins. |
117 |
|
118 |
%if %build_server |
119 |
%package server |
120 |
Summary: Murmur, the VOIP server for Mumble |
121 |
Group: Sound |
122 |
Requires(pre): rpm-helper |
123 |
Requires(post): rpm-helper |
124 |
Requires(preun): rpm-helper |
125 |
%if %build_ice |
126 |
BuildRequires: ice-devel < 3.4 |
127 |
# (cg) ice-devel should require this itself, but it doesn't... |
128 |
BuildRequires: ice < 3.4 |
129 |
%endif |
130 |
Requires: qt4-database-plugin-sqlite >= 4.3.0 |
131 |
Requires: dbus |
132 |
|
133 |
%description server |
134 |
This package provides Murmur, the VOIP server for Mumble. |
135 |
|
136 |
%package server-web |
137 |
Summary: Web scripts for mumble-server |
138 |
Group: Sound |
139 |
Requires: apache |
140 |
Requires: perl-CGI |
141 |
Requires: mail-server |
142 |
%if %build_ice |
143 |
Requires: php-ice < 3.4 |
144 |
Requires: ice < 3.4 |
145 |
%endif |
146 |
Requires: %{name}-server = %{version}-%{release} |
147 |
|
148 |
%description server-web |
149 |
This package contains the web scripts for mumble-server. |
150 |
|
151 |
%endif |
152 |
|
153 |
%prep |
154 |
%setup -q |
155 |
%patch0 -p0 |
156 |
%patch1 -p0 |
157 |
%patch2 -p1 -b .cve-2012-0863 |
158 |
%patch3 -p1 -b .ice-3.3.1 |
159 |
%patch4 -p1 -b .ice-path |
160 |
%patch5 -p0 -b .ice-php-incl-path |
161 |
|
162 |
cp -p %{SOURCE4} README.install.urpmi |
163 |
|
164 |
%build |
165 |
%qmake_qt4 main.pro \ |
166 |
%if %build_server == 0 |
167 |
CONFIG+=no-server \ |
168 |
%endif |
169 |
%if %build_ice == 0 |
170 |
CONFIG+=no-ice \ |
171 |
%endif |
172 |
%if %build_client == 0 |
173 |
CONFIG+=no-client \ |
174 |
%endif |
175 |
%if %build_speechd == 0 |
176 |
CONFIG+=no-speechd \ |
177 |
%endif |
178 |
%if %build_g15 == 0 |
179 |
CONFIG+=no-g15 \ |
180 |
%endif |
181 |
CONFIG+=no-bundled-speex \ |
182 |
CONFIG+=no-bundled-celt \ |
183 |
CONFIG+=no-embed-qt-translations \ |
184 |
CONFIG+=no-update \ |
185 |
DEFINES+=PLUGIN_PATH=%{_libdir}/%{name} \ |
186 |
DEFINES+=DEFAULT_SOUNDSYSTEM=PulseAudio |
187 |
|
188 |
%make -j2 |
189 |
|
190 |
%install |
191 |
rm -rf %{buildroot} |
192 |
|
193 |
%if %build_client |
194 |
# --- Mumble install --- |
195 |
|
196 |
install -D -m 0755 release/%{name} %{buildroot}%{_bindir}/%{name} |
197 |
install -m 0755 scripts/%{name}-overlay %{buildroot}%{_bindir}/%{name}-overlay |
198 |
install -D -m 0755 scripts/%{name}.protocol %{buildroot}%{_kde_datadir}/kde4/services/%{name}.protocol |
199 |
install -d -m 0755 %{buildroot}%{_libdir}/%{name}/plugins |
200 |
cp -Pp release/libmumble* %{buildroot}%{_libdir}/%{name}/ |
201 |
cp -p release/plugins/liblink.so %{buildroot}%{_libdir}/%{name}/ |
202 |
|
203 |
# ---Mumble 11X --- |
204 |
install -D -m 0755 release/%{name}11x %{buildroot}%{_bindir}/%{name}11x |
205 |
|
206 |
# Mumble icons |
207 |
install -D -m 0644 icons/%{name}.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg |
208 |
|
209 |
# Mumble desktop file |
210 |
install -d -m 0755 %{buildroot}%{_datadir}/applications |
211 |
install -m 0644 scripts/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop |
212 |
desktop-file-install \ |
213 |
--remove-category="Qt" \ |
214 |
--dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* |
215 |
|
216 |
# Create a Mumble11x desktop file from the Mumble one |
217 |
sed -e "s/Name\=Mumble/Name\=Mumble-11x/g" \ |
218 |
-e "s/Exec\=mumble/Exec\=mumble11x/g" \ |
219 |
%{buildroot}%{_datadir}/applications/%{name}.desktop \ |
220 |
> %{buildroot}%{_datadir}/applications/%{name}11x.desktop |
221 |
%endif |
222 |
|
223 |
%if %build_server |
224 |
# --- Mumble-server/Murmur install --- |
225 |
|
226 |
install -D -m0755 release/murmurd "%{buildroot}%{_sbindir}/murmurd" |
227 |
install -D -m0755 scripts/murmur-user-wrapper %{buildroot}%{_bindir}/murmur-user-wrapper |
228 |
mkdir -p %{buildroot}%{_sysconfdir}/{dbus-1/system.d,logrotate.d} |
229 |
install -m0644 scripts/murmur.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/%{name}-server.conf |
230 |
install -m0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-server |
231 |
install -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}-server.ini |
232 |
|
233 |
%if %build_ice |
234 |
# install Mumur.ice in /usr/share/slice |
235 |
install -D -m0755 src/murmur/Murmur.ice %{buildroot}%{_datadir}/slice/Murmur.ice |
236 |
%endif |
237 |
|
238 |
# install initscript |
239 |
mkdir -p %{buildroot}%{_initrddir} |
240 |
install -m0744 %{SOURCE5} %{buildroot}%{_initrddir}/%{name}-server |
241 |
|
242 |
# create database directory |
243 |
install -d -m0755 %{buildroot}%{_var}/lib/%{name}-server |
244 |
|
245 |
# create log directory |
246 |
install -d -m0755 %{buildroot}%{_var}/log/%{name}-server |
247 |
|
248 |
# create pidfile directory |
249 |
install -d -m0755 %{buildroot}%{_var}/run/%{name}-server |
250 |
|
251 |
# install example |
252 |
mkdir -p %{buildroot}%{_var}/%{name}-server/examples |
253 |
|
254 |
# --- Mumble-server-web files --- |
255 |
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf |
256 |
%if %build_ice |
257 |
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/php.d/MurmurPHP.ini |
258 |
install -D -m0644 scripts/weblist.php %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.php |
259 |
%endif |
260 |
install -D -m0755 scripts/weblist.pl %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.cgi |
261 |
install -D -m0755 scripts/murmur.pl %{buildroot}%{_datadir}/%{name}-server-web/www/register.cgi |
262 |
pushd %{buildroot}%{_datadir}/%{name}-server-web/www |
263 |
ln -s weblist.php index.php |
264 |
popd |
265 |
%endif |
266 |
|
267 |
# --- Manpages --- |
268 |
install -d -m 0755 %{buildroot}%{_mandir}/man1 |
269 |
%if %build_server |
270 |
install -m 0644 man/murmur* %{buildroot}%{_mandir}/man1 |
271 |
%endif |
272 |
%if %build_client |
273 |
install -m 0644 man/mumble* %{buildroot}%{_mandir}/man1 |
274 |
%endif |
275 |
|
276 |
%clean |
277 |
rm -rf %{buildroot} |
278 |
|
279 |
|
280 |
%if %build_server |
281 |
%pre server |
282 |
%_pre_useradd %{name}-server %{_var}/lib/%{name}-server /bin/sh |
283 |
|
284 |
%post server |
285 |
%_post_service %{name}-server |
286 |
%__service messagebus reload |
287 |
|
288 |
%preun server |
289 |
if [ $1 = 0 ]; then |
290 |
%_preun_service %{name}-server |
291 |
fi |
292 |
|
293 |
%postun server |
294 |
%_postun_userdel %{name}-server |
295 |
%endif |
296 |
|
297 |
|
298 |
%if %build_client |
299 |
%files |
300 |
%defattr(-,root,root) |
301 |
%doc README README.Linux CHANGES LICENSE |
302 |
%{_bindir}/%{name} |
303 |
%{_bindir}/%{name}-overlay |
304 |
%{_datadir}/applications/%{name}.desktop |
305 |
%{_iconsdir}/hicolor/*/apps/%{name}.svg |
306 |
%{_mandir}/man1/%{name}.* |
307 |
%{_mandir}/man1/%{name}-overlay.* |
308 |
|
309 |
%files 11x |
310 |
%defattr(-,root,root,-) |
311 |
%{_bindir}/%{name}11x |
312 |
%{_datadir}/applications/%{name}11x.desktop |
313 |
%{_mandir}/man1/%{name}11x.* |
314 |
|
315 |
%files protocol-kde4 |
316 |
%defattr(-,root,root) |
317 |
%{_kde_datadir}/kde4/services/%{name}.protocol |
318 |
|
319 |
%files plugins |
320 |
%defattr(-,root,root,-) |
321 |
%{_libdir}/%{name} |
322 |
%endif |
323 |
|
324 |
%if %build_server |
325 |
%files server |
326 |
%if %build_client == 0 |
327 |
%doc README README.Linux CHANGES LICENSE |
328 |
%endif |
329 |
%defattr(-,root,root) |
330 |
%doc scripts/murmur.ini |
331 |
%{_bindir}/murmur-user-wrapper |
332 |
%{_sbindir}/murmurd |
333 |
%{_initrddir}/%{name}-server |
334 |
%config(noreplace) %{_sysconfdir}/%{name}-server.ini |
335 |
%{_sysconfdir}/logrotate.d/%{name}-server |
336 |
%{_sysconfdir}/dbus-1/system.d/%{name}-server.conf |
337 |
%attr(-,mumble-server,mumble-server) %dir %{_var}/lib/%{name}-server |
338 |
%attr(-,mumble-server,root) %dir %{_var}/log/%{name}-server |
339 |
%attr(-,mumble-server,mumble-server) %dir %{_var}/run/%{name}-server |
340 |
%if %build_ice |
341 |
%{_datadir}/slice/Murmur.ice |
342 |
%endif |
343 |
%{_mandir}/man1/murmur-user-wrapper.* |
344 |
%{_mandir}/man1/murmurd.* |
345 |
|
346 |
%files server-web |
347 |
%doc README.install.urpmi |
348 |
%defattr(-,root,root) |
349 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf |
350 |
%if %build_ice |
351 |
%config(noreplace) %{_sysconfdir}/php.d/MurmurPHP.ini |
352 |
%endif |
353 |
%{_datadir}/%{name}-server-web |
354 |
%endif |
355 |
|
356 |
|