File libdbusmenu-lxqt.spec of Package libdbusmenu-lxqt

#
# spec file for package libdbusmenu-lxqt
#
# Copyright (c) 2024 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 _name libdbusmenu-qt
Name:           libdbusmenu-lxqt
Version:        0~git20240315.dc47c1a
Release:        0
Summary:        Qt implementation of the DBusMenu protocol
License:        LGPL-2.0+ 
URL:            https://github.com/lxqt/%{_name} 
Source:         https://github.com/lxqt/%{_name}/releases/download/%{version}/%{_name}-%{version}.tar.zst
# PATCH-FIX-OPENSUSE 0001-Fix_date_time.patch sfalken@opensuse.org
# Remove timestamp from Docs, to clear rpmlint errors
Patch:          0001-Fix_date_time_error.patch
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  cmake(lxqt2-build-tools)
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  cmake(Qt6Test)

%description
This library provides a Qt implementation of the DBusMenu protocol.

The DBusMenu protocol makes it possible for applications to export and import
their menus over DBus.

Forked from [desktop-app/libdbusmenu-qt](https://github.com/desktop-app/libdbusmenu-qt)

%package -n %{name}0
Summary:    This library provides a Qt implemenation of the DBusMenu protocol

%description -n %{name}0
This library provides a Qt implementation of the DBusMenu protocol.

The DBusMenu protocol makes it possible for applications to export and import
their menus over DBus.

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

%description -n %{name}0-devel
Development files for %{name}

%package doc
Summary:    Documentation for %{name}
Requires:   %{name}0 = %{version}
BuildArch:  noarch

%description doc
The Documentation for %{name}

%prep
%autosetup -p1 -n %{_name}-%{version}

%build
%cmake_qt6
%{qt6_build}

%install
%{qt6_install}

# Install documentation into correct location
mkdir -p %{buildroot}%{_docdir}/%{name}
mv %{buildroot}%{_datadir}/doc/%{name}-doc/* %{buildroot}%{_docdir}/%{name}

%fdupes -s %{buildroot}%{_docdir}/%{name}

%ldconfig_scriptlets -n %{name}0

%files -n %{name}0
%license COPYING
%doc NEWS README
%{_qt6_libdir}/%{name}.so.*

%files -n %{name}0-devel
%{_includedir}/dbusmenu-lxqt
%{_qt6_cmakedir}/dbusmenu-lxqt
%{_qt6_pkgconfigdir}/*.pc
%{_qt6_libdir}/*.so

%files doc
%{_docdir}/%{name}


%changelog

openSUSE Build Service is sponsored by