]>
Commit | Line | Data |
---|---|---|
2299b04f JP |
1 | # |
2 | # Conditional build: | |
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) | |
11 | ||
b297e630 | 12 | Summary: Movie player based on MPlayer and mplayer2 |
c1eb0652 | 13 | Summary(pl.UTF-8): Odtwarzacz filmów oparty na projektach MPlayer i mplayer2 |
b297e630 | 14 | Name: mpv |
f272a633 | 15 | Version: 0.32.0 |
f8cae77c | 16 | Release: 4 |
2299b04f | 17 | License: GPL v%{!?with_samba:2}%{?with_samba:3}+ |
b297e630 | 18 | Group: Applications/Multimedia |
c1eb0652 JB |
19 | #Source0Download: http://github.com/mpv-player/mpv/releases |
20 | Source0: http://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz | |
f272a633 | 21 | # Source0-md5: 1f7d23afe7a8639dedc9f7beef4e90d7 |
4084bdb9 | 22 | Source1: %{name}.conf |
e386ece9 | 23 | Patch0: %{name}-lua.patch |
3f336c4f | 24 | Patch1: %{name}-shaderc.patch |
c914af07 | 25 | Patch2: rtsp.patch |
b297e630 | 26 | URL: http://mpv.io/ |
77c81a17 | 27 | BuildRequires: EGL-devel |
f272a633 | 28 | BuildRequires: Mesa-libgbm-devel |
b297e630 JP |
29 | BuildRequires: OpenAL-devel >= 1.13 |
30 | BuildRequires: OpenGL-devel | |
9da63119 | 31 | BuildRequires: SDL2-devel |
5045f7e8 | 32 | BuildRequires: alsa-lib-devel >= 1.0.18 |
682d5897 | 33 | BuildRequires: docutils |
fe3aada1 | 34 | BuildRequires: ffmpeg-devel >= 4.0 |
b297e630 | 35 | BuildRequires: jack-audio-connection-kit-devel |
d297c06d | 36 | BuildRequires: lcms2-devel >= 2.6 |
f272a633 | 37 | BuildRequires: libarchive-devel >= 3.4.0 |
5d9fec95 | 38 | BuildRequires: libass-devel >= 0.12.1 |
308de4d0 JP |
39 | %ifarch i386 i486 |
40 | BuildRequires: libatomic-devel | |
41 | %endif | |
5d9fec95 | 42 | BuildRequires: libbluray-devel >= 0.3.0 |
2299b04f | 43 | %{?with_caca:BuildRequires: libcaca-devel >= 0.99-0.beta18.1} |
b297e630 | 44 | BuildRequires: libcdio-paranoia-devel |
f272a633 | 45 | BuildRequires: libdrm-devel >= 2.4.74 |
2299b04f | 46 | %if %{with dvdnav} |
b297e630 JP |
47 | BuildRequires: libdvdnav-devel >= 4.2.0 |
48 | BuildRequires: libdvdread-devel >= 4.1.0 | |
2299b04f | 49 | %endif |
b297e630 | 50 | BuildRequires: libjpeg-devel |
2299b04f JP |
51 | %{?with_libplacebo:BuildRequires: libplacebo-devel >= 0.18.0} |
52 | %{?with_samba:BuildRequires: libsmbclient-devel} | |
5045f7e8 JP |
53 | BuildRequires: libva-devel >= 1.4.0 |
54 | BuildRequires: libva-glx-devel >= 1.4.0 | |
b297e630 | 55 | BuildRequires: libvdpau-devel >= 0.2 |
f02c0322 | 56 | BuildRequires: lua51-devel |
f272a633 | 57 | BuildRequires: nv-codec-headers >= 8.2.15.7 |
b297e630 | 58 | BuildRequires: pkgconfig |
5045f7e8 | 59 | BuildRequires: pulseaudio-devel >= 1.0 |
f272a633 | 60 | BuildRequires: rpmbuild(macros) >= 1.719 |
2299b04f JP |
61 | %{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.0} |
62 | %{?with_shaderc:BuildRequires: shaderc-devel >= 2019.0} | |
a33f39f8 | 63 | BuildRequires: uchardet-devel |
2299b04f | 64 | %{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 24} |
9c4d4eba | 65 | BuildRequires: waf >= 1.8.12 |
8a7befcf | 66 | BuildRequires: wayland-devel >= 1.15.0 |
12311963 | 67 | BuildRequires: wayland-egl-devel |
b4be0d1d | 68 | BuildRequires: wayland-protocols >= 1.14 |
31601366 JP |
69 | BuildRequires: xorg-lib-libX11-devel >= 1.0.0 |
70 | BuildRequires: xorg-lib-libXScrnSaver-devel >= 1.0.0 | |
b297e630 | 71 | BuildRequires: xorg-lib-libXdamage-devel |
31601366 JP |
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 | |
b297e630 | 75 | BuildRequires: xorg-lib-libXv-devel |
b297e630 JP |
76 | BuildRequires: xorg-lib-libxkbcommon-devel >= 0.3.0 |
77 | BuildRequires: xorg-proto-xproto-devel | |
2299b04f | 78 | %{?with_zimg:BuildRequires: zimg-devel >= 2.9} |
f272a633 | 79 | BuildRequires: zlib-devel |
5d9fec95 | 80 | Requires: OpenAL >= 1.13 |
b297e630 | 81 | Requires: OpenGL |
5045f7e8 | 82 | Requires: alsa-lib >= 1.0.18 |
8a7befcf | 83 | %requires_eq_to ffmpeg-libs ffmpeg-devel |
5d9fec95 | 84 | Requires: lcms2 >= 2.6 |
f272a633 | 85 | Requires: libarchive >= 3.4.0 |
5d9fec95 JP |
86 | Requires: libass >= 0.12.1 |
87 | Requires: libbluray >= 0.3.0 | |
2299b04f | 88 | %{?with_caca:Requires: libcaca >= 0.99-0.beta18.1} |
f272a633 | 89 | Requires: libdrm >= 2.4.74 |
2299b04f | 90 | %if %{with dvdnav} |
5d9fec95 JP |
91 | Requires: libdvdnav >= 4.2.0 |
92 | Requires: libdvdread >= 4.1.0 | |
2299b04f JP |
93 | %endif |
94 | %{?with_libplacebo:Requires: libplacebo >= 0.18.0} | |
5045f7e8 JP |
95 | Requires: libva >= 1.4.0 |
96 | Requires: libva-glx >= 1.4.0 | |
5d9fec95 JP |
97 | Requires: libvdpau >= 0.2 |
98 | Requires: pulseaudio-libs >= 1.0 | |
2299b04f JP |
99 | %{?with_rubberband:Requires: rubberband-libs >= 1.8.0} |
100 | %{?with_shaderc:Requires: shaderc >= 2019.0} | |
101 | %{?with_vapoursynth:Requires: vapoursynth >= 24} | |
8a7befcf | 102 | Requires: wayland >= 1.15.0 |
31601366 JP |
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 | |
5d9fec95 | 108 | Requires: xorg-lib-libxkbcommon >= 0.3.0 |
2299b04f | 109 | %{?with_zimg:Requires: zimg >= 2.9} |
20a45907 | 110 | Suggests: youtube-dl >= 2:20150223 |
b297e630 JP |
111 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
112 | ||
113 | %define _noautoreqdep libGL.so.1 libGLU.so.1 | |
114 | ||
115 | %description | |
292eac8e | 116 | Movie player based on MPlayer and mplayer2. |
b297e630 | 117 | |
c1eb0652 JB |
118 | %description -l pl.UTF-8 |
119 | Odtwarzacz filmów oparty na projektach MPlayer i mplayer2. | |
120 | ||
d297c06d | 121 | %package client-libs |
e386ece9 | 122 | Summary: Client library for controlling mpv |
c1eb0652 JB |
123 | Summary(pl.UTF-8): Biblioteka kliencka do sterowania odtwarzaczem mpv |
124 | Group: Libraries | |
d297c06d JP |
125 | |
126 | %description client-libs | |
127 | Client library for controlling mpv. | |
128 | ||
c1eb0652 JB |
129 | %description client-libs -l pl.UTF-8 |
130 | Biblioteka kliencka do sterowania odtwarzaczem mpv. | |
131 | ||
d297c06d | 132 | %package client-devel |
e386ece9 | 133 | Summary: Development files for mpv client library |
c1eb0652 | 134 | Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej mpv |
e386ece9 JP |
135 | Group: Development/Libraries |
136 | Requires: %{name}-client-libs = %{version}-%{release} | |
d297c06d JP |
137 | |
138 | %description client-devel | |
139 | Development files for mpv client library. | |
140 | ||
c1eb0652 JB |
141 | %description client-devel -l pl.UTF-8 |
142 | Pliki programistyczne biblioteki klienckiej mpv. | |
143 | ||
f272a633 JP |
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 | |
150 | ||
151 | %description -n bash-completion-mpv | |
152 | Bash completion for mpv. | |
153 | ||
154 | %description -n bash-completion-mpv -l pl.UTF-8 | |
155 | Dopełnianie parametrów mpv dla powłoki Bash. | |
156 | ||
d297c06d | 157 | %package -n zsh-completion-mpv |
c1eb0652 JB |
158 | Summary: ZSH completion for mpv |
159 | Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki ZSH | |
e386ece9 JP |
160 | Group: Applications/Shells |
161 | Requires: %{name} = %{version}-%{release} | |
d297c06d JP |
162 | |
163 | %description -n zsh-completion-mpv | |
c1eb0652 JB |
164 | ZSH completion for mpv. |
165 | ||
166 | %description -n zsh-completion-mpv -l pl.UTF-8 | |
167 | Dopełnianie parametrów mpv dla powłoki ZSH. | |
d297c06d | 168 | |
b297e630 JP |
169 | %prep |
170 | %setup -q | |
d297c06d | 171 | %patch0 -p1 |
3f336c4f | 172 | %patch1 -p1 |
c914af07 | 173 | %patch2 -p1 |
b297e630 JP |
174 | |
175 | %build | |
4d3f4bbb | 176 | %waf configure \ |
b297e630 JP |
177 | --prefix=%{_prefix} \ |
178 | --bindir=%{_bindir} \ | |
179 | --confdir=%{_sysconfdir}/mpv \ | |
180 | --libdir=%{_libdir} \ | |
181 | --datadir=%{_datadir} \ | |
182 | --mandir=%{_mandir} \ | |
183 | --disable-debug-build \ | |
184 | --enable-alsa \ | |
2299b04f | 185 | %{__enable_disable caca} \ |
b297e630 | 186 | --enable-cdda \ |
4c185ee1 | 187 | --enable-cplugins \ |
b297e630 JP |
188 | --enable-dvb \ |
189 | --enable-dvbin \ | |
2299b04f | 190 | %{__enable_disable dvdnav} \ |
b297e630 JP |
191 | --enable-gl-wayland \ |
192 | --enable-gl-x11 \ | |
193 | --enable-iconv \ | |
194 | --enable-jack \ | |
b297e630 | 195 | --enable-jpeg \ |
b297e630 JP |
196 | --enable-lcms2 \ |
197 | --enable-libass \ | |
d297c06d JP |
198 | --enable-libass-osd \ |
199 | --enable-libavdevice \ | |
b297e630 | 200 | --enable-libbluray \ |
d297c06d | 201 | --enable-libmpv-shared \ |
2299b04f JP |
202 | %{__enable_disable libplacebo} \ |
203 | %{__enable_disable rubberband} \ | |
204 | %{__enable_disable samba libsmbclient} \ | |
b297e630 JP |
205 | --enable-openal \ |
206 | --enable-oss-audio \ | |
b297e630 | 207 | --enable-pulse \ |
9da63119 | 208 | --enable-sdl2 \ |
2299b04f | 209 | %{__enable_disable shaderc} \ |
a33f39f8 | 210 | --enable-uchardet \ |
b297e630 | 211 | --enable-vaapi \ |
2299b04f | 212 | %{__enable_disable vapoursynth} \ |
b297e630 | 213 | --enable-vdpau \ |
d297c06d | 214 | --enable-vdpau-gl-x11 \ |
d297c06d | 215 | --enable-wayland \ |
b297e630 | 216 | --enable-x11 \ |
d297c06d | 217 | --enable-xv \ |
2299b04f | 218 | %{__enable_disable zimg} \ |
e386ece9 | 219 | --lua=51pld \ |
f272a633 JP |
220 | --bashdir=%{bash_compdir} \ |
221 | --zshdir=%{zsh_compdir} | |
292eac8e | 222 | |
4d3f4bbb | 223 | %waf build -v |
b297e630 JP |
224 | |
225 | %install | |
226 | rm -rf $RPM_BUILD_ROOT | |
227 | ||
4d3f4bbb | 228 | %waf install --destdir=$RPM_BUILD_ROOT |
b297e630 | 229 | |
4084bdb9 | 230 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv |
e386ece9 | 231 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv |
4084bdb9 | 232 | |
a68f52ba JP |
233 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir} |
234 | ||
b297e630 JP |
235 | %clean |
236 | rm -rf $RPM_BUILD_ROOT | |
237 | ||
1a8f2eea ER |
238 | %post client-libs -p /sbin/ldconfig |
239 | %postun client-libs -p /sbin/ldconfig | |
240 | ||
b297e630 JP |
241 | %files |
242 | %defattr(644,root,root,755) | |
6ee6242b | 243 | %doc README.md RELEASE_NOTES etc/input.conf etc/mplayer-input.conf etc/mpv.conf etc/restore-old-bindings.conf |
b297e630 | 244 | %dir %{_sysconfdir}/mpv |
1a8f2eea | 245 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/encoding-profiles.conf |
4084bdb9 | 246 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/mpv.conf |
b297e630 JP |
247 | %attr(755,root,root) %{_bindir}/%{name} |
248 | %{_desktopdir}/mpv.desktop | |
249 | %{_iconsdir}/hicolor/*/apps/mpv.png | |
2d1f1cf1 | 250 | %{_iconsdir}/hicolor/scalable/apps/mpv.svg |
0ea238bf | 251 | %{_iconsdir}/hicolor/symbolic/apps/mpv-symbolic.svg |
b297e630 | 252 | %{_mandir}/man1/mpv.1* |
d297c06d JP |
253 | |
254 | %files client-libs | |
255 | %defattr(644,root,root,755) | |
256 | %attr(755,root,root) %{_libdir}/libmpv.so.*.*.* | |
257 | %attr(755,root,root) %ghost %{_libdir}/libmpv.so.1 | |
258 | ||
259 | %files client-devel | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{_libdir}/libmpv.so | |
262 | %{_includedir}/mpv | |
263 | %{_pkgconfigdir}/mpv.pc | |
264 | ||
f272a633 JP |
265 | %files -n bash-completion-mpv |
266 | %defattr(644,root,root,755) | |
267 | %{bash_compdir}/mpv | |
268 | ||
d297c06d JP |
269 | %files -n zsh-completion-mpv |
270 | %defattr(644,root,root,755) | |
f272a633 | 271 | %{zsh_compdir}/_mpv |