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