]> git.pld-linux.org Git - packages/mpv.git/blame - mpv.spec
use generic EGL-devel BR
[packages/mpv.git] / mpv.spec
CommitLineData
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 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
f272a633 15Version: 0.32.0
c1578d78 16Release: 3
2299b04f 17License: GPL v%{!?with_samba:2}%{?with_samba:3}+
b297e630 18Group: Applications/Multimedia
c1eb0652
JB
19#Source0Download: http://github.com/mpv-player/mpv/releases
20Source0: http://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz
f272a633 21# Source0-md5: 1f7d23afe7a8639dedc9f7beef4e90d7
4084bdb9 22Source1: %{name}.conf
e386ece9 23Patch0: %{name}-lua.patch
3f336c4f 24Patch1: %{name}-shaderc.patch
c914af07 25Patch2: rtsp.patch
b297e630 26URL: http://mpv.io/
77c81a17 27BuildRequires: EGL-devel
f272a633 28BuildRequires: Mesa-libgbm-devel
b297e630
JP
29BuildRequires: OpenAL-devel >= 1.13
30BuildRequires: OpenGL-devel
9da63119 31BuildRequires: SDL2-devel
5045f7e8 32BuildRequires: alsa-lib-devel >= 1.0.18
682d5897 33BuildRequires: docutils
fe3aada1 34BuildRequires: ffmpeg-devel >= 4.0
b297e630 35BuildRequires: jack-audio-connection-kit-devel
d297c06d 36BuildRequires: lcms2-devel >= 2.6
f272a633 37BuildRequires: libarchive-devel >= 3.4.0
5d9fec95 38BuildRequires: libass-devel >= 0.12.1
308de4d0
JP
39%ifarch i386 i486
40BuildRequires: libatomic-devel
41%endif
5d9fec95 42BuildRequires: libbluray-devel >= 0.3.0
2299b04f 43%{?with_caca:BuildRequires: libcaca-devel >= 0.99-0.beta18.1}
b297e630 44BuildRequires: libcdio-paranoia-devel
f272a633 45BuildRequires: libdrm-devel >= 2.4.74
2299b04f 46%if %{with dvdnav}
b297e630
JP
47BuildRequires: libdvdnav-devel >= 4.2.0
48BuildRequires: libdvdread-devel >= 4.1.0
2299b04f 49%endif
b297e630 50BuildRequires: libjpeg-devel
2299b04f
JP
51%{?with_libplacebo:BuildRequires: libplacebo-devel >= 0.18.0}
52%{?with_samba:BuildRequires: libsmbclient-devel}
5045f7e8
JP
53BuildRequires: libva-devel >= 1.4.0
54BuildRequires: libva-glx-devel >= 1.4.0
b297e630 55BuildRequires: libvdpau-devel >= 0.2
f02c0322 56BuildRequires: lua51-devel
f272a633 57BuildRequires: nv-codec-headers >= 8.2.15.7
b297e630 58BuildRequires: pkgconfig
5045f7e8 59BuildRequires: pulseaudio-devel >= 1.0
f272a633 60BuildRequires: rpmbuild(macros) >= 1.719
2299b04f
JP
61%{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.0}
62%{?with_shaderc:BuildRequires: shaderc-devel >= 2019.0}
a33f39f8 63BuildRequires: uchardet-devel
2299b04f 64%{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 24}
9c4d4eba 65BuildRequires: waf >= 1.8.12
8a7befcf 66BuildRequires: wayland-devel >= 1.15.0
12311963 67BuildRequires: wayland-egl-devel
b4be0d1d 68BuildRequires: wayland-protocols >= 1.14
31601366
JP
69BuildRequires: xorg-lib-libX11-devel >= 1.0.0
70BuildRequires: xorg-lib-libXScrnSaver-devel >= 1.0.0
b297e630 71BuildRequires: xorg-lib-libXdamage-devel
31601366
JP
72BuildRequires: xorg-lib-libXext-devel >= 1.0.0
73BuildRequires: xorg-lib-libXinerama-devel >= 1.0.0
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
5d9fec95
JP
86Requires: libass >= 0.12.1
87Requires: libbluray >= 0.3.0
2299b04f 88%{?with_caca:Requires: libcaca >= 0.99-0.beta18.1}
f272a633 89Requires: libdrm >= 2.4.74
2299b04f 90%if %{with dvdnav}
5d9fec95
JP
91Requires: libdvdnav >= 4.2.0
92Requires: libdvdread >= 4.1.0
2299b04f
JP
93%endif
94%{?with_libplacebo:Requires: libplacebo >= 0.18.0}
5045f7e8
JP
95Requires: libva >= 1.4.0
96Requires: libva-glx >= 1.4.0
5d9fec95
JP
97Requires: libvdpau >= 0.2
98Requires: 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 102Requires: wayland >= 1.15.0
31601366
JP
103Requires: xorg-lib-libX11 >= 1.0.0
104Requires: xorg-lib-libXScrnSaver >= 1.0.0
105Requires: xorg-lib-libXext >= 1.0.0
106Requires: xorg-lib-libXinerama >= 1.0.0
107Requires: xorg-lib-libXrandr >= 1.2.0
5d9fec95 108Requires: xorg-lib-libxkbcommon >= 0.3.0
2299b04f 109%{?with_zimg:Requires: zimg >= 2.9}
20a45907 110Suggests: youtube-dl >= 2:20150223
b297e630
JP
111BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
112
113%define _noautoreqdep libGL.so.1 libGLU.so.1
114
115%description
292eac8e 116Movie player based on MPlayer and mplayer2.
b297e630 117
c1eb0652
JB
118%description -l pl.UTF-8
119Odtwarzacz filmów oparty na projektach MPlayer i mplayer2.
120
d297c06d 121%package client-libs
e386ece9 122Summary: Client library for controlling mpv
c1eb0652
JB
123Summary(pl.UTF-8): Biblioteka kliencka do sterowania odtwarzaczem mpv
124Group: Libraries
d297c06d
JP
125
126%description client-libs
127Client library for controlling mpv.
128
c1eb0652
JB
129%description client-libs -l pl.UTF-8
130Biblioteka kliencka do sterowania odtwarzaczem mpv.
131
d297c06d 132%package client-devel
e386ece9 133Summary: Development files for mpv client library
c1eb0652 134Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej mpv
e386ece9
JP
135Group: Development/Libraries
136Requires: %{name}-client-libs = %{version}-%{release}
d297c06d
JP
137
138%description client-devel
139Development files for mpv client library.
140
c1eb0652
JB
141%description client-devel -l pl.UTF-8
142Pliki programistyczne biblioteki klienckiej mpv.
143
f272a633
JP
144%package -n bash-completion-mpv
145Summary: Bash completion for mpv
146Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki Bash
147Group: Applications/Shells
148Requires: %{name} = %{version}-%{release}
149Requires: bash-completion >= 2.0
150
151%description -n bash-completion-mpv
152Bash completion for mpv.
153
154%description -n bash-completion-mpv -l pl.UTF-8
155Dopełnianie parametrów mpv dla powłoki Bash.
156
d297c06d 157%package -n zsh-completion-mpv
c1eb0652
JB
158Summary: ZSH completion for mpv
159Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki ZSH
e386ece9
JP
160Group: Applications/Shells
161Requires: %{name} = %{version}-%{release}
d297c06d
JP
162
163%description -n zsh-completion-mpv
c1eb0652
JB
164ZSH completion for mpv.
165
166%description -n zsh-completion-mpv -l pl.UTF-8
167Dopeł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
226rm -rf $RPM_BUILD_ROOT
227
4d3f4bbb 228%waf install --destdir=$RPM_BUILD_ROOT
b297e630 229
4084bdb9 230install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv
e386ece9 231cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv
4084bdb9 232
a68f52ba
JP
233%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
234
b297e630
JP
235%clean
236rm -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
This page took 0.082717 seconds and 4 git commands to generate.