3 %bcond_without caca # CACA
4 %bcond_without dvdnav # dvdnav support
5 %bcond_without js # JavaScript scripting support
6 %bcond_without rubberband # librubberband support
7 %bcond_without shaderc # libshaderc SPIR-V compiler
8 %bcond_without vapoursynth # VapourSynth filter bridge
9 %bcond_without zimg # libzimg support (high quality software scaler)
11 Summary: Movie player based on MPlayer and mplayer2
12 Summary(pl.UTF-8): Odtwarzacz filmów oparty na projektach MPlayer i mplayer2
17 Group: Applications/Multimedia
18 #Source0Download: http://github.com/mpv-player/mpv/releases
19 Source0: https://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz
20 # Source0-md5: 54bd6864cc831f1fee6dee693a0421eb
23 BuildRequires: EGL-devel
24 BuildRequires: Mesa-libgbm-devel >= 17.1.0
25 BuildRequires: OpenAL-devel >= 1.13
26 BuildRequires: OpenGL-devel
27 BuildRequires: SDL2-devel
28 BuildRequires: Vulkan-Loader-devel >= 1.3.238
29 BuildRequires: alsa-lib-devel >= 1.0.18
30 BuildRequires: docutils
31 BuildRequires: ffmpeg-devel >= 4.4
32 BuildRequires: jack-audio-connection-kit-devel
33 BuildRequires: lcms2-devel >= 2.6
34 BuildRequires: libarchive-devel >= 3.4.0
35 BuildRequires: libass-devel >= 0.12.2
36 %ifnarch %arch_with_atomics64
37 BuildRequires: libatomic-devel
39 BuildRequires: libbluray-devel >= 0.3.0
40 %{?with_caca:BuildRequires: libcaca-devel >= 0.99-0.beta18.1}
41 BuildRequires: libcdio-devel >= 0.90
42 BuildRequires: libcdio-paranoia-devel
43 BuildRequires: libdrm-devel >= 2.4.105
45 BuildRequires: libdvdnav-devel >= 4.2.0
46 BuildRequires: libdvdread-devel >= 4.1.0
48 BuildRequires: libjpeg-devel
49 BuildRequires: libplacebo-devel >= 6.338.0
50 BuildRequires: libva-devel >= 1.4.0
51 BuildRequires: libva-glx-devel >= 1.4.0
52 BuildRequires: libvdpau-devel >= 0.2
53 BuildRequires: lua52-devel
54 BuildRequires: meson >= 0.62.0
55 %{?with_js:BuildRequires: mujs-devel >= 1.0.0}
57 BuildRequires: nv-codec-headers >= 11.1.5.1
58 BuildRequires: pipewire-devel >= 0.3.48
59 BuildRequires: pkgconfig
60 BuildRequires: pulseaudio-devel >= 1.0
61 BuildRequires: rpm-build >= 4.6
62 BuildRequires: rpmbuild(macros) >= 2.025
63 %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.0}
64 %{?with_shaderc:BuildRequires: shaderc-devel >= 2019.0}
65 BuildRequires: uchardet-devel
66 %{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 26}
67 BuildRequires: wayland-devel >= 1.20.0
68 BuildRequires: wayland-egl-devel
69 BuildRequires: wayland-protocols >= 1.32
70 BuildRequires: xorg-lib-libX11-devel >= 1.0.0
71 BuildRequires: xorg-lib-libXScrnSaver-devel >= 1.0.0
72 BuildRequires: xorg-lib-libXdamage-devel
73 BuildRequires: xorg-lib-libXext-devel >= 1.0.0
74 BuildRequires: xorg-lib-libXpresent-devel >= 1.0.0
75 BuildRequires: xorg-lib-libXrandr-devel >= 1.4.0
76 BuildRequires: xorg-lib-libXv-devel
77 BuildRequires: xorg-lib-libxkbcommon-devel >= 0.3.0
78 BuildRequires: xorg-proto-xproto-devel
79 %{?with_zimg:BuildRequires: zimg-devel >= 3.0.5}
80 BuildRequires: zlib-devel
81 Requires(post,postun): desktop-file-utils
82 Requires(post,postun): gtk-update-icon-cache
83 Requires: OpenAL >= 1.13
85 Requires: alsa-lib >= 1.0.18
86 Requires: hicolor-icon-theme
87 %requires_eq_to ffmpeg-libs ffmpeg-devel
88 Requires: lcms2 >= 2.6
89 Requires: libarchive >= 3.4.0
90 Requires: libass >= 0.12.2
91 Requires: libbluray >= 0.3.0
92 %{?with_caca:Requires: libcaca >= 0.99-0.beta18.1}
93 Requires: libdrm >= 2.4.105
95 Requires: libdvdnav >= 4.2.0
96 Requires: libdvdread >= 4.1.0
98 Requires: pipewire-libs >= 0.3.48
99 %requires_ge_to libplacebo libplacebo-devel
100 Requires: libva >= 1.4.0
101 Requires: libva-glx >= 1.4.0
102 Requires: libvdpau >= 0.2
103 %{?with_js:Requires: mujs >= 1.0.0}
104 Requires: pulseaudio-libs >= 1.0
105 %{?with_rubberband:Requires: rubberband-libs >= 1.8.0}
106 %{?with_shaderc:Requires: shaderc >= 2019.0}
107 %{?with_vapoursynth:Requires: vapoursynth >= 26}
108 Requires: wayland >= 1.15.0
109 Requires: xorg-lib-libX11 >= 1.0.0
110 Requires: xorg-lib-libXScrnSaver >= 1.0.0
111 Requires: xorg-lib-libXext >= 1.0.0
112 Requires: xorg-lib-libXrandr >= 1.4.0
113 Requires: xorg-lib-libxkbcommon >= 0.3.0
114 %{?with_zimg:Requires: zimg >= 3.0.5}
116 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
119 Movie player based on MPlayer and mplayer2.
121 %description -l pl.UTF-8
122 Odtwarzacz filmów oparty na projektach MPlayer i mplayer2.
125 Summary: Client library for controlling mpv
126 Summary(pl.UTF-8): Biblioteka kliencka do sterowania odtwarzaczem mpv
129 %description client-libs
130 Client library for controlling mpv.
132 %description client-libs -l pl.UTF-8
133 Biblioteka kliencka do sterowania odtwarzaczem mpv.
135 %package client-devel
136 Summary: Development files for mpv client library
137 Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej mpv
138 Group: Development/Libraries
139 Requires: %{name}-client-libs = %{version}-%{release}
141 %description client-devel
142 Development files for mpv client library.
144 %description client-devel -l pl.UTF-8
145 Pliki programistyczne biblioteki klienckiej mpv.
147 %package -n bash-completion-mpv
148 Summary: Bash completion for mpv
149 Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki Bash
150 Group: Applications/Shells
151 Requires: %{name} = %{version}-%{release}
152 Requires: bash-completion >= 1:2.0
155 %description -n bash-completion-mpv
156 Bash completion for mpv.
158 %description -n bash-completion-mpv -l pl.UTF-8
159 Dopełnianie parametrów mpv dla powłoki Bash.
161 %package -n zsh-completion-mpv
162 Summary: ZSH completion for mpv
163 Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki ZSH
164 Group: Applications/Shells
165 Requires: %{name} = %{version}-%{release}
168 %description -n zsh-completion-mpv
169 ZSH completion for mpv.
171 %description -n zsh-completion-mpv -l pl.UTF-8
172 Dopełnianie parametrów mpv dla powłoki ZSH.
180 -Dcaca=%{__enabled_disabled caca} \
184 -Ddvdnav=%{__enabled_disabled dvdnav} \
185 -Degl-wayland=enabled \
190 -Djavascript=%{__enabled_disabled js} \
193 -Dlibavdevice=enabled \
194 -Dlibbluray=enabled \
196 -Drubberband=%{__enabled_disabled rubberband} \
200 -Dshaderc=%{__enabled_disabled shaderc} \
203 -Dvapoursynth=%{__enabled_disabled vapoursynth} \
205 -Dvdpau-gl-x11=enabled \
209 -Dzimg=%{__enabled_disabled zimg} \
212 %ninja_build -C build
215 rm -rf $RPM_BUILD_ROOT
217 %ninja_install -C build
219 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv
220 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv
222 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
225 rm -rf $RPM_BUILD_ROOT
228 %update_desktop_database_post
229 %update_icon_cache hicolor
232 %update_desktop_database_postun
233 %update_icon_cache hicolor
235 %post client-libs -p /sbin/ldconfig
236 %postun client-libs -p /sbin/ldconfig
239 %defattr(644,root,root,755)
240 %doc README.md RELEASE_NOTES etc/input.conf etc/mplayer-input.conf etc/mpv.conf etc/restore-old-bindings.conf
241 %dir %{_sysconfdir}/mpv
242 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/encoding-profiles.conf
243 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/mpv.conf
244 %attr(755,root,root) %{_bindir}/%{name}
245 %{_desktopdir}/mpv.desktop
246 %{_iconsdir}/hicolor/*/apps/mpv.png
247 %{_iconsdir}/hicolor/scalable/apps/mpv.svg
248 %{_iconsdir}/hicolor/symbolic/apps/mpv-symbolic.svg
249 %{_mandir}/man1/mpv.1*
250 %{_datadir}/metainfo/mpv.metainfo.xml
253 %defattr(644,root,root,755)
254 %attr(755,root,root) %{_libdir}/libmpv.so.*.*.*
255 %attr(755,root,root) %ghost %{_libdir}/libmpv.so.2
258 %defattr(644,root,root,755)
259 %attr(755,root,root) %{_libdir}/libmpv.so
261 %{_pkgconfigdir}/mpv.pc
263 %files -n bash-completion-mpv
264 %defattr(644,root,root,755)
267 %files -n zsh-completion-mpv
268 %defattr(644,root,root,755)