SHA256
1
0
forked from pool/mpv

Accepting request 448553 from home:alois:branches:multimedia:apps

Embedded mpv-bash-completion to avoid headaches.

OBS-URL: https://build.opensuse.org/request/show/448553
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/mpv?expand=0&rev=72
This commit is contained in:
Tomáš Chvátal
2017-01-02 23:26:36 +00:00
committed by Git OBS Bridge
parent 3291735d6d
commit 7ea605fb66
3 changed files with 24 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package mpv
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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>
@@ -20,19 +20,22 @@
%define _waf_ver 1.9.5
%define _mbc_ver 3.3.7
%define lname libmpv1
Name: mpv
Version: 0.23.0
Release: 0
Summary: Advanced general-purpose multimedia player
# waf is licensed with BSD-3-Clause
License: GPL-2.0+ and BSD-3-Clause
License: GPL-2.0+ and BSD-3-Clause and GPL-3.0+
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
# mpv-bash-completion is licensed with GPL-3.0+
Source3: https://github.com/2ion/mpv-bash-completion/archive/%{_mbc_ver}.tar.gz#/mpv-bash-completion-%{_mbc_ver}.tar.gz
# PATCH-FIX-OPENSUSE do not require equal libav versions, obs rebuilds as needed
Patch0: mpv-make-ffmpeg-version-check-non-fatal.patch
BuildRequires: hicolor-icon-theme
@@ -94,7 +97,10 @@ BuildRequires: pkgconfig(xscrnsaver)
BuildRequires: pkgconfig(xv)
BuildRequires: pkgconfig(xxf86vm)
BuildRequires: pkgconfig(zlib)
Recommends: mpv-bash-completion
Requires: bash >= 4.0
Requires: bash-completion
Requires: lua
Recommends: xrandr
# Used via LUA scripts
Recommends: youtube-dl
# Obsoletion of mplayer2 that is dead for 2 years now
@@ -152,7 +158,7 @@ This package contains a library that can other apps use to utilize the mpv
features.
%prep
%setup -q
%setup -q -a 3
%patch0 -p1
# As we downloaded specific waf version we need to put and prepare it in place.
@@ -197,10 +203,12 @@ export CCFLAGS="%{optflags}"
install -D -m 0644 etc/input.conf %{buildroot}%{_sysconfdir}/%{name}/input.conf
install -D -m 0644 etc/mpv.conf %{buildroot}%{_sysconfdir}/%{name}/mpv.conf
install -D -m755 mpv-bash-completion-%{_mbc_ver}/gen.lua %{buildroot}%{_libexecdir}/mpv-bash-completion/gen.lua
%post
%desktop_database_post
%icon_theme_cache_post
/bin/bash -c '%{_libexecdir}/mpv-bash-completion/gen.lua >%{_sysconfdir}/bash_completion.d/mpv'
%postun
%desktop_database_postun
@@ -226,6 +234,8 @@ install -D -m 0644 etc/mpv.conf %{buildroot}%{_sysconfdir}/%{name}/mpv.conf
#zsh completion
%{_datadir}/zsh/site-functions/_mpv
%{_mandir}/man?/%{name}.?%{?ext_man}
%{_libexecdir}/mpv-bash-completion
%ghost %{_sysconfdir}/bash_completion.d/mpv
%files -n %{lname}
%defattr(-,root,root)