]> git.pld-linux.org Git - packages/mpv.git/blame - mpv.spec
upstream fix to adjust to recent changes in yt-dlp; rel 2
[packages/mpv.git] / mpv.spec
CommitLineData
2299b04f
JP
1#
2# Conditional build:
3%bcond_without caca # CACA
4%bcond_without dvdnav # dvdnav support
236ade95 5%bcond_without js # JavaScript scripting support
2299b04f
JP
6%bcond_without libplacebo # libplacebo support
7%bcond_without rubberband # librubberband support
2299b04f
JP
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 12Summary: Movie player based on MPlayer and mplayer2
c1eb0652 13Summary(pl.UTF-8): Odtwarzacz filmów oparty na projektach MPlayer i mplayer2
b297e630 14Name: mpv
74e6ea85 15Version: 0.35.1
ff10eee2 16Release: 2
236ade95 17License: GPL v2+
b297e630 18Group: Applications/Multimedia
c1eb0652 19#Source0Download: http://github.com/mpv-player/mpv/releases
42c8993b 20Source0: https://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz
74e6ea85 21# Source0-md5: 68460d9eb1b42bc6dc13713d4303049b
4084bdb9 22Source1: %{name}.conf
ff10eee2 23Patch0: ytdl.patch
b297e630 24URL: http://mpv.io/
77c81a17 25BuildRequires: EGL-devel
1b335768 26BuildRequires: Mesa-libgbm-devel >= 17.1.0
b297e630
JP
27BuildRequires: OpenAL-devel >= 1.13
28BuildRequires: OpenGL-devel
9da63119 29BuildRequires: SDL2-devel
5045f7e8 30BuildRequires: alsa-lib-devel >= 1.0.18
682d5897 31BuildRequires: docutils
fe3aada1 32BuildRequires: ffmpeg-devel >= 4.0
b297e630 33BuildRequires: jack-audio-connection-kit-devel
d297c06d 34BuildRequires: lcms2-devel >= 2.6
f272a633 35BuildRequires: libarchive-devel >= 3.4.0
236ade95 36BuildRequires: libass-devel >= 0.12.2
b1242f3d 37%ifarch i386 i486 %{armv6}
308de4d0
JP
38BuildRequires: libatomic-devel
39%endif
5d9fec95 40BuildRequires: libbluray-devel >= 0.3.0
2299b04f 41%{?with_caca:BuildRequires: libcaca-devel >= 0.99-0.beta18.1}
b297e630 42BuildRequires: libcdio-paranoia-devel
1b335768 43BuildRequires: libdrm-devel >= 2.4.105
2299b04f 44%if %{with dvdnav}
b297e630
JP
45BuildRequires: libdvdnav-devel >= 4.2.0
46BuildRequires: libdvdread-devel >= 4.1.0
2299b04f 47%endif
b297e630 48BuildRequires: libjpeg-devel
1b335768 49%{?with_libplacebo:BuildRequires: libplacebo-devel >= 4.157.0}
5045f7e8
JP
50BuildRequires: libva-devel >= 1.4.0
51BuildRequires: libva-glx-devel >= 1.4.0
b297e630 52BuildRequires: libvdpau-devel >= 0.2
236ade95
JP
53BuildRequires: lua52-devel
54%{?with_js:BuildRequires: mujs-devel >= 1.0.0}
f272a633 55BuildRequires: nv-codec-headers >= 8.2.15.7
1b335768 56BuildRequires: pipewire-devel >= 0.3.19
b297e630 57BuildRequires: pkgconfig
5045f7e8 58BuildRequires: pulseaudio-devel >= 1.0
b1242f3d 59BuildRequires: rpmbuild(macros) >= 2.007
2299b04f
JP
60%{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.0}
61%{?with_shaderc:BuildRequires: shaderc-devel >= 2019.0}
a33f39f8 62BuildRequires: uchardet-devel
2299b04f 63%{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 24}
236ade95 64BuildRequires: waf >= 2.0.21
8a7befcf 65BuildRequires: wayland-devel >= 1.15.0
12311963 66BuildRequires: wayland-egl-devel
1b335768 67BuildRequires: wayland-protocols >= 1.24
31601366
JP
68BuildRequires: xorg-lib-libX11-devel >= 1.0.0
69BuildRequires: xorg-lib-libXScrnSaver-devel >= 1.0.0
b297e630 70BuildRequires: xorg-lib-libXdamage-devel
31601366
JP
71BuildRequires: xorg-lib-libXext-devel >= 1.0.0
72BuildRequires: xorg-lib-libXinerama-devel >= 1.0.0
1b335768 73BuildRequires: xorg-lib-libXpresent-devel >= 1.0.0
31601366 74BuildRequires: xorg-lib-libXrandr-devel >= 1.2.0
b297e630 75BuildRequires: xorg-lib-libXv-devel
b297e630
JP
76BuildRequires: xorg-lib-libxkbcommon-devel >= 0.3.0
77BuildRequires: xorg-proto-xproto-devel
2299b04f 78%{?with_zimg:BuildRequires: zimg-devel >= 2.9}
f272a633 79BuildRequires: zlib-devel
5d9fec95 80Requires: OpenAL >= 1.13
b297e630 81Requires: OpenGL
5045f7e8 82Requires: alsa-lib >= 1.0.18
8a7befcf 83%requires_eq_to ffmpeg-libs ffmpeg-devel
5d9fec95 84Requires: lcms2 >= 2.6
f272a633 85Requires: libarchive >= 3.4.0
236ade95 86Requires: libass >= 0.12.2
5d9fec95 87Requires: libbluray >= 0.3.0
2299b04f 88%{?with_caca:Requires: libcaca >= 0.99-0.beta18.1}
1b335768 89Requires: libdrm >= 2.4.105
2299b04f 90%if %{with dvdnav}
5d9fec95
JP
91Requires: libdvdnav >= 4.2.0
92Requires: libdvdread >= 4.1.0
2299b04f 93%endif
1b335768
JP
94Requires: pipewire-libs >= 0.3.19
95%{?with_libplacebo:Requires: libplacebo >= 4.157.0}
5045f7e8
JP
96Requires: libva >= 1.4.0
97Requires: libva-glx >= 1.4.0
5d9fec95 98Requires: libvdpau >= 0.2
236ade95 99%{?with_js:Requires: mujs >= 1.0.0}
5d9fec95 100Requires: pulseaudio-libs >= 1.0
2299b04f
JP
101%{?with_rubberband:Requires: rubberband-libs >= 1.8.0}
102%{?with_shaderc:Requires: shaderc >= 2019.0}
103%{?with_vapoursynth:Requires: vapoursynth >= 24}
8a7befcf 104Requires: wayland >= 1.15.0
31601366
JP
105Requires: xorg-lib-libX11 >= 1.0.0
106Requires: xorg-lib-libXScrnSaver >= 1.0.0
107Requires: xorg-lib-libXext >= 1.0.0
108Requires: xorg-lib-libXinerama >= 1.0.0
109Requires: xorg-lib-libXrandr >= 1.2.0
5d9fec95 110Requires: xorg-lib-libxkbcommon >= 0.3.0
2299b04f 111%{?with_zimg:Requires: zimg >= 2.9}
80c75f4f 112Suggests: yt-dlp
b297e630
JP
113BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
114
115%define _noautoreqdep libGL.so.1 libGLU.so.1
116
117%description
292eac8e 118Movie player based on MPlayer and mplayer2.
b297e630 119
c1eb0652
JB
120%description -l pl.UTF-8
121Odtwarzacz filmów oparty na projektach MPlayer i mplayer2.
122
d297c06d 123%package client-libs
e386ece9 124Summary: Client library for controlling mpv
c1eb0652
JB
125Summary(pl.UTF-8): Biblioteka kliencka do sterowania odtwarzaczem mpv
126Group: Libraries
d297c06d
JP
127
128%description client-libs
129Client library for controlling mpv.
130
c1eb0652
JB
131%description client-libs -l pl.UTF-8
132Biblioteka kliencka do sterowania odtwarzaczem mpv.
133
d297c06d 134%package client-devel
e386ece9 135Summary: Development files for mpv client library
c1eb0652 136Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej mpv
e386ece9
JP
137Group: Development/Libraries
138Requires: %{name}-client-libs = %{version}-%{release}
d297c06d
JP
139
140%description client-devel
141Development files for mpv client library.
142
c1eb0652
JB
143%description client-devel -l pl.UTF-8
144Pliki programistyczne biblioteki klienckiej mpv.
145
f272a633
JP
146%package -n bash-completion-mpv
147Summary: Bash completion for mpv
148Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki Bash
149Group: Applications/Shells
150Requires: %{name} = %{version}-%{release}
7426782a 151Requires: bash-completion >= 1:2.0
f272a633
JP
152
153%description -n bash-completion-mpv
154Bash completion for mpv.
155
156%description -n bash-completion-mpv -l pl.UTF-8
157Dopełnianie parametrów mpv dla powłoki Bash.
158
d297c06d 159%package -n zsh-completion-mpv
c1eb0652
JB
160Summary: ZSH completion for mpv
161Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki ZSH
e386ece9
JP
162Group: Applications/Shells
163Requires: %{name} = %{version}-%{release}
d297c06d
JP
164
165%description -n zsh-completion-mpv
c1eb0652
JB
166ZSH completion for mpv.
167
168%description -n zsh-completion-mpv -l pl.UTF-8
169Dopełnianie parametrów mpv dla powłoki ZSH.
d297c06d 170
b297e630
JP
171%prep
172%setup -q
ff10eee2 173%patch0 -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 \
236ade95 195 %{__enable_disable js javascript} \
b297e630 196 --enable-jpeg \
b297e630 197 --enable-lcms2 \
d297c06d 198 --enable-libavdevice \
b297e630 199 --enable-libbluray \
d297c06d 200 --enable-libmpv-shared \
2299b04f
JP
201 %{__enable_disable libplacebo} \
202 %{__enable_disable rubberband} \
b297e630 203 --enable-openal \
b297e630 204 --enable-pulse \
9da63119 205 --enable-sdl2 \
2299b04f 206 %{__enable_disable shaderc} \
a33f39f8 207 --enable-uchardet \
b297e630 208 --enable-vaapi \
2299b04f 209 %{__enable_disable vapoursynth} \
b297e630 210 --enable-vdpau \
d297c06d 211 --enable-vdpau-gl-x11 \
d297c06d 212 --enable-wayland \
b297e630 213 --enable-x11 \
d297c06d 214 --enable-xv \
2299b04f 215 %{__enable_disable zimg} \
236ade95 216 --lua=52deb \
f272a633
JP
217 --bashdir=%{bash_compdir} \
218 --zshdir=%{zsh_compdir}
292eac8e 219
4d3f4bbb 220%waf build -v
b297e630
JP
221
222%install
223rm -rf $RPM_BUILD_ROOT
224
4d3f4bbb 225%waf install --destdir=$RPM_BUILD_ROOT
b297e630 226
4084bdb9 227install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv
e386ece9 228cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv
4084bdb9 229
a68f52ba
JP
230%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
231
b297e630
JP
232%clean
233rm -rf $RPM_BUILD_ROOT
234
1a8f2eea
ER
235%post client-libs -p /sbin/ldconfig
236%postun client-libs -p /sbin/ldconfig
237
b297e630
JP
238%files
239%defattr(644,root,root,755)
6ee6242b 240%doc README.md RELEASE_NOTES etc/input.conf etc/mplayer-input.conf etc/mpv.conf etc/restore-old-bindings.conf
b297e630 241%dir %{_sysconfdir}/mpv
1a8f2eea 242%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/encoding-profiles.conf
4084bdb9 243%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/mpv.conf
b297e630
JP
244%attr(755,root,root) %{_bindir}/%{name}
245%{_desktopdir}/mpv.desktop
246%{_iconsdir}/hicolor/*/apps/mpv.png
2d1f1cf1 247%{_iconsdir}/hicolor/scalable/apps/mpv.svg
0ea238bf 248%{_iconsdir}/hicolor/symbolic/apps/mpv-symbolic.svg
b297e630 249%{_mandir}/man1/mpv.1*
1b335768 250%{_datadir}/metainfo/mpv.metainfo.xml
d297c06d
JP
251
252%files client-libs
253%defattr(644,root,root,755)
254%attr(755,root,root) %{_libdir}/libmpv.so.*.*.*
1b335768 255%attr(755,root,root) %ghost %{_libdir}/libmpv.so.2
d297c06d
JP
256
257%files client-devel
258%defattr(644,root,root,755)
259%attr(755,root,root) %{_libdir}/libmpv.so
260%{_includedir}/mpv
261%{_pkgconfigdir}/mpv.pc
262
f272a633
JP
263%files -n bash-completion-mpv
264%defattr(644,root,root,755)
265%{bash_compdir}/mpv
266
d297c06d
JP
267%files -n zsh-completion-mpv
268%defattr(644,root,root,755)
f272a633 269%{zsh_compdir}/_mpv
This page took 0.142399 seconds and 4 git commands to generate.