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