File retro-gtk.spec of Package retro-gtk

#
# spec file for package retro-gtk
#
# 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/
#


Name:           retro-gtk
Version:        0.12.1
Release:        0
Summary:        Toolkit to write Gtk+3-based frontends to libretro
License:        GPL-3.0
Group:          System/GUI/GNOME
Url:            https://git.gnome.org/browse/retro-gtk
Source:         http://download.gnome.org/sources/retro-gtk/0.12/%{name}-%{version}.tar.xz
BuildRequires:  gobject-introspection-devel >= 0.6.7
BuildRequires:  intltool
BuildRequires:  pkgconfig
BuildRequires:  vala
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gmodule-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libpulse-simple)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
retro-gtk wraps the libretro API for use in Gtk applications such as
GNOME Games.

%package -n libretro-gtk0
Summary:        Toolkit to write Gtk+3-based frontends to libretro
Group:          System/Libraries

%description -n libretro-gtk0
retro-gtk wraps the libretro API for use in Gtk applications such as
GNOME Games.
(libretro is an API specification implemented by some emulator
libraries like libretro-bsnes.)

%package -n typelib-1_0-Retro-0_12
Summary:        GObject introspection bindings for libretro-gtk
Group:          System/Libraries

%description -n typelib-1_0-Retro-0_12
retro-gtk wraps the libretro API for use in Gtk applications.
This subpackage contains the gobject bindings for the
libretro-gtk shared library.

%package devel
Summary:        Development files for retro-gtk, a Gtk+3 wrapper for libretro
Group:          Development/Languages/C and C++
Requires:       libretro-gtk0 = %{version}
Requires:       typelib-1_0-Retro-0_12 = %{version}

%description devel
retro-gtk wraps the libretro API for use in Gtk applications.
This subpackage contains the headers to make use of the libretro-gtk
library.

%prep
%setup -q

%build
%configure
make %{?_smp_mflags}

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
find %{buildroot} -type f -name "*.la" -delete -print
# make install copies AUTHORS, COPYING et.al to doc/%%{name}
# we capture them using the %%doc macro
rm -rf %{buildroot}%{_datadir}/doc/%{name}

%post   -n libretro-gtk0 -p /sbin/ldconfig
%postun -n libretro-gtk0 -p /sbin/ldconfig

%files -n libretro-gtk0
%defattr(-,root,root)
%doc ChangeLog COPYING
%{_libdir}/libretro-gtk.so.*

%files -n typelib-1_0-Retro-0_12
%defattr(-,root,root)
%{_libdir}/girepository-1.0/Retro-0.12.typelib

%files devel
%defattr(-,root,root)
%{_bindir}/retro-demo
%{_datadir}/gir-1.0/Retro-0.12.gir
%{_datadir}/vala/vapi/retro-gtk-0.12.deps
%{_datadir}/vala/vapi/retro-gtk-0.12.vapi
%{_libdir}/pkgconfig/retro-gtk-0.12.pc
%{_libdir}/libretro-gtk.so
%{_includedir}/retro-gtk-0.12/

%changelog