2015-04-07 14:44:00 +02:00
|
|
|
#
|
|
|
|
# spec file for package mpv
|
|
|
|
#
|
2016-01-10 09:11:14 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-05-15 11:20:00 +02:00
|
|
|
# Copyright (c) 2015 Packman Team <packman@links2linux.de>
|
2015-04-07 14:44:00 +02:00
|
|
|
# Copyright (c) 2012 Jiri Slaby <jslaby@suse.de>
|
|
|
|
# Copyright (c) 2011-2012 Pascal Bleser <pascal.bleser@opensuse.org>
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2016-10-20 08:47:22 +02:00
|
|
|
%define _waf_ver 1.9.5
|
2015-05-15 11:20:00 +02:00
|
|
|
%define lname libmpv1
|
2015-04-07 14:44:00 +02:00
|
|
|
Name: mpv
|
2016-12-25 18:31:52 +01:00
|
|
|
Version: 0.23.0
|
2015-04-07 14:44:00 +02:00
|
|
|
Release: 0
|
2015-05-15 11:20:00 +02:00
|
|
|
Summary: Advanced general-purpose multimedia player
|
2016-12-27 16:59:45 +01:00
|
|
|
# waf is licensed with BSD-3-Clause
|
2016-06-27 10:26:37 +02:00
|
|
|
License: GPL-2.0+ and BSD-3-Clause
|
2015-04-07 14:44:00 +02:00
|
|
|
Group: Productivity/Multimedia/Video/Players
|
|
|
|
Url: http://mpv.io/
|
2015-05-15 11:20:00 +02:00
|
|
|
Source: http://github.com/mpv-player/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
# Can't use system one as it breaks quite often with updates
|
2016-07-13 15:21:52 +02:00
|
|
|
Source1: http://waf.io/waf-%{_waf_ver}
|
2015-05-15 11:20:00 +02:00
|
|
|
Source2: %{name}.changes
|
2016-11-04 09:53:03 +01:00
|
|
|
# PATCH-FIX-OPENSUSE do not require equal libav versions, obs rebuilds as needed
|
|
|
|
Patch0: mpv-make-ffmpeg-version-check-non-fatal.patch
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: hicolor-icon-theme
|
2016-04-12 09:31:34 +02:00
|
|
|
Requires: hicolor-icon-theme
|
|
|
|
Requires(post): hicolor-icon-theme
|
|
|
|
Requires(post): update-desktop-files
|
|
|
|
Requires(postun): hicolor-icon-theme
|
|
|
|
Requires(postun): update-desktop-files
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: ladspa-devel
|
|
|
|
BuildRequires: libjpeg-devel
|
|
|
|
BuildRequires: libmng-devel
|
|
|
|
BuildRequires: linux-kernel-headers
|
|
|
|
BuildRequires: lirc-devel
|
|
|
|
BuildRequires: ncurses-devel
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: perl
|
2015-05-06 15:12:26 +02:00
|
|
|
BuildRequires: pkg-config
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: python-docutils
|
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
BuildRequires: yasm
|
|
|
|
BuildRequires: pkgconfig(alsa)
|
|
|
|
BuildRequires: pkgconfig(caca)
|
|
|
|
BuildRequires: pkgconfig(dri)
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(dvdnav) >= 4.2.0
|
|
|
|
BuildRequires: pkgconfig(dvdread) >= 4.1.0
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: pkgconfig(enca)
|
2016-01-10 09:11:14 +01:00
|
|
|
BuildRequires: pkgconfig(gl)
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: pkgconfig(jack)
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(lcms2) >= 2.6
|
2016-12-27 16:59:45 +01:00
|
|
|
BuildRequires: pkgconfig(libarchive) >= 3.0.0
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(libass) >= 0.12.1
|
2016-12-27 16:59:45 +01:00
|
|
|
BuildRequires: pkgconfig(libavcodec) >= 57.25.0
|
|
|
|
BuildRequires: pkgconfig(libavdevice) >= 57.0.0
|
|
|
|
BuildRequires: pkgconfig(libavfilter) >= 6.7.0
|
|
|
|
BuildRequires: pkgconfig(libavformat) >= 57.07.0
|
|
|
|
BuildRequires: pkgconfig(libavutil) >= 55.20.0
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(libbluray) >= 0.3.0
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: pkgconfig(libbs2b)
|
|
|
|
BuildRequires: pkgconfig(libcdio)
|
|
|
|
BuildRequires: pkgconfig(libcdio_cdda)
|
|
|
|
BuildRequires: pkgconfig(libcdio_paranoia)
|
|
|
|
BuildRequires: pkgconfig(libiso9660)
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(libpulse) >= 1.0
|
2016-12-27 16:59:45 +01:00
|
|
|
BuildRequires: pkgconfig(libswresample) >= 2.3.100
|
|
|
|
BuildRequires: pkgconfig(libswscale) >= 4.0.0
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: pkgconfig(libudf)
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(libv4l2)
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: pkgconfig(libva)
|
|
|
|
BuildRequires: pkgconfig(libva-x11)
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(lua)
|
|
|
|
BuildRequires: pkgconfig(openal) >= 1.13
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: pkgconfig(portaudio-2.0)
|
2016-10-15 23:41:33 +02:00
|
|
|
BuildRequires: pkgconfig(python3)
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRequires: pkgconfig(smbclient)
|
|
|
|
BuildRequires: pkgconfig(vdpau)
|
|
|
|
BuildRequires: pkgconfig(xext)
|
|
|
|
BuildRequires: pkgconfig(xinerama)
|
|
|
|
BuildRequires: pkgconfig(xrandr)
|
|
|
|
BuildRequires: pkgconfig(xscrnsaver)
|
|
|
|
BuildRequires: pkgconfig(xv)
|
|
|
|
BuildRequires: pkgconfig(xxf86vm)
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2016-12-25 18:31:52 +01:00
|
|
|
Recommends: mpv-bash-completion
|
2015-04-07 14:44:00 +02:00
|
|
|
# Used via LUA scripts
|
|
|
|
Recommends: youtube-dl
|
2015-12-24 13:46:59 +01:00
|
|
|
# Obsoletion of mplayer2 that is dead for 2 years now
|
|
|
|
Provides: mplayer2 = 20140101
|
|
|
|
Obsoletes: mplayer2 < 20140101
|
2015-04-07 14:44:00 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-05-15 11:20:00 +02:00
|
|
|
# PDF manual.
|
|
|
|
# JIT for lua.
|
2016-08-15 20:17:49 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: python-rst2pdf
|
2015-12-03 22:13:07 +01:00
|
|
|
%ifarch %ix86 x86_64
|
2015-05-15 11:20:00 +02:00
|
|
|
BuildRequires: pkgconfig(luajit)
|
|
|
|
%endif
|
2015-12-03 22:13:07 +01:00
|
|
|
%endif
|
2015-05-15 11:20:00 +02:00
|
|
|
%if 0%{?suse_version} != 1315
|
|
|
|
# Testing framework: disabled for now as it runs just 1 test
|
|
|
|
# BuildRequires: pkgconfig(cmocka) >= 0.4.1
|
|
|
|
# Wayland and libguess.
|
|
|
|
BuildRequires: pkgconfig(egl)
|
|
|
|
BuildRequires: pkgconfig(libguess)
|
|
|
|
%if 0%{?suse_version} > 1310
|
|
|
|
BuildRequires: pkgconfig(wayland-client) >= 1.6.0
|
|
|
|
BuildRequires: pkgconfig(wayland-cursor) >= 1.6.0
|
|
|
|
BuildRequires: pkgconfig(wayland-egl)
|
|
|
|
BuildRequires: pkgconfig(wayland-scanner)
|
|
|
|
BuildRequires: pkgconfig(wayland-server)
|
|
|
|
BuildRequires: pkgconfig(xkbcommon) >= 0.3.0
|
|
|
|
%endif
|
|
|
|
%endif
|
2015-04-07 14:44:00 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety
|
|
|
|
of video file formats, audio and video codecs, and subtitle types.
|
|
|
|
|
2015-05-15 11:20:00 +02:00
|
|
|
%package devel
|
2015-04-07 14:44:00 +02:00
|
|
|
Summary: A library to link together with mpv player
|
|
|
|
Group: Development/Libraries/C and C++
|
2015-05-15 11:20:00 +02:00
|
|
|
Requires: %{lname} = %{version}
|
2015-04-07 14:44:00 +02:00
|
|
|
|
2015-05-15 11:20:00 +02:00
|
|
|
%description devel
|
2015-04-07 14:44:00 +02:00
|
|
|
mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety
|
|
|
|
of video file formats, audio and video codecs, and subtitle types.
|
|
|
|
|
|
|
|
This package contains all the development files.
|
|
|
|
|
2015-05-15 11:20:00 +02:00
|
|
|
%package -n %{lname}
|
2015-04-07 14:44:00 +02:00
|
|
|
Summary: A library to link together with mpv player
|
2015-04-23 13:28:01 +02:00
|
|
|
Group: System/Libraries
|
2015-04-07 14:44:00 +02:00
|
|
|
|
2015-05-15 11:20:00 +02:00
|
|
|
%description -n %{lname}
|
2015-04-07 14:44:00 +02:00
|
|
|
mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety
|
|
|
|
of video file formats, audio and video codecs, and subtitle types.
|
|
|
|
|
|
|
|
This package contains a library that can other apps use to utilize the mpv
|
|
|
|
features.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2016-11-04 09:53:03 +01:00
|
|
|
%patch0 -p1
|
2015-04-07 14:44:00 +02:00
|
|
|
|
2015-05-15 11:20:00 +02:00
|
|
|
# As we downloaded specific waf version we need to put and prepare it in place.
|
|
|
|
cp -f %{SOURCE1} waf
|
|
|
|
chmod a+x waf
|
|
|
|
|
|
|
|
# I hate UNKNOWN so lets put decent info there.
|
|
|
|
MODIFIED="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE2}")"
|
|
|
|
DATE="$(date -d "$MODIFIED" "+%%b %%e %%Y")"
|
|
|
|
sed -i "s|UNKNOWN|$DATE|g;s|VERSION|\"%{version}\"|g" common/version.c
|
2015-04-07 14:44:00 +02:00
|
|
|
|
|
|
|
%build
|
2015-05-15 11:20:00 +02:00
|
|
|
# SDL: disable as it is pointless to have on Linux, it is Windows/OS X fallback.
|
|
|
|
myopts="--disable-sdl1 --disable-sdl2"
|
|
|
|
# We don't want to rebuild all the time.
|
|
|
|
myopts+=" --disable-build-date"
|
|
|
|
# Debug just adds -g and we do that over optflags anyway.
|
|
|
|
myopts+=" --disable-debug"
|
|
|
|
export CCFLAGS="%{optflags}"
|
|
|
|
./waf configure \
|
|
|
|
--prefix="%{_prefix}" \
|
|
|
|
--bindir="%{_bindir}" \
|
|
|
|
--mandir="%{_mandir}" \
|
|
|
|
--libdir="%{_libdir}" \
|
|
|
|
--docdir="%{_docdir}/%{name}" \
|
|
|
|
--confdir="%{_sysconfdir}/%{name}" \
|
|
|
|
--enable-openal \
|
|
|
|
--enable-cdda \
|
|
|
|
--enable-libmpv-shared \
|
|
|
|
--enable-zsh-comp \
|
|
|
|
--enable-manpage-build \
|
2016-10-15 23:41:33 +02:00
|
|
|
--enable-libarchive \
|
2016-08-15 20:17:49 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-05-15 11:20:00 +02:00
|
|
|
--enable-pdf-build \
|
|
|
|
%endif
|
|
|
|
${myopts}
|
|
|
|
|
|
|
|
./waf build --verbose %{?_smp_mflags}
|
2015-04-07 14:44:00 +02:00
|
|
|
|
|
|
|
%install
|
2015-05-15 11:20:00 +02:00
|
|
|
./waf --destdir=%{buildroot} install
|
2015-04-07 14:44:00 +02:00
|
|
|
|
2016-01-18 21:02:46 +01:00
|
|
|
install -D -m 0644 etc/input.conf %{buildroot}%{_sysconfdir}/%{name}/input.conf
|
|
|
|
install -D -m 0644 etc/mpv.conf %{buildroot}%{_sysconfdir}/%{name}/mpv.conf
|
2015-10-23 12:56:29 +02:00
|
|
|
|
2015-04-07 14:44:00 +02:00
|
|
|
%post
|
|
|
|
%desktop_database_post
|
2015-04-23 13:28:01 +02:00
|
|
|
%icon_theme_cache_post
|
2015-04-07 14:44:00 +02:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%desktop_database_postun
|
2015-04-23 13:28:01 +02:00
|
|
|
%icon_theme_cache_postun
|
2015-04-07 14:44:00 +02:00
|
|
|
|
2015-05-15 11:20:00 +02:00
|
|
|
%post -n %{lname} -p /sbin/ldconfig
|
2015-04-07 14:44:00 +02:00
|
|
|
|
2015-05-15 11:20:00 +02:00
|
|
|
%postun -n %{lname} -p /sbin/ldconfig
|
2015-04-07 14:44:00 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2016-08-15 20:17:49 +02:00
|
|
|
%if 0%{?suse_version} > 1320
|
2015-09-04 09:39:23 +02:00
|
|
|
%doc build/DOCS/man/mpv.pdf
|
2015-05-15 11:20:00 +02:00
|
|
|
%endif
|
2016-01-18 21:02:46 +01:00
|
|
|
%doc Copyright LICENSE README.md RELEASE_NOTES
|
2015-05-15 11:20:00 +02:00
|
|
|
%dir %{_sysconfdir}/%{name}/
|
2016-06-25 16:09:50 +02:00
|
|
|
%config %{_sysconfdir}/%{name}/encoding-profiles.conf
|
2016-01-18 21:02:46 +01:00
|
|
|
%config %{_sysconfdir}/%{name}/input.conf
|
|
|
|
%config %{_sysconfdir}/%{name}/mpv.conf
|
2015-04-07 14:44:00 +02:00
|
|
|
%{_bindir}/%{name}
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
2016-04-12 10:39:55 +02:00
|
|
|
%{_datadir}/icons/hicolor
|
2015-05-15 11:20:00 +02:00
|
|
|
#zsh completion
|
|
|
|
%{_datadir}/zsh/site-functions/_mpv
|
|
|
|
%{_mandir}/man?/%{name}.?%{?ext_man}
|
|
|
|
|
|
|
|
%files -n %{lname}
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/*.so.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
%{_libdir}/*.so
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
2015-04-07 14:44:00 +02:00
|
|
|
|
|
|
|
%changelog
|