10
0
forked from pool/lua-lua-mpris
Files
lua-lua-mpris/lua-lua-mpris.spec
Antonio Larrosa 195df0a6da Accepting request 518395 from home:alarrosa:branches:devel:languages:lua
- Add %defattr to set the right attributes to files and don't try to
  own any mpv directory on Tumbleweed

- Install LICENSE file

OBS-URL: https://build.opensuse.org/request/show/518395
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-lua-mpris?expand=0&rev=2
2017-08-23 13:50:26 +00:00

94 lines
2.7 KiB
RPMSpec

#
# spec file for package lua-lua-mpris
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 flavor @BUILD_FLAVOR@
%define mod_name lua-mpris
%define mpv_lua_flavor lua51
Version: 0.0+git20170820.2126067
Release: 0
Summary: MPRIS api for lua
License: MIT
Group: Development/Libraries/Other
Url: https://github.com/antlarr/lua-mpris/
Source: lua-mpris-%{version}.tar.xz
BuildRequires: pkgconfig(dbus-1)
BuildRequires: %{flavor}-lua-dbus
BuildRequires: %{flavor}-devel
Requires: %{flavor}
Requires: %{flavor}-lua-dbus
%if "%{flavor}" == "lua53"
Provides: lua-%{mod_name} = %{version}
Obsoletes: lua-%{mod_name} < %{version}
%endif
%if "%{flavor}" == ""
Name: lua-%{mod_name}
ExclusiveArch: do_not_build
%else
Name: %{flavor}-%{mod_name}
%endif
%description
MPRIS api for lua
%package -n mpv-plugin-mpris
Summary: MPV plugin to add MPRIS support
Group: Productivity/Multimedia/Video/Players
Requires: %{mpv_lua_flavor}-lua-mpris
Requires: mpv
Requires(post): mpv
Supplements: mpv
%description -n mpv-plugin-mpris
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 installs a lua plugin for mpv to add mpris support through a
dbus interface.
%prep
%setup -q -n lua-mpris-%{version}
%build
%install
mkdir -p %{buildroot}%{lua_noarchdir}/lua-mpris
cp -Ra applet.lua client.lua init.lua %{buildroot}%{lua_noarchdir}/lua-mpris/
mkdir -p %{buildroot}%{_datadir}/mpv-plugin-mpris
cp mpv.lua %{buildroot}%{_datadir}/mpv-plugin-mpris/
%post -n mpv-plugin-mpris
if [ "$1" = 1 ] ; then
mkdir -p %{_sysconfdir}/mpv/scripts/
ln -s %{_datadir}/mpv-plugin-mpris/mpv.lua %{_sysconfdir}/mpv/scripts/mpris.lua
fi
%files
%doc LICENSE
%{lua_noarchdir}/lua-mpris
%files -n mpv-plugin-mpris
%defattr(-,root,root)
%doc LICENSE
%{_datadir}/mpv-plugin-mpris
%ghost %config %{_sysconfdir}/mpv/scripts/mpris.lua
%if 0%{?suse_version} <= 1320
%ghost %dir %{_sysconfdir}/mpv/scripts
%endif
%changelog