3 %bcond_without caca # CACA
4 %bcond_without dvdnav # dvdnav support
5 %bcond_without libplacebo # libplacebo support
6 %bcond_without rubberband # librubberband support
7 %bcond_without samba # Samba support (makes mpv GPLv3)
8 %bcond_without shaderc # libshaderc SPIR-V compiler
9 %bcond_without vapoursynth # VapourSynth filter bridge
10 %bcond_without zimg # libzimg support (high quality software scaler)
12 Summary: Movie player based on MPlayer and mplayer2
13 Summary(pl.UTF-8): Odtwarzacz filmów oparty na projektach MPlayer i mplayer2
17 License: GPL v%{!?with_samba:2}%{?with_samba:3}+
18 Group: Applications/Multimedia
19 #Source0Download: http://github.com/mpv-player/mpv/releases
20 Source0: http://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz
21 # Source0-md5: 1f7d23afe7a8639dedc9f7beef4e90d7
23 Patch0: %{name}-lua.patch
24 Patch1: %{name}-shaderc.patch
27 BuildRequires: EGL-devel
28 BuildRequires: Mesa-libgbm-devel
29 BuildRequires: OpenAL-devel >= 1.13
30 BuildRequires: OpenGL-devel
31 BuildRequires: SDL2-devel
32 BuildRequires: alsa-lib-devel >= 1.0.18
33 BuildRequires: docutils
34 BuildRequires: ffmpeg-devel >= 4.0
35 BuildRequires: jack-audio-connection-kit-devel
36 BuildRequires: lcms2-devel >= 2.6
37 BuildRequires: libarchive-devel >= 3.4.0
38 BuildRequires: libass-devel >= 0.12.1
40 BuildRequires: libatomic-devel
42 BuildRequires: libbluray-devel >= 0.3.0
43 %{?with_caca:BuildRequires: libcaca-devel >= 0.99-0.beta18.1}
44 BuildRequires: libcdio-paranoia-devel
45 BuildRequires: libdrm-devel >= 2.4.74
47 BuildRequires: libdvdnav-devel >= 4.2.0
48 BuildRequires: libdvdread-devel >= 4.1.0
50 BuildRequires: libjpeg-devel
51 %{?with_libplacebo:BuildRequires: libplacebo-devel >= 0.18.0}
52 %{?with_samba:BuildRequires: libsmbclient-devel}
53 BuildRequires: libva-devel >= 1.4.0
54 BuildRequires: libva-glx-devel >= 1.4.0
55 BuildRequires: libvdpau-devel >= 0.2
56 BuildRequires: lua51-devel
57 BuildRequires: nv-codec-headers >= 8.2.15.7
58 BuildRequires: pkgconfig
59 BuildRequires: pulseaudio-devel >= 1.0
60 BuildRequires: rpmbuild(macros) >= 1.719
61 %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.0}
62 %{?with_shaderc:BuildRequires: shaderc-devel >= 2019.0}
63 BuildRequires: uchardet-devel
64 %{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 24}
65 BuildRequires: waf >= 1.8.12
66 BuildRequires: wayland-devel >= 1.15.0
67 BuildRequires: wayland-egl-devel
68 BuildRequires: wayland-protocols >= 1.14
69 BuildRequires: xorg-lib-libX11-devel >= 1.0.0
70 BuildRequires: xorg-lib-libXScrnSaver-devel >= 1.0.0
71 BuildRequires: xorg-lib-libXdamage-devel
72 BuildRequires: xorg-lib-libXext-devel >= 1.0.0
73 BuildRequires: xorg-lib-libXinerama-devel >= 1.0.0
74 BuildRequires: xorg-lib-libXrandr-devel >= 1.2.0
75 BuildRequires: xorg-lib-libXv-devel
76 BuildRequires: xorg-lib-libxkbcommon-devel >= 0.3.0
77 BuildRequires: xorg-proto-xproto-devel
78 %{?with_zimg:BuildRequires: zimg-devel >= 2.9}
79 BuildRequires: zlib-devel
80 Requires: OpenAL >= 1.13
82 Requires: alsa-lib >= 1.0.18
83 %requires_eq_to ffmpeg-libs ffmpeg-devel
84 Requires: lcms2 >= 2.6
85 Requires: libarchive >= 3.4.0
86 Requires: libass >= 0.12.1
87 Requires: libbluray >= 0.3.0
88 %{?with_caca:Requires: libcaca >= 0.99-0.beta18.1}
89 Requires: libdrm >= 2.4.74
91 Requires: libdvdnav >= 4.2.0
92 Requires: libdvdread >= 4.1.0
94 %{?with_libplacebo:Requires: libplacebo >= 0.18.0}
95 Requires: libva >= 1.4.0
96 Requires: libva-glx >= 1.4.0
97 Requires: libvdpau >= 0.2
98 Requires: pulseaudio-libs >= 1.0
99 %{?with_rubberband:Requires: rubberband-libs >= 1.8.0}
100 %{?with_shaderc:Requires: shaderc >= 2019.0}
101 %{?with_vapoursynth:Requires: vapoursynth >= 24}
102 Requires: wayland >= 1.15.0
103 Requires: xorg-lib-libX11 >= 1.0.0
104 Requires: xorg-lib-libXScrnSaver >= 1.0.0
105 Requires: xorg-lib-libXext >= 1.0.0
106 Requires: xorg-lib-libXinerama >= 1.0.0
107 Requires: xorg-lib-libXrandr >= 1.2.0
108 Requires: xorg-lib-libxkbcommon >= 0.3.0
109 %{?with_zimg:Requires: zimg >= 2.9}
110 Suggests: youtube-dl >= 2:20150223
111 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
113 %define _noautoreqdep libGL.so.1 libGLU.so.1
116 Movie player based on MPlayer and mplayer2.
118 %description -l pl.UTF-8
119 Odtwarzacz filmów oparty na projektach MPlayer i mplayer2.
122 Summary: Client library for controlling mpv
123 Summary(pl.UTF-8): Biblioteka kliencka do sterowania odtwarzaczem mpv
126 %description client-libs
127 Client library for controlling mpv.
129 %description client-libs -l pl.UTF-8
130 Biblioteka kliencka do sterowania odtwarzaczem mpv.
132 %package client-devel
133 Summary: Development files for mpv client library
134 Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej mpv
135 Group: Development/Libraries
136 Requires: %{name}-client-libs = %{version}-%{release}
138 %description client-devel
139 Development files for mpv client library.
141 %description client-devel -l pl.UTF-8
142 Pliki programistyczne biblioteki klienckiej mpv.
144 %package -n bash-completion-mpv
145 Summary: Bash completion for mpv
146 Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki Bash
147 Group: Applications/Shells
148 Requires: %{name} = %{version}-%{release}
149 Requires: bash-completion >= 2.0
151 %description -n bash-completion-mpv
152 Bash completion for mpv.
154 %description -n bash-completion-mpv -l pl.UTF-8
155 Dopełnianie parametrów mpv dla powłoki Bash.
157 %package -n zsh-completion-mpv
158 Summary: ZSH completion for mpv
159 Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki ZSH
160 Group: Applications/Shells
161 Requires: %{name} = %{version}-%{release}
163 %description -n zsh-completion-mpv
164 ZSH completion for mpv.
166 %description -n zsh-completion-mpv -l pl.UTF-8
167 Dopełnianie parametrów mpv dla powłoki ZSH.
177 --prefix=%{_prefix} \
178 --bindir=%{_bindir} \
179 --confdir=%{_sysconfdir}/mpv \
180 --libdir=%{_libdir} \
181 --datadir=%{_datadir} \
182 --mandir=%{_mandir} \
183 --disable-debug-build \
185 %{__enable_disable caca} \
190 %{__enable_disable dvdnav} \
191 --enable-gl-wayland \
198 --enable-libass-osd \
199 --enable-libavdevice \
201 --enable-libmpv-shared \
202 %{__enable_disable libplacebo} \
203 %{__enable_disable rubberband} \
204 %{__enable_disable samba libsmbclient} \
209 %{__enable_disable shaderc} \
212 %{__enable_disable vapoursynth} \
214 --enable-vdpau-gl-x11 \
218 %{__enable_disable zimg} \
220 --bashdir=%{bash_compdir} \
221 --zshdir=%{zsh_compdir}
226 rm -rf $RPM_BUILD_ROOT
228 %waf install --destdir=$RPM_BUILD_ROOT
230 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv
231 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv
233 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
236 rm -rf $RPM_BUILD_ROOT
238 %post client-libs -p /sbin/ldconfig
239 %postun client-libs -p /sbin/ldconfig
242 %defattr(644,root,root,755)
243 %doc README.md RELEASE_NOTES etc/input.conf etc/mplayer-input.conf etc/mpv.conf etc/restore-old-bindings.conf
244 %dir %{_sysconfdir}/mpv
245 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/encoding-profiles.conf
246 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/mpv.conf
247 %attr(755,root,root) %{_bindir}/%{name}
248 %{_desktopdir}/mpv.desktop
249 %{_iconsdir}/hicolor/*/apps/mpv.png
250 %{_iconsdir}/hicolor/scalable/apps/mpv.svg
251 %{_iconsdir}/hicolor/symbolic/apps/mpv-symbolic.svg
252 %{_mandir}/man1/mpv.1*
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_libdir}/libmpv.so.*.*.*
257 %attr(755,root,root) %ghost %{_libdir}/libmpv.so.1
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/libmpv.so
263 %{_pkgconfigdir}/mpv.pc
265 %files -n bash-completion-mpv
266 %defattr(644,root,root,755)
269 %files -n zsh-completion-mpv
270 %defattr(644,root,root,755)