File ukwm.spec of Package ukwm

#
# spec file for package ukwm
#
# Copyright (c) 2020 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 project ukui
%define sover   0

Name:           ukwm
Version:        1.2.0
Release:        0
Summary:        UKUI Window Manager
License:        GPL-2.0+
Group:          System/GUI/Other
URL:            https://github.com/ukui/ukwm
Source:         https://github.com/ukui/ukwm/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  pkgconfig(egl)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.19.8
BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.35.1
BuildRequires:  pkgconfig(pango) >= 1.2.0
BuildRequires:  pkgconfig(cairo) >= 1.10.0
BuildRequires:  pkgconfig(gsettings-desktop-schemas) >= 3.21.4
BuildRequires:  pkgconfig(json-glib-1.0)
BuildRequires:  pkgconfig(upower-glib) >= 0.99.0
BuildRequires:  pkgconfig(gnome-desktop-3.0)
BuildRequires:  pkgconfig(xcomposite) >= 0.2
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xdamage)
BuildRequires:  pkgconfig(xext)
BuildRequires:  pkgconfig(xfixes)
BuildRequires:  pkgconfig(xi) >= 1.6.0
BuildRequires:  pkgconfig(xkbfile)
BuildRequires:  pkgconfig(xkeyboard-config)
BuildRequires:  pkgconfig(xkbcommon) >= 0.4.3
BuildRequires:  pkgconfig(xkbcommon-x11)
BuildRequires:  pkgconfig(xrender)
BuildRequires:  pkgconfig(x11-xcb)
BuildRequires:  pkgconfig(xcb-randr)
BuildRequires:  pkgconfig(xcb-res)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gbm)
BuildRequires:  pkgconfig(libstartup-notification-1.0)
BuildRequires:  pkgconfig(libwacom)
BuildRequires:  pkgconfig(libglvnd)
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(libcanberra-gtk3)
BuildRequires:  pkgconfig(gsettings-desktop-schemas)
# BuildRequires:  pkgconfig(libpipewire-0.1)
BuildRequires:  pkgconfig(libcanberra)
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libsystemd)
BuildRequires:  pkgconfig(libinput) >= 1.4
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(clutter-1.0)
BuildRequires:  pkgconfig(libcanberra-gtk)
BuildRequires:  pkgconfig(wayland-protocols)
BuildRequires:  wayland-devel
BuildRequires:  mate-common
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
UKUI Window Manager

%package -n lib%{name}-1-%{sover}
Summary:        The Library of peony
Group:          System/Libraries

%description -n lib%{name}-1-%{sover}
Peony is intent to be the default FileManager application in UKUI Desktop

This package contains the library used by peony.

%package -n typelib-1_0-Ukwm-1
Summary:        Muffin Introspection bindings
Group:          System/Libraries

%description -n typelib-1_0-Ukwm-1
Peony is intent to be the default FileManager application in UKUI Desktop

This package provides the GObject Introspection bindings for ukui.

%package devel
Summary:        UKUI Window Manager -- Development Files
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}

%description devel
UKUI Window Manager

This package contains development files for ukwm.

%lang_package

%prep
%setup -q
sed -i "s/--warn-all --warn-error/--warn-all/g" src/Makefile.am

%build
autoreconf -fi
%configure --libexecdir=%{_prefix}/lib \
           --disable-static \
           --enable-compile-warnings=minimum \
           --disable-wayland-egl-platform \
           --disable-wayland-egl-server \
           --disable-kms-egl-platform \
           --disable-wayland \
           --disable-native-backend \
           --disable-clutter-doc
%make_build

%install
%make_install

find %{buildroot} -type f -name "*.la" -delete -print
%find_lang %{name}
%fdupes %{buildroot}

%post -n lib%{name}-1-%{sover} -p /sbin/ldconfig

%postun -n lib%{name}-1-%{sover} -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc ABOUT-NLS NEWS
%license COPYING
%{_bindir}/%{name}
%{_mandir}/man1/*
%{_datadir}/%{project}
%{_datadir}/gnome-control-center
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/GConf/gsettings/ukwm-schemas.convert
%{_datadir}/applications/%{name}.desktop
%{_prefix}/lib/ukwm-restart-helper
%{_libdir}/%{name}
%exclude %{_libdir}/%{name}/*.typelib
%exclude %{_libdir}/%{name}/*.gir

%files -n lib%{name}-1-%{sover}
%defattr(-,root,root,-)
%{_libdir}/lib%{name}-1.so.*

%files -n typelib-1_0-Ukwm-1
%defattr(-,root,root,-)
%{_libdir}/%{name}/*.typelib

%files devel
%defattr(-,root,root,-)
%{_libdir}/lib%{name}-1.so
%{_libdir}/%{name}/*.gir
%{_libdir}/pkgconfig/*.pc
%{_includedir}/%{name}

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by