]> git.pld-linux.org Git - packages/mpv.git/blame - mpv.spec
up to 0.38.0
[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 6%bcond_without rubberband # librubberband support
07324bdc 7%bcond_without sixel # sixel video output
2299b04f
JP
8%bcond_without vapoursynth # VapourSynth filter bridge
9%bcond_without zimg # libzimg support (high quality software scaler)
10
b297e630 11Summary: Movie player based on MPlayer and mplayer2
c1eb0652 12Summary(pl.UTF-8): Odtwarzacz filmów oparty na projektach MPlayer i mplayer2
b297e630 13Name: mpv
b6820b11
JP
14Version: 0.38.0
15Release: 1
236ade95 16License: GPL v2+
b297e630 17Group: Applications/Multimedia
c1eb0652 18#Source0Download: http://github.com/mpv-player/mpv/releases
42c8993b 19Source0: https://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz
b6820b11 20# Source0-md5: 7c1a400867e8930f037efc86c1f90a14
4084bdb9 21Source1: %{name}.conf
b297e630 22URL: http://mpv.io/
77c81a17 23BuildRequires: EGL-devel
1b335768 24BuildRequires: Mesa-libgbm-devel >= 17.1.0
b297e630
JP
25BuildRequires: OpenAL-devel >= 1.13
26BuildRequires: OpenGL-devel
9da63119 27BuildRequires: SDL2-devel
7588d009 28BuildRequires: Vulkan-Loader-devel >= 1.3.238
5045f7e8 29BuildRequires: alsa-lib-devel >= 1.0.18
682d5897 30BuildRequires: docutils
7588d009 31BuildRequires: ffmpeg-devel >= 4.4
b297e630 32BuildRequires: jack-audio-connection-kit-devel
d297c06d 33BuildRequires: lcms2-devel >= 2.6
f272a633 34BuildRequires: libarchive-devel >= 3.4.0
236ade95 35BuildRequires: libass-devel >= 0.12.2
fd204822 36%ifnarch %arch_with_atomics64
308de4d0
JP
37BuildRequires: libatomic-devel
38%endif
5d9fec95 39BuildRequires: libbluray-devel >= 0.3.0
2299b04f 40%{?with_caca:BuildRequires: libcaca-devel >= 0.99-0.beta18.1}
7bdf1c10 41BuildRequires: libcdio-devel >= 0.90
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
b6820b11 49BuildRequires: libplacebo-devel >= 6.338.2
07324bdc 50%{?with_sixel:BuildRequires: libsixel-devel >= 1.5}
5045f7e8
JP
51BuildRequires: libva-devel >= 1.4.0
52BuildRequires: libva-glx-devel >= 1.4.0
b297e630 53BuildRequires: libvdpau-devel >= 0.2
236ade95 54BuildRequires: lua52-devel
7bdf1c10 55BuildRequires: meson >= 0.62.0
236ade95 56%{?with_js:BuildRequires: mujs-devel >= 1.0.0}
7bdf1c10 57BuildRequires: ninja
7588d009 58BuildRequires: nv-codec-headers >= 11.1.5.1
cce321b3 59BuildRequires: pipewire-devel >= 0.3.48
b297e630 60BuildRequires: pkgconfig
5045f7e8 61BuildRequires: pulseaudio-devel >= 1.0
fc836dc8 62BuildRequires: rpm-build >= 4.6
fd204822 63BuildRequires: rpmbuild(macros) >= 2.025
2299b04f 64%{?with_rubberband:BuildRequires: rubberband-devel >= 1.8.0}
a33f39f8 65BuildRequires: uchardet-devel
7bdf1c10 66%{?with_vapoursynth:BuildRequires: vapoursynth-devel >= 26}
7588d009 67BuildRequires: wayland-devel >= 1.20.0
12311963 68BuildRequires: wayland-egl-devel
7588d009 69BuildRequires: wayland-protocols >= 1.32
31601366
JP
70BuildRequires: xorg-lib-libX11-devel >= 1.0.0
71BuildRequires: xorg-lib-libXScrnSaver-devel >= 1.0.0
b297e630 72BuildRequires: xorg-lib-libXdamage-devel
31601366 73BuildRequires: xorg-lib-libXext-devel >= 1.0.0
1b335768 74BuildRequires: xorg-lib-libXpresent-devel >= 1.0.0
7bdf1c10 75BuildRequires: xorg-lib-libXrandr-devel >= 1.4.0
b297e630 76BuildRequires: xorg-lib-libXv-devel
b297e630
JP
77BuildRequires: xorg-lib-libxkbcommon-devel >= 0.3.0
78BuildRequires: xorg-proto-xproto-devel
7588d009 79%{?with_zimg:BuildRequires: zimg-devel >= 3.0.5}
f272a633 80BuildRequires: zlib-devel
88ee6beb
JP
81Requires(post,postun): desktop-file-utils
82Requires(post,postun): gtk-update-icon-cache
5d9fec95 83Requires: OpenAL >= 1.13
b297e630 84Requires: OpenGL
5045f7e8 85Requires: alsa-lib >= 1.0.18
88ee6beb 86Requires: hicolor-icon-theme
8a7befcf 87%requires_eq_to ffmpeg-libs ffmpeg-devel
5d9fec95 88Requires: lcms2 >= 2.6
f272a633 89Requires: libarchive >= 3.4.0
236ade95 90Requires: libass >= 0.12.2
5d9fec95 91Requires: libbluray >= 0.3.0
2299b04f 92%{?with_caca:Requires: libcaca >= 0.99-0.beta18.1}
1b335768 93Requires: libdrm >= 2.4.105
2299b04f 94%if %{with dvdnav}
5d9fec95
JP
95Requires: libdvdnav >= 4.2.0
96Requires: libdvdread >= 4.1.0
2299b04f 97%endif
cce321b3 98Requires: pipewire-libs >= 0.3.48
7bdf1c10 99%requires_ge_to libplacebo libplacebo-devel
07324bdc 100%{?with_sixel:Requires: libsixel >= 1.5}
5045f7e8
JP
101Requires: libva >= 1.4.0
102Requires: libva-glx >= 1.4.0
5d9fec95 103Requires: libvdpau >= 0.2
236ade95 104%{?with_js:Requires: mujs >= 1.0.0}
5d9fec95 105Requires: pulseaudio-libs >= 1.0
2299b04f 106%{?with_rubberband:Requires: rubberband-libs >= 1.8.0}
7bdf1c10 107%{?with_vapoursynth:Requires: vapoursynth >= 26}
8a7befcf 108Requires: wayland >= 1.15.0
31601366
JP
109Requires: xorg-lib-libX11 >= 1.0.0
110Requires: xorg-lib-libXScrnSaver >= 1.0.0
111Requires: xorg-lib-libXext >= 1.0.0
7bdf1c10 112Requires: xorg-lib-libXrandr >= 1.4.0
5d9fec95 113Requires: xorg-lib-libxkbcommon >= 0.3.0
7588d009 114%{?with_zimg:Requires: zimg >= 3.0.5}
80c75f4f 115Suggests: yt-dlp
b297e630
JP
116BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
117
b297e630 118%description
292eac8e 119Movie player based on MPlayer and mplayer2.
b297e630 120
c1eb0652
JB
121%description -l pl.UTF-8
122Odtwarzacz filmów oparty na projektach MPlayer i mplayer2.
123
d297c06d 124%package client-libs
e386ece9 125Summary: Client library for controlling mpv
c1eb0652
JB
126Summary(pl.UTF-8): Biblioteka kliencka do sterowania odtwarzaczem mpv
127Group: Libraries
d297c06d
JP
128
129%description client-libs
130Client library for controlling mpv.
131
c1eb0652
JB
132%description client-libs -l pl.UTF-8
133Biblioteka kliencka do sterowania odtwarzaczem mpv.
134
d297c06d 135%package client-devel
e386ece9 136Summary: Development files for mpv client library
c1eb0652 137Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej mpv
e386ece9
JP
138Group: Development/Libraries
139Requires: %{name}-client-libs = %{version}-%{release}
d297c06d
JP
140
141%description client-devel
142Development files for mpv client library.
143
c1eb0652
JB
144%description client-devel -l pl.UTF-8
145Pliki programistyczne biblioteki klienckiej mpv.
146
f272a633
JP
147%package -n bash-completion-mpv
148Summary: Bash completion for mpv
149Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki Bash
150Group: Applications/Shells
151Requires: %{name} = %{version}-%{release}
7426782a 152Requires: bash-completion >= 1:2.0
fc836dc8 153BuildArch: noarch
f272a633
JP
154
155%description -n bash-completion-mpv
156Bash completion for mpv.
157
158%description -n bash-completion-mpv -l pl.UTF-8
159Dopełnianie parametrów mpv dla powłoki Bash.
160
d297c06d 161%package -n zsh-completion-mpv
c1eb0652
JB
162Summary: ZSH completion for mpv
163Summary(pl.UTF-8): Dopełnianie parametrów mpv dla powłoki ZSH
e386ece9
JP
164Group: Applications/Shells
165Requires: %{name} = %{version}-%{release}
fc836dc8 166BuildArch: noarch
d297c06d
JP
167
168%description -n zsh-completion-mpv
c1eb0652
JB
169ZSH completion for mpv.
170
171%description -n zsh-completion-mpv -l pl.UTF-8
172Dopełnianie parametrów mpv dla powłoki ZSH.
d297c06d 173
b297e630
JP
174%prep
175%setup -q
176
177%build
7bdf1c10
JP
178%meson build \
179 -Dalsa=enabled \
180 -Dcaca=%{__enabled_disabled caca} \
181 -Dcdda=enabled \
182 -Dcplugins=enabled \
183 -Ddvbin=enabled \
184 -Ddvdnav=%{__enabled_disabled dvdnav} \
185 -Degl-wayland=enabled \
186 -Degl-x11=enabled \
187 -Dgl-x11=enabled \
188 -Diconv=enabled \
189 -Djack=enabled \
190 -Djavascript=%{__enabled_disabled js} \
191 -Djpeg=enabled \
192 -Dlcms2=enabled \
193 -Dlibavdevice=enabled \
194 -Dlibbluray=enabled \
195 -Dlibmpv=true \
196 -Drubberband=%{__enabled_disabled rubberband} \
197 -Dopenal=enabled \
198 -Dpulse=enabled \
199 -Dsdl2=enabled \
07324bdc 200 -Dsixel=%{__enabled_disabled sixel} \
7bdf1c10
JP
201 -Duchardet=enabled \
202 -Dvaapi=enabled \
203 -Dvapoursynth=%{__enabled_disabled vapoursynth} \
204 -Dvdpau=enabled \
205 -Dvdpau-gl-x11=enabled \
206 -Dwayland=enabled \
207 -Dx11=enabled \
208 -Dxv=enabled \
209 -Dzimg=%{__enabled_disabled zimg} \
210 -Dlua=lua5.2
211
212%ninja_build -C build
b297e630
JP
213
214%install
215rm -rf $RPM_BUILD_ROOT
216
7bdf1c10 217%ninja_install -C build
b297e630 218
4084bdb9 219install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv
e386ece9 220cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv
4084bdb9 221
a68f52ba
JP
222%{__rm} -r $RPM_BUILD_ROOT%{_docdir}
223
b297e630
JP
224%clean
225rm -rf $RPM_BUILD_ROOT
226
88ee6beb
JP
227%post
228%update_desktop_database_post
229%update_icon_cache hicolor
230
231%postun
232%update_desktop_database_postun
233%update_icon_cache hicolor
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.464538 seconds and 5 git commands to generate.