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:        1.0.0.1
%define sillyver 1.0.0-1
%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:         https://github.com/CuarzoSoftware/Louvre/archive/refs/tags/v%sillyver.tar.gz
Patch1:         0001-build-switch-to-pkg-config-based-dependency-lookup.patch
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)

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

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

%description -n %lname
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

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

%build
pushd src/
%meson
%meson_build
popd

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

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files
%_bindir/louvre-*

# .so files in /usr/etc? what the fuck is wrong with people
/usr/etc/*

%files -n %lname
%_libdir/libLouvre.so

%files devel
%_includedir/Louvre/

%changelog
openSUSE Build Service is sponsored by