File wrapland.spec of Package Wrapland

#
# Spec file for package wrapland
#
# Copyright © 2020 Markus S. <kamikazow@opensuse.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

Name:           wrapland
Version:        0.520.0
Release:        0
Summary:        C++ wrapper for the libwayland client and server API
License:        LGPL-2.1-or-later
Group:          Development/Libraries/KDE
URL:            https://gitlab.com/kwinft/wrapland/
Source:         %{name}-%{version}.tar.gz
BuildRequires:  binutils
BuildRequires:  cmake >= 3.5
BuildRequires:  extra-cmake-modules
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  kf5-filesystem
BuildRequires:  libQt5Gui-private-headers-devel
BuildRequires:  libqt5-qttools-qhelpgenerator
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(egl)
BuildRequires:  cmake(KF5Wayland) >= 5.70.0
BuildRequires:  cmake(PlasmaWaylandProtocols) >= 1.0
BuildRequires:  cmake(Qt5Concurrent)
BuildRequires:  cmake(Qt5Gui) >= 5.15.0
BuildRequires:  cmake(Qt5Test)
BuildRequires:  cmake(Qt5WaylandClient)
BuildRequires:  pkgconfig(egl)
BuildRequires:  wayland-devel
BuildRequires:  doxygen
BuildRequires:  pkgconfig(wayland-client) >= 1.15.0
BuildRequires:  pkgconfig(wayland-protocols) >= 1.18
BuildRequires:  pkgconfig(wayland-server) >= 1.15.0

%description
Wrapland is a Qt/C++ library that wraps and mediates the libwayland
client and server API for its consumers. Wrapland is an independent
part of the KWinFT project with the KWinFT window manager being
first and most prominent user.

%package devel
Summary:        wrapland: Build Environment
Group:          Development/Libraries/KDE
Requires:       %{name} = %{version}
Requires:       extra-cmake-modules
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core) >= 5.12.0
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5Widgets)

%description devel
Client and Server library wrapper for the Wayland libraries.

%prep
%autosetup -p1
%build

cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_LIBDIR=lib \
    -DKDE_INSTALL_LIBEXECDIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
    -DBUILD_TESTING=OFF \
    -DBUILD_QCH=ON

%cmake_build
%install
%cmake_install

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


%files
%license COPYING.LIB
%{_kf5_debugdir}/*.categories
%{_libdir}/libWraplandClient.so.*
%{_libdir}/libWraplandServer.so.*

%files devel
%{_libdir}/libWraplandClient.so
%{_libdir}/libWraplandServer.so
%{_libdir}/libexec/org-kde-kf5-wrapland-testserver
%{_libdir}/cmake/Wrapland/
%{_includedir}/

%changelog