david_david

mumble-1.2.5.spec

May 11th, 2014
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.39 KB | None | 0 0
  1. # configuration options for the server (murmur)
  2. %define build_server 1
  3. %define build_web 1
  4. %define build_ice 0
  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.5
  31. Release: %mkrel 1
  32. License: BSD
  33. Group: Communications/Telephony
  34. Url: http://mumble.sourceforge.net/
  35. Source0: http://sourceforge.net/projects/mumble/files/Mumble/%{version}/%{name}-%{version}.tar.gz
  36. # conf files courtesy of debian package
  37. Source1: mumble-server.ini
  38. Source2: mumble-server-web.conf
  39. Source3: MurmurPHP.ini
  40. Source4: README.install.urpmi.mumble-server-web
  41. Source5: mumble-server-init.mdv
  42. Source6: mumble-server.logrotate
  43. Source7: mumble-tmpfiles.conf
  44.  
  45. Patch0: mumble-1.2.5-fdr-slice2cpp.patch
  46. Patch1: mumble-1.2.4-fdr-celt_include_dir.patch
  47. # Fix broken logrotate script (start-stop-daemon not available anymore), BZ 730129
  48. Patch2: mumble-1.2.3-fdr-logrotate.patch
  49. Patch3: mumble-1.2.5-fdr-mga-fix-speechd.patch
  50. # Upstream patch to fix hang on startup
  51. # https://github.com/mumble-voip/mumble/commit/dee463ef52d8406d0a925facfabead616f0f9dc2
  52. Patch4: 0001-bonjour-use-Qt-AutoConnection-for-BonjourServiceReso.patch
  53.  
  54. BuildRequires: kde4-macros
  55. BuildRequires: desktop-file-utils
  56. BuildRequires: qt4-devel >= 4.4.1
  57. BuildRequires: qt4-linguist >= 4.4.1
  58. BuildRequires: boost-devel
  59. BuildRequires: protobuf-devel
  60. BuildRequires: protobuf-compiler
  61. BuildRequires: avahi-compat-libdns_sd-devel
  62. BuildRequires: cap-devel
  63. BuildRequires: pkgconfig(speex) >= 1.2
  64. BuildRequires: pkgconfig(celt071)
  65. BuildRequires: pkgconfig(libpulse)
  66. BuildRequires: pkgconfig(alsa)
  67. BuildRequires: pkgconfig(ogg)
  68. BuildRequires: pkgconfig(libssl)
  69. BuildRequires: pkgconfig(xevie)
  70. BuildRequires: pkgconfig(xi) >= 1.6.0
  71. BuildRequires: pkgconfig(sndfile)
  72. BuildRequires: pkgconfig(libcap-ng)
  73. BuildRequires: pkgconfig(opus)
  74. %if %build_speechd
  75. BuildRequires: speech-dispatcher-devel
  76. %endif
  77. %if %build_g15
  78. BuildRequires: g15daemon_client-devel
  79. %endif
  80.  
  81. # (cg) The celt libraries are loaded dynamically but we need at least 0.7.1 to
  82. # be compatible with the Windows and OSX clients
  83. # The 0.11 version can work if the clients (and presumably the server) all
  84. # support it.
  85. # Using mklibname is not ideal but it's the easiest option for now
  86. Requires: %{mklibname celt 071 0}
  87. Suggests: %{mklibname celt 0 2}
  88.  
  89. Requires: qt4-database-plugin-sqlite >= 4.3.0
  90. Requires: %{name}-plugins = %{version}-%{release}
  91. Suggests: %{name}.protocol
  92. Obsoletes: mumble-11x < 1.2.3-15
  93. %if %build_speechd
  94. Suggests: speech-dispatcher
  95. %endif
  96. %if %build_g15
  97. Suggests: g15daemon
  98. %endif
  99.  
  100. %description
  101. Low-latency, high-quality voice communication for gamers.
  102.  
  103. Includes game linking, so voice from other players comes
  104. from the direction of their characters, and has echo
  105. cancellation so the sound from your loudspeakers won't be
  106. audible to other players.
  107.  
  108. %package protocol-kde4
  109. Summary: The mumble protocol for KDE4
  110. Group: Graphical desktop/KDE
  111. Requires: %{name} = %{version}-%{release}
  112.  
  113. %description protocol-kde4
  114. The mumble protocol for KDE4.
  115.  
  116. %package plugins
  117. Summary: Mumble plugins
  118. Group: Communications/Telephony
  119. Requires: %{name} = %{version}-%{release}
  120.  
  121. %description plugins
  122. This packages provides the Mumble plugins.
  123.  
  124. %if %build_server
  125. %package server
  126. Summary: Murmur, the VOIP server for Mumble
  127. Group: Communications/Telephony
  128. Requires(post): systemd >= %{systemd_required_version}
  129. Requires(pre): rpm-helper
  130. Requires(post): rpm-helper
  131. Requires(preun): rpm-helper
  132. %if %build_ice
  133. BuildRequires: ice-devel
  134. # (cg) ice-devel should require this itself, but it doesn't...
  135. BuildRequires: ice
  136. %endif
  137. Requires: qt4-database-plugin-sqlite >= 4.3.0
  138. Requires: dbus
  139. %if !%build_web
  140. Conflicts: %{name}-server-web
  141. %endif
  142.  
  143. %description server
  144. This package provides Murmur, the VOIP server for Mumble.
  145.  
  146. %if %build_web
  147. %package server-web
  148. Summary: Web scripts for mumble-server
  149. Group: Communications/Telephony
  150. Requires: apache
  151. Requires: perl-CGI
  152. Requires: mail-server
  153. %if %build_ice
  154. Requires: php-ice
  155. Requires: ice
  156. %endif
  157. Requires: %{name}-server = %{version}-%{release}
  158.  
  159. %description server-web
  160. This package contains the web scripts for mumble-server.
  161.  
  162. %endif
  163. %endif
  164.  
  165. %prep
  166. %setup -q
  167. %apply_patches
  168.  
  169. cp -pr %{SOURCE4} README.install.urpmi
  170.  
  171. #remove bundled celt
  172. rm -rf celt*
  173.  
  174. %build
  175. %qmake_qt4 main.pro \
  176. %if %build_server == 0
  177. CONFIG+=no-server \
  178. %endif
  179. %if %build_ice == 0
  180. CONFIG+=no-ice \
  181. %endif
  182. %if %build_client == 0
  183. CONFIG+=no-client \
  184. %endif
  185. %if %build_speechd == 0
  186. CONFIG+=no-speechd \
  187. %endif
  188. %if %build_g15 == 0
  189. CONFIG+=no-g15 \
  190. %endif
  191. CONFIG+=no-bundled-speex \
  192. CONFIG+=no-bundled-celt \
  193. CONFIG+=no-embed-qt-translations \
  194. CONFIG+=no-update \
  195. DEFINES+=PLUGIN_PATH=%{_libdir}/%{name} \
  196. DEFINES+=DEFAULT_SOUNDSYSTEM=PulseAudio
  197. %make
  198. %{qt4bin}/lrelease src/mumble/*.ts
  199.  
  200. %install
  201. %if %build_client
  202. # --- Mumble install ---
  203.  
  204. install -D -m 0755 release/%{name} %{buildroot}%{_bindir}/%{name}
  205. install -m 0755 scripts/%{name}-overlay %{buildroot}%{_bindir}/%{name}-overlay
  206. install -D -m 0644 scripts/%{name}.protocol %{buildroot}%{_kde_services}/%{name}.protocol
  207. install -d -m 0755 %{buildroot}%{_libdir}/%{name}/plugins
  208. cp -pr release/libmumble* %{buildroot}%{_libdir}/%{name}/
  209. cp -pr release/plugins/liblink.so %{buildroot}%{_libdir}/%{name}/
  210.  
  211. # Mumble icons
  212. install -D -m 0644 icons/%{name}.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
  213.  
  214. # Mumble desktop file
  215. install -d -m 0755 %{buildroot}%{_datadir}/applications
  216. install -m 0644 scripts/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
  217. desktop-file-install \
  218. --remove-category="Qt" \
  219. --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/*
  220.  
  221. #translations
  222. mkdir -p %{buildroot}%{_datadir}/%{name}/translations
  223. install -m 0644 src/%{name}/*.qm %{buildroot}%{_datadir}/%{name}/translations/
  224. %endif
  225.  
  226. %if %build_server
  227. # --- Mumble-server/Murmur install ---
  228.  
  229. install -D -m 0755 release/murmurd "%{buildroot}%{_sbindir}/murmurd"
  230. install -D -m 0755 scripts/murmur-user-wrapper %{buildroot}%{_bindir}/murmur-user-wrapper
  231. mkdir -p %{buildroot}%{_sysconfdir}/{dbus-1/system.d,logrotate.d}
  232. install -m 0644 scripts/murmur.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/%{name}-server.conf
  233. install -m 0644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}-server
  234. install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}-server.ini
  235.  
  236. %if %build_ice
  237. # install Mumur.ice in /usr/share/slice
  238. install -D -m 0755 src/murmur/Murmur.ice %{buildroot}%{_datadir}/slice/Murmur.ice
  239. %endif
  240.  
  241. # install initscript
  242. mkdir -p %{buildroot}%{_initrddir}
  243. install -m 0744 %{SOURCE5} %{buildroot}%{_initrddir}/%{name}-server
  244.  
  245. # create database directory
  246. install -d -m 0755 %{buildroot}%{_var}/lib/%{name}-server
  247.  
  248. # create log directory
  249. install -d -m 0755 %{buildroot}%{_var}/log/%{name}-server
  250.  
  251. # create tmpfiles directory
  252. install -D -p -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}-server.conf
  253.  
  254. # install example
  255. mkdir -p %{buildroot}%{_var}/%{name}-server/examples
  256.  
  257. # create pidfile directory
  258. install -d -m 0755 %{buildroot}%{_var}/run/%{name}-server
  259.  
  260. %if %build_web
  261. # --- Mumble-server-web files ---
  262. install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf
  263. %if %build_ice
  264. install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/php.d/MurmurPHP.ini
  265. install -D -m 0644 scripts/weblist.php %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.php
  266. %endif
  267. install -D -m 0755 scripts/weblist.pl %{buildroot}%{_datadir}/%{name}-server-web/www/weblist.cgi
  268. install -D -m 0755 scripts/murmur.pl %{buildroot}%{_datadir}/%{name}-server-web/www/register.cgi
  269. pushd %{buildroot}%{_datadir}/%{name}-server-web/www
  270. ln -s weblist.php index.php
  271. popd
  272. %endif
  273. %endif
  274.  
  275. # --- Manpages ---
  276. install -d -m 0755 %{buildroot}%{_mandir}/man1
  277. %if %build_server
  278. install -m 0644 man/murmur* %{buildroot}%{_mandir}/man1
  279. %endif
  280. %if %build_client
  281. install -m 0644 man/mumble* %{buildroot}%{_mandir}/man1
  282. %endif
  283.  
  284. %if %build_server
  285. %pre server
  286. %_pre_useradd %{name}-server %{_var}/lib/%{name}-server /bin/sh
  287.  
  288. %post server
  289. %_tmpfilescreate %{name}-server
  290. %_post_service %{name}-server
  291.  
  292. %preun server
  293. %_preun_service %{name}-server
  294.  
  295. %postun server
  296. %_postun_userdel %{name}-server
  297. %endif
  298.  
  299. %if %build_client
  300. %files
  301. %doc README README.Linux CHANGES LICENSE
  302. %{_bindir}/%{name}
  303. %{_bindir}/%{name}-overlay
  304. %{_datadir}/%{name}/
  305. %{_datadir}/applications/%{name}.desktop
  306. %{_iconsdir}/hicolor/*/apps/%{name}.svg
  307. %{_mandir}/man1/%{name}.*
  308. %{_mandir}/man1/%{name}-overlay.*
  309.  
  310. %files protocol-kde4
  311. %{_kde_services}/%{name}.protocol
  312.  
  313. %files plugins
  314. %{_libdir}/%{name}
  315. %endif
  316.  
  317. %if %build_server
  318. %files server
  319. %if %build_client == 0
  320. %doc README README.Linux CHANGES LICENSE
  321. %endif
  322. %doc scripts/murmur.ini
  323. %{_bindir}/murmur-user-wrapper
  324. %{_sbindir}/murmurd
  325. %{_initrddir}/%{name}-server
  326. %{_tmpfilesdir}/%{name}-server.conf
  327. %config(noreplace) %{_sysconfdir}/%{name}-server.ini
  328. %{_sysconfdir}/logrotate.d/%{name}-server
  329. %{_sysconfdir}/dbus-1/system.d/%{name}-server.conf
  330. %attr(-,mumble-server,mumble-server) %dir %{_var}/lib/%{name}-server
  331. %attr(-,mumble-server,root) %dir %{_var}/log/%{name}-server
  332. %attr(-,mumble-server,mumble-server) %dir %{_var}/run/%{name}-server
  333. %if %build_ice
  334. %{_datadir}/slice/Murmur.ice
  335. %endif
  336. %{_mandir}/man1/murmur-user-wrapper.*
  337. %{_mandir}/man1/murmurd.*
  338.  
  339. %if %build_web
  340. %files server-web
  341. %doc README.install.urpmi
  342. %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-server-web.conf
  343. %if %build_ice
  344. %config(noreplace) %{_sysconfdir}/php.d/MurmurPHP.ini
  345. %endif
  346. %{_datadir}/%{name}-server-web
  347. %endif
  348. %endif
Advertisement
Add Comment
Please, Sign In to add comment