]> git.pld-linux.org Git - packages/mpv.git/blob - mpv.spec
b9560e2c9df300e0ebae383b0e9a0f2d8599d260
[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.33.0
16 Release:        3
17 License:        GPL v2+
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:  b08d25d3a44c3362984636e5dfa78ecc
22 Source1:        %{name}.conf
23 Patch0:         %{name}-shaderc.patch
24 Patch1:         libplacebo.patch
25 URL:            http://mpv.io/
26 BuildRequires:  EGL-devel
27 BuildRequires:  Mesa-libgbm-devel
28 BuildRequires:  OpenAL-devel >= 1.13
29 BuildRequires:  OpenGL-devel
30 BuildRequires:  SDL2-devel
31 BuildRequires:  alsa-lib-devel >= 1.0.18
32 BuildRequires:  docutils
33 BuildRequires:  ffmpeg-devel >= 4.0
34 BuildRequires:  jack-audio-connection-kit-devel
35 BuildRequires:  lcms2-devel >= 2.6
36 BuildRequires:  libarchive-devel >= 3.4.0
37 BuildRequires:  libass-devel >= 0.12.2
38 %ifarch i386 i486
39 BuildRequires:  libatomic-devel
40 %endif
41 BuildRequires:  libbluray-devel >= 0.3.0
42 %{?with_caca:BuildRequires:     libcaca-devel >= 0.99-0.beta18.1}
43 BuildRequires:  libcdio-paranoia-devel
44 BuildRequires:  libdrm-devel >= 2.4.74
45 %if %{with dvdnav}
46 BuildRequires:  libdvdnav-devel >= 4.2.0
47 BuildRequires:  libdvdread-devel >= 4.1.0
48 %endif
49 BuildRequires:  libjpeg-devel
50 %{?with_libplacebo:BuildRequires:       libplacebo-devel >= 1.18.0}
51 BuildRequires:  libva-devel >= 1.4.0
52 BuildRequires:  libva-glx-devel >= 1.4.0
53 BuildRequires:  libvdpau-devel >= 0.2
54 BuildRequires:  lua52-devel
55 %{?with_js:BuildRequires:       mujs-devel >= 1.0.0}
56 BuildRequires:  nv-codec-headers >= 8.2.15.7
57 BuildRequires:  pkgconfig
58 BuildRequires:  pulseaudio-devel >= 1.0
59 BuildRequires:  rpmbuild(macros) >= 1.719
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.14
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-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.74
89 %if %{with dvdnav}
90 Requires:       libdvdnav >= 4.2.0
91 Requires:       libdvdread >= 4.1.0
92 %endif
93 %{?with_libplacebo:Requires:    libplacebo >= 1.18.0}
94 Requires:       libva >= 1.4.0
95 Requires:       libva-glx >= 1.4.0
96 Requires:       libvdpau >= 0.2
97 %{?with_js:Requires:    mujs >= 1.0.0}
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
174 %build
175 %waf configure \
176                 --prefix=%{_prefix} \
177                 --bindir=%{_bindir} \
178                 --confdir=%{_sysconfdir}/mpv \
179                 --libdir=%{_libdir} \
180                 --datadir=%{_datadir} \
181                 --mandir=%{_mandir} \
182                 --disable-debug-build \
183                 --enable-alsa \
184                 %{__enable_disable caca} \
185                 --enable-cdda \
186                 --enable-cplugins \
187                 --enable-dvb \
188                 --enable-dvbin \
189                 %{__enable_disable dvdnav} \
190                 --enable-gl-wayland \
191                 --enable-gl-x11 \
192                 --enable-iconv \
193                 --enable-jack \
194                 %{__enable_disable js javascript} \
195                 --enable-jpeg \
196                 --enable-lcms2 \
197                 --enable-libavdevice \
198                 --enable-libbluray \
199                 --enable-libmpv-shared \
200                 %{__enable_disable libplacebo} \
201                 %{__enable_disable rubberband} \
202                 --enable-openal \
203                 --enable-pulse \
204                 --enable-sdl2 \
205                 %{__enable_disable shaderc} \
206                 --enable-uchardet \
207                 --enable-vaapi \
208                 %{__enable_disable vapoursynth} \
209                 --enable-vdpau \
210                 --enable-vdpau-gl-x11 \
211                 --enable-wayland \
212                 --enable-x11 \
213                 --enable-xv \
214                 %{__enable_disable zimg} \
215                 --lua=52deb \
216                 --bashdir=%{bash_compdir} \
217                 --zshdir=%{zsh_compdir}
218
219 %waf build -v
220
221 %install
222 rm -rf $RPM_BUILD_ROOT
223
224 %waf install --destdir=$RPM_BUILD_ROOT
225
226 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mpv
227 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/mpv
228
229 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}
230
231 %clean
232 rm -rf $RPM_BUILD_ROOT
233
234 %post   client-libs -p /sbin/ldconfig
235 %postun client-libs -p /sbin/ldconfig
236
237 %files
238 %defattr(644,root,root,755)
239 %doc README.md RELEASE_NOTES etc/input.conf etc/mplayer-input.conf etc/mpv.conf etc/restore-old-bindings.conf
240 %dir %{_sysconfdir}/mpv
241 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/encoding-profiles.conf
242 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mpv/mpv.conf
243 %attr(755,root,root) %{_bindir}/%{name}
244 %{_desktopdir}/mpv.desktop
245 %{_iconsdir}/hicolor/*/apps/mpv.png
246 %{_iconsdir}/hicolor/scalable/apps/mpv.svg
247 %{_iconsdir}/hicolor/symbolic/apps/mpv-symbolic.svg
248 %{_mandir}/man1/mpv.1*
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.1
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.076299 seconds and 2 git commands to generate.