]> git.pld-linux.org Git - packages/mpv.git/blob - mpv.spec
use generic EGL-devel BR
[packages/mpv.git] / mpv.spec
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
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.32.0
16 Release:        3
17 License:        GPL v%{!?with_samba:2}%{?with_samba:3}+
18 Group:          Applications/Multimedia
19 #Source0Download: http://github.com/mpv-player/mpv/releases
20 Source0:        http://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz
21 # Source0-md5:  1f7d23afe7a8639dedc9f7beef4e90d7
22 Source1:        %{name}.conf
23 Patch0:         %{name}-lua.patch
24 Patch1:         %{name}-shaderc.patch
25 Patch2:         rtsp.patch
26 URL:            http://mpv.io/
27 BuildRequires:  EGL-devel
28 BuildRequires:  Mesa-libgbm-devel
29 BuildRequires:  OpenAL-devel >= 1.13
30 BuildRequires:  OpenGL-devel
31 BuildRequires:  SDL2-devel
32 BuildRequires:  alsa-lib-devel >= 1.0.18
33 BuildRequires:  docutils
34 BuildRequires:  ffmpeg-devel >= 4.0
35 BuildRequires:  jack-audio-connection-kit-devel
36 BuildRequires:  lcms2-devel >= 2.6
37 BuildRequires:  libarchive-devel >= 3.4.0
38 BuildRequires:  libass-devel >= 0.12.1
39 %ifarch i386 i486
40 BuildRequires:  libatomic-devel
41 %endif
42 BuildRequires:  libbluray-devel >= 0.3.0
43 %{?with_caca:BuildRequires:     libcaca-devel >= 0.99-0.beta18.1}
44 BuildRequires:  libcdio-paranoia-devel
45 BuildRequires:  libdrm-devel >= 2.4.74
46 %if %{with dvdnav}
47 BuildRequires:  libdvdnav-devel >= 4.2.0
48 BuildRequires:  libdvdread-devel >= 4.1.0
49 %endif
50 BuildRequires:  libjpeg-devel
51 %{?with_libplacebo:BuildRequires:       libplacebo-devel >= 0.18.0}
52 %{?with_samba:BuildRequires:    libsmbclient-devel}
53 BuildRequires:  libva-devel >= 1.4.0
54 BuildRequires:  libva-glx-devel >= 1.4.0
55 BuildRequires:  libvdpau-devel >= 0.2
56 BuildRequires:  lua51-devel
57 BuildRequires:  nv-codec-headers >= 8.2.15.7
58 BuildRequires:  pkgconfig
59 BuildRequires:  pulseaudio-devel >= 1.0
60 BuildRequires:  rpmbuild(macros) >= 1.719
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 >= 1.8.12
66 BuildRequires:  wayland-devel >= 1.15.0
67 BuildRequires:  wayland-egl-devel
68 BuildRequires:  wayland-protocols >= 1.14
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-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.1
87 Requires:       libbluray >= 0.3.0
88 %{?with_caca:Requires:  libcaca >= 0.99-0.beta18.1}
89 Requires:       libdrm >= 2.4.74
90 %if %{with dvdnav}
91 Requires:       libdvdnav >= 4.2.0
92 Requires:       libdvdread >= 4.1.0
93 %endif
94 %{?with_libplacebo:Requires:    libplacebo >= 0.18.0}
95 Requires:       libva >= 1.4.0
96 Requires:       libva-glx >= 1.4.0
97 Requires:       libvdpau >= 0.2
98 Requires:       pulseaudio-libs >= 1.0
99 %{?with_rubberband:Requires:    rubberband-libs >= 1.8.0}
100 %{?with_shaderc:Requires:       shaderc >= 2019.0}
101 %{?with_vapoursynth:Requires:   vapoursynth >= 24}
102 Requires:       wayland >= 1.15.0
103 Requires:       xorg-lib-libX11 >= 1.0.0
104 Requires:       xorg-lib-libXScrnSaver >= 1.0.0
105 Requires:       xorg-lib-libXext >= 1.0.0
106 Requires:       xorg-lib-libXinerama >= 1.0.0
107 Requires:       xorg-lib-libXrandr >= 1.2.0
108 Requires:       xorg-lib-libxkbcommon >= 0.3.0
109 %{?with_zimg:Requires:  zimg >= 2.9}
110 Suggests:       youtube-dl >= 2:20150223
111 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
112
113 %define         _noautoreqdep   libGL.so.1 libGLU.so.1
114
115 %description
116 Movie player based on MPlayer and mplayer2.
117
118 %description -l pl.UTF-8
119 Odtwarzacz filmów oparty na projektach MPlayer i mplayer2.
120
121 %package client-libs
122 Summary:        Client library for controlling mpv
123 Summary(pl.UTF-8):      Biblioteka kliencka do sterowania odtwarzaczem mpv
124 Group:          Libraries
125
126 %description client-libs
127 Client library for controlling mpv.
128
129 %description client-libs -l pl.UTF-8
130 Biblioteka kliencka do sterowania odtwarzaczem mpv.
131
132 %package client-devel
133 Summary:        Development files for mpv client library
134 Summary(pl.UTF-8):      Pliki programistyczne biblioteki klienckiej mpv
135 Group:          Development/Libraries
136 Requires:       %{name}-client-libs = %{version}-%{release}
137
138 %description client-devel
139 Development files for mpv client library.
140
141 %description client-devel -l pl.UTF-8
142 Pliki programistyczne biblioteki klienckiej mpv.
143
144 %package -n bash-completion-mpv
145 Summary:        Bash completion for mpv
146 Summary(pl.UTF-8):      Dopełnianie parametrów mpv dla powłoki Bash
147 Group:          Applications/Shells
148 Requires:       %{name} = %{version}-%{release}
149 Requires:       bash-completion >= 2.0
150
151 %description -n bash-completion-mpv
152 Bash completion for mpv.
153
154 %description -n bash-completion-mpv -l pl.UTF-8
155 Dopełnianie parametrów mpv dla powłoki Bash.
156
157 %package -n zsh-completion-mpv
158 Summary:        ZSH completion for mpv
159 Summary(pl.UTF-8):      Dopełnianie parametrów mpv dla powłoki ZSH
160 Group:          Applications/Shells
161 Requires:       %{name} = %{version}-%{release}
162
163 %description -n zsh-completion-mpv
164 ZSH completion for mpv.
165
166 %description -n zsh-completion-mpv -l pl.UTF-8
167 Dopełnianie parametrów mpv dla powłoki ZSH.
168
169 %prep
170 %setup -q
171 %patch0 -p1
172 %patch1 -p1
173 %patch2 -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-jpeg \
196                 --enable-lcms2 \
197                 --enable-libass \
198                 --enable-libass-osd \
199                 --enable-libavdevice \
200                 --enable-libbluray \
201                 --enable-libmpv-shared \
202                 %{__enable_disable libplacebo} \
203                 %{__enable_disable rubberband} \
204                 %{__enable_disable samba libsmbclient} \
205                 --enable-openal \
206                 --enable-oss-audio \
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=51pld \
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
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
265 %files -n bash-completion-mpv
266 %defattr(644,root,root,755)
267 %{bash_compdir}/mpv
268
269 %files -n zsh-completion-mpv
270 %defattr(644,root,root,755)
271 %{zsh_compdir}/_mpv
This page took 0.04488 seconds and 3 git commands to generate.