File gtk4-layer-shell.spec of Package gtk4-layer-shell

#
# spec file for package gtk4-layer-shell
#
# Copyright (c) 2025 mantarimay
#
# 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/
#


%global apiver  0
%define libname lib%{name}%{apiver}
Name:           gtk4-layer-shell
Version:        1.1.1
Release:        0
Summary:        Library to create components for Wayland and GTK4 using the Layer Shell
License:        MIT
URL:            https://github.com/wmww/gtk4-layer-shell
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  meson >= 0.54.0
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk4)
BuildRequires:  pkgconfig(vapigen)
BuildRequires:  pkgconfig(wayland-client) >= 1.10.0
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  pkgconfig(wayland-scanner) >= 1.10.0

%description
A library to write GTK applications that use Layer Shell. Layer Shell is a
Wayland protocol for desktop shell components, such as panels, notifications
and wallpapers. You can use it to anchor your windows to a corner or edge of
the output, or stretch them across the entire output.

%package -n	    %{libname}
Summary:        Library to create components for Wayland and GTK4 using the Layer Shell
License:        MIT
Requires:       typelib-1_0-Gtk4LayerShell-1_0

%description -n %{libname}
A library to write GTK applications that use Layer Shell. Layer Shell is a
Wayland protocol for desktop shell components, such as panels, notifications
and wallpapers. You can use it to anchor your windows to a corner or edge of
the output, or stretch them across the entire output.

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

%description    devel
Development files and headers for %{name}.

%package -n     typelib-1_0-Gtk4LayerShell-1_0
Summary:        Library to create desktop components for Wayland
Group:          System/Libraries

%description -n typelib-1_0-Gtk4LayerShell-1_0
This library is a companion library to GObject and Gtk+.
It provides various features that are wished in the underlying
library but are not for various reasons. In most cases, they are
wildly out of scope for those libraries. In other cases, the design
isn't quite generic enough to work for everyone.

This package provides the GObject Introspection bindings for %{name}.

%package -n     typelib-1_0-Gtk4SessionLock-1_0
Summary:        Library to create desktop components for Wayland
Group:          System/Libraries

%description -n typelib-1_0-Gtk4SessionLock-1_0
This library is a companion library to GObject and Gtk+.
It provides various features that are wished in the underlying
library but are not for various reasons. In most cases, they are
wildly out of scope for those libraries. In other cases, the design
isn't quite generic enough to work for everyone.

This package provides the GObject Introspection bindings for %{name}.

%prep
%autosetup -p1

%build
%meson
%meson_build

%install
%meson_install

%ldconfig_scriptlets -n %{libname}

%files -n %{libname}
%license LICENSE*
%doc README.md CHANGELOG.md
%{_libdir}/lib%{name}.so.%{apiver}
%{_libdir}/lib%{name}.so.%{version}

%files devel
%{_libdir}/lib%{name}.so
%{_libdir}/liblayer-shell-preload.so
%{_libdir}/pkgconfig/%{name}-0.pc
%{_datadir}/gir-1.0
%{_datadir}/vala
%{_includedir}/%{name}

%files -n typelib-1_0-Gtk4LayerShell-1_0
%{_libdir}/girepository-1.0/Gtk4LayerShell-1.0.typelib

%files -n typelib-1_0-Gtk4SessionLock-1_0
%{_libdir}/girepository-1.0/Gtk4SessionLock-1.0.typelib

%changelog
openSUSE Build Service is sponsored by