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