File playerctl.spec of Package playerctl
#
# spec file for package playerctl
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 Dakota Williams <raineforest@raineforest.me>
#
# 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/
#
%global majorver 1
%global minorver 0
%global sover 0
%global libname lib%{name}-%{majorver}_%{minorver}-%{sover}
%global typelibname typelib-1_0-Playerctl-%{majorver}_%{minorver}
Name: playerctl
Version: 0.5.0
Release: 0
Summary: MPRIS command-line controller and library for media players
License: LGPL-3.0
Group: Productivity/Multimedia/Other
Url: https://github.com/acrisci/playerctl
Source0: https://github.com/acrisci/playerctl/archive/v%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM playerctl-0.5.0-fix-parallel-build.patch duxkt-pakt@mailmetrash.com -- Fix parallel build
Patch0: playerctl-0.5.0-fix-parallel-build.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(gobject-2.0) >= 2.38
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.38
BuildRequires: pkgconfig(gtk-doc)
%description
Playerctl is a command-line utility and library for controlling
media players that implement the MPRIS D-Bus Interface Specification.
Playerctl makes it easy to bind player actions, such as play and pause,
to media keys.
For more advanced users, Playerctl provides an introspectable library
available in your favorite scripting language that allows more detailed
control like the ability to subscribe to media player events or get metadata,
such as artist and title for the playing track.
%package -n %{libname}
Summary: A library for controlling media players over D-Bus
Group: System/Libraries
%description -n %{libname}
A library for controlling media players that implement the MPRIS D-Bus
Interface Specification.
%package -n %{typelibname}
Summary: GObject Introspection interface description for lib%{name}
Group: System/Libraries
%description -n %{typelibname}
This package provides the GObject Introspection bindings lib%{name},
enabling usage in programming languages that support it.
%package devel
Summary: Development files for lib%{name}
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description devel
This package provides libraries and headers for developing applications that
use lib%{name}.
%prep
%autosetup -p1
%build
gtkdocize
autoreconf --force --install --verbose
%configure \
--disable-static
make %{?_smp_mflags} V=1
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
# gir files are not supposed to be installed here
rm %{buildroot}%{_libdir}/girepository-1.0/*_gir
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files
%doc README.md
%{_bindir}/playerctl
%files -n %{libname}
%license COPYING
%{_libdir}/libplayerctl-%{majorver}.%{minorver}.so.%{sover}*
%files -n %{typelibname}
%{_libdir}/girepository-1.0/Playerctl-1.0.typelib
%files devel
%{_includedir}/playerctl/
%{_libdir}/libplayerctl-%{majorver}.%{minorver}.so
%{_libdir}/pkgconfig/playerctl-%{majorver}.%{minorver}.pc
%{_datadir}/gir-1.0/Playerctl-%{majorver}.%{minorver}.gir
%{_datadir}/gir-1.0/Playerctl_%{majorver}_%{minorver}_gir
%changelog