File louvre.spec of Package louvre

#
# spec file for package louvre
#
# Copyright (c) 2023 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/
#


Name:           louvre
Version:        2.12.0.1
%define sillyver 2.12.0-1
%define numso 2
%define lname liblouvre
Release:        0
Summary:        C++ component library for Wayland compositor development
License:        GPL-3.0-only
Group:          Development/Libraries/C and C++
URL:            https://github.com/CuarzoSoftware/Louvre
Source:         %{url}/archive/refs/tags/Louvre-%sillyver.tar.gz
BuildRequires:  c++_compiler
BuildRequires:  cuarzo-srm-devel
BuildRequires:  freeimage-devel
BuildRequires:  meson
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(icu-uc)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libinput)
BuildRequires:  pkgconfig(libseat)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  pkgconfig(wayland-server)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xkbcommon)
Recommends:     weston

%description
Louvre is a C++ library designed for building Wayland compositors.

%package -n %lname%{numso}
Summary:        C++ component library for Wayland compositor development
Group:          System/Libraries

%description -n %lname%{numso}
Louvre is a C++ library designed for building Wayland compositors.

%package devel
Summary:        Headers for the Louvre compositor library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version

%description devel
Headers for the Louvre compositor library.

%prep
%autosetup -p1 -n Louvre-%sillyver

sed -i 's|/usr/local/share|/usr/share|' src/examples/meson.build

%build
pushd src/
%meson
%meson_build
popd

%install
ln -fs /bin/true scripts/ld.sh
pushd src/
%meson_install
popd

%post   -n %lname%{numso} -p /sbin/ldconfig
%postun -n %lname%{numso} -p /sbin/ldconfig

%files
%_bindir/louvre-*
%_datadir/Louvre
%{_datadir}/wayland-sessions

%files -n %lname%{numso}
%{_libdir}/libLouvre.so.%{numso}
%dir %{_libdir}/Louvre
%dir %{_libdir}/Louvre/backends
%{_libdir}/Louvre/backends

%files devel
%_includedir/Louvre/
%{_libdir}/libLouvre.so
%{_libdir}/pkgconfig/Louvre.pc

%changelog
openSUSE Build Service is sponsored by