File clapper.spec of Package clapper

#
# spec file for package clapper
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define typelib Clapper-0.0
%define libname libgstclapper-0_0-0
%define appname com.github.rafostar.Clapper
Name:           clapper
Version:        0.6.1
Release:        0
Summary:        A GNOME media player built using GJS with GTK4
License:        GPL-3.0-or-later
URL:            https://github.com/Rafostar/clapper
Source:         %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  Mesa-libGLESv3-devel
BuildRequires:  gcc-c++
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  desktop-file-utils
BuildRequires:  pkgconfig(gjs-1.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-pbutils-1.0)
BuildRequires:  pkgconfig(gtk4)
BuildRequires:  pkgconfig(vapigen)
BuildRequires:  pkgconfig(libsoup-3.0)
BuildRequires:  pkgconfig(microdns)
BuildRequires:  pkgconfig(libadwaita-1)
BuildRequires:  pkgconfig(gl)

%description
A GNOME media player built using GJS with GTK4 toolkit and powered by GStreamer with OpenGL rendering.

%package devel
Summary:        Development files for %{name}
Requires:       %{libname} = %{version}
Requires:       typelib-%{typelib} = %{version}

%description devel
%{summary}.

%package -n typelib-%{typelib}
Summary:        Clapper library typelib

%description -n typelib-%{typelib}
%{summary}.

%package -n %{libname}
Summary:        Library for %{name}

%description -n %{libname}
%{summary}.

%lang_package

%prep
%autosetup

%build
%meson
%meson_build

%install
%meson_install
strip -s %{buildroot}%{_libdir}/clapper-0.0/gst/plugin/importers/*
strip -s %{buildroot}%{_libdir}/gstreamer-1.0/libgstclapper.so
strip -s %{buildroot}%{_libdir}/libclapper-*
strip -s %{buildroot}%{_libdir}/libgstclapperglcontexthandler.so.*

%check
%meson_test

%find_lang %{name}-app
%find_lang %{name}-gtk

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files
%license COPYING-GPL COPYING-LGPL
%doc README.md
%{_bindir}/clapper
%{_datadir}/glib-2.0/schemas/%{appname}.gschema.xml
%{_datadir}/icons/hicolor/*/*/*.svg
%{_datadir}/metainfo/%{appname}.metainfo.xml
%{_datadir}/mime/packages/%{appname}.xml
%{_datadir}/applications/%{appname}.desktop
%{_datadir}/dbus-1/services/%{appname}.service
%{_datadir}/vala/vapi/clapper*

%files -n %{libname}
%{_libdir}/clapper-0.0
%{_libdir}/clapper-0.0/gst/plugin/importers/*.so
%{_libdir}/gstreamer-1.0/*.so
%{_libdir}/*.so.*

%files -n typelib-%{typelib}
%{_libdir}/girepository-1.0/
%{_libdir}/girepository-1.0/Clapper-0.0.typelib
%{_libdir}/girepository-1.0/ClapperGtk-0.0.typelib

%files devel
%{_libdir}/*.so
%dir %{_includedir}/clapper-0.0
%{_includedir}/clapper-0.0/clapper/
%{_includedir}/clapper-0.0/clapper-gtk/
%{_datadir}/gir-1.0/Clapper-0.0.gir
%{_datadir}/gir-1.0/ClapperGtk-0.0.gir
%{_libdir}/pkgconfig/clapper-0.0.pc
%{_libdir}/pkgconfig/clapper-gtk-0.0.pc

%files lang -f %{name}-app.lang

%files lang -f %{name}-gtk.lang

%changelog
openSUSE Build Service is sponsored by