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