File wayfire.spec of Package wayfire

#
# spec file for package wayfire
#
# 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 _lto_cflags %{nil}
%define libname libwf-utils0
Name:           wayfire
Version:        0.7.2
Release:        0
Summary:        3D wayland compositor
License:        MIT
URL:            https://wayfire.org/
Source0:        https://github.com/WayfireWM/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
Source1:        https://github.com/WayfireWM/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz.sha256sum
BuildRequires:  Mesa-libGLESv3-devel
BuildRequires:  gcc-c++
BuildRequires:  inotify-tools-devel
BuildRequires:  meson
BuildRequires:  fdupes
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(doctest)
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(glesv2)
BuildRequires:  pkgconfig(glm)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libevdev)
BuildRequires:  pkgconfig(libinput) >= 1.7.0
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libpng)
BuildRequires:  pkgconfig(pixman-1)
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-cursor)
BuildRequires:  pkgconfig(wayland-protocols) >= 1.12
BuildRequires:  pkgconfig(wayland-server)
BuildRequires:  pkgconfig(wf-config) >= 0.7.0
BuildRequires:  pkgconfig(wlroots) >= 0.13.0
BuildRequires:  pkgconfig(xkbcommon)
Recommends:     wayfire-config-manager
Recommends:     wayfire-plugins-extra
Recommends:     wcm
Recommends:     wf-shell

%description
Wayfire is a wayland compositor based on wlroots. It aims to create a customizable, extendable and lightweight environment without sacrificing its appearance. If you want to gain a better impression at what it can do, see the demo videos on youtube: https://www.youtube.com/playlist?list=PLb7YRKEhWEBUIoT-a29UoJW9mhfzjpNle

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

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

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

%description    devel
Development files for %{name}.

%prep
echo "`grep %{name}-%{version}.tar.xz %{SOURCE1} | grep -Eo '^[0-9a-f]+'`  %{SOURCE0}" | sha256sum -c
%autosetup

%build
%meson \
 -Duse_system_wlroots=enabled \
 -Duse_system_wfconfig=enabled \
 -Dxwayland=enabled
%meson_build

%install
%meson_install
install -Dpm0644 wayfire.desktop %{buildroot}%{_datadir}/wayland-sessions/%{name}.desktop
find %{buildroot} -type f -name "*.a" -delete -print0

%fdupes %{buildroot}/%{_prefix}

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

%files
%license LICENSE
%doc README.md wayfire.ini
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/wayland-sessions/
%{_datadir}/wayland-sessions/*.desktop

%files -n %{libname}
%{_libdir}/*.so.*
%{_libdir}/%{name}/


%files devel
%{_libdir}/libwf-utils.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/%{name}

%changelog
openSUSE Build Service is sponsored by