239 lines
7.8 KiB
RPMSpec
239 lines
7.8 KiB
RPMSpec
#
|
|
# spec file for package mpv
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
# Copyright (c) 2015 Packman Team <packman@links2linux.de>
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define _waf_ver 1.9.2
|
|
%define lname libmpv1
|
|
Name: mpv
|
|
Version: 0.20.0
|
|
Release: 0
|
|
Summary: Advanced general-purpose multimedia player
|
|
License: GPL-2.0+ and BSD-3-Clause
|
|
Group: Productivity/Multimedia/Video/Players
|
|
# waf is licensed with BSD-3-Clause
|
|
Url: http://mpv.io/
|
|
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
|
|
Source1: http://waf.io/waf-%{_waf_ver}
|
|
Source2: %{name}.changes
|
|
BuildRequires: hicolor-icon-theme
|
|
Requires: hicolor-icon-theme
|
|
Requires(post): hicolor-icon-theme
|
|
Requires(post): update-desktop-files
|
|
Requires(postun): hicolor-icon-theme
|
|
Requires(postun): update-desktop-files
|
|
BuildRequires: ladspa-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libmng-devel
|
|
BuildRequires: linux-kernel-headers
|
|
BuildRequires: lirc-devel
|
|
BuildRequires: ncurses-devel
|
|
BuildRequires: perl
|
|
BuildRequires: pkg-config
|
|
BuildRequires: python-docutils
|
|
BuildRequires: python3
|
|
BuildRequires: update-desktop-files
|
|
BuildRequires: yasm
|
|
BuildRequires: pkgconfig(alsa)
|
|
BuildRequires: pkgconfig(caca)
|
|
BuildRequires: pkgconfig(dri)
|
|
BuildRequires: pkgconfig(dvdnav) >= 4.2.0
|
|
BuildRequires: pkgconfig(dvdread) >= 4.1.0
|
|
BuildRequires: pkgconfig(enca)
|
|
BuildRequires: pkgconfig(gl)
|
|
BuildRequires: pkgconfig(jack)
|
|
BuildRequires: pkgconfig(lcms2) >= 2.6
|
|
BuildRequires: pkgconfig(libass) >= 0.12.1
|
|
BuildRequires: pkgconfig(libavcodec)
|
|
BuildRequires: pkgconfig(libavdevice) >= 55.0.0
|
|
BuildRequires: pkgconfig(libavfilter) >= 5.0.0
|
|
BuildRequires: pkgconfig(libavformat)
|
|
BuildRequires: pkgconfig(libavutil)
|
|
BuildRequires: pkgconfig(libbluray) >= 0.3.0
|
|
BuildRequires: pkgconfig(libbs2b)
|
|
BuildRequires: pkgconfig(libcdio)
|
|
BuildRequires: pkgconfig(libcdio_cdda)
|
|
BuildRequires: pkgconfig(libcdio_paranoia)
|
|
BuildRequires: pkgconfig(libiso9660)
|
|
BuildRequires: pkgconfig(libpulse) >= 1.0
|
|
BuildRequires: pkgconfig(libswresample) >= 1.1.100
|
|
BuildRequires: pkgconfig(libswscale)
|
|
BuildRequires: pkgconfig(libudf)
|
|
BuildRequires: pkgconfig(libv4l2)
|
|
BuildRequires: pkgconfig(libva)
|
|
BuildRequires: pkgconfig(libva-x11)
|
|
BuildRequires: pkgconfig(lua)
|
|
BuildRequires: pkgconfig(openal) >= 1.13
|
|
BuildRequires: pkgconfig(portaudio-2.0)
|
|
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)
|
|
# we need to rebuild with every new minor version of ffmpeg
|
|
# update soname once it changes
|
|
Requires: %(rpm -qf $(readlink -f %{_libdir}/libavcodec.so) --qf "%%{name} = %%{version}")
|
|
Requires: %(rpm -qf $(readlink -f %{_libdir}/libavformat.so) --qf "%%{name} = %%{version}")
|
|
# Used via LUA scripts
|
|
Recommends: youtube-dl
|
|
# Obsoletion of mplayer2 that is dead for 2 years now
|
|
Provides: mplayer2 = 20140101
|
|
Obsoletes: mplayer2 < 20140101
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
# PDF manual.
|
|
# JIT for lua.
|
|
%if 0%{?suse_version} > 1320
|
|
BuildRequires: python-rst2pdf
|
|
%ifarch %ix86 x86_64
|
|
BuildRequires: pkgconfig(luajit)
|
|
%endif
|
|
%endif
|
|
%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
|
|
|
|
%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.
|
|
|
|
%package devel
|
|
Summary: A library to link together with mpv player
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{lname} = %{version}
|
|
|
|
%description devel
|
|
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.
|
|
|
|
%package -n %{lname}
|
|
Summary: A library to link together with mpv player
|
|
Group: System/Libraries
|
|
|
|
%description -n %{lname}
|
|
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
|
|
|
|
# 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
|
|
|
|
%build
|
|
# 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 \
|
|
%if 0%{?suse_version} > 1320
|
|
--enable-pdf-build \
|
|
%endif
|
|
${myopts}
|
|
|
|
./waf build --verbose %{?_smp_mflags}
|
|
|
|
%install
|
|
./waf --destdir=%{buildroot} install
|
|
|
|
install -D -m 0644 etc/input.conf %{buildroot}%{_sysconfdir}/%{name}/input.conf
|
|
install -D -m 0644 etc/mpv.conf %{buildroot}%{_sysconfdir}/%{name}/mpv.conf
|
|
|
|
%post
|
|
%desktop_database_post
|
|
%icon_theme_cache_post
|
|
|
|
%postun
|
|
%desktop_database_postun
|
|
%icon_theme_cache_postun
|
|
|
|
%post -n %{lname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{lname} -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%if 0%{?suse_version} > 1320
|
|
%doc build/DOCS/man/mpv.pdf
|
|
%endif
|
|
%doc Copyright LICENSE README.md RELEASE_NOTES
|
|
%dir %{_sysconfdir}/%{name}/
|
|
%config %{_sysconfdir}/%{name}/encoding-profiles.conf
|
|
%config %{_sysconfdir}/%{name}/input.conf
|
|
%config %{_sysconfdir}/%{name}/mpv.conf
|
|
%{_bindir}/%{name}
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_datadir}/icons/hicolor
|
|
#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
|
|
|
|
%changelog
|