File lxqt-globalkeys.spec of Package lxqt-globalkeys
#
# spec file for package lxqt-globalkeys
#
# 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 sover 2
Name: lxqt-globalkeys
Version: @SERVICE@
Release: 0
Summary: Daemon used to register global keyboard shortcuts
License: LGPL-2.1-or-later
Group: System/GUI/LXQt
URL: https://github.com/lxqt/lxqt-globalkeys
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.18.0
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: cmake(KF6WindowSystem)
BuildRequires: cmake(Qt6DBus)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(lxqt2-build-tools)
BuildRequires: pkgconfig(lxqt) >= 2.0.0
Requires: %{name}-branding = %{version}-%{release}
%description
Tools to set global keyboard shortcuts in LXQt sessions, that is shortcuts
which apply to the LXQt session as a whole and are not limited to distinct
applications.
%lang_package
%package devel
Summary: Development files for lxqt-globalkeys
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: lib%{name}%{sover} = %{version}
Requires: lib%{name}-ui%{sover} = %{version}
Requires: pkgconfig
%description devel
Development files for lxqt-globalkeys including headers and libraries
%package -n lib%{name}%{sover}
Summary: Lxqt-globalkeys libraries
Group: System/Libraries
%description -n lib%{name}%{sover}
lxqt-globalkeys main system library
%package -n lib%{name}-ui%{sover}
Summary: UI lxqt-globalkeys libraries
Group: System/Libraries
Recommends: %{name}-lang = %{version}-%{release}
%description -n lib%{name}-ui%{sover}
UI system libraries for lxqt-globalkeys
%package branding-upstream
Summary: Upstream branding of %{name}
Group: System/GUI/LXQt
Requires: %{name} = %{version}
Supplements: (%{name} and branding-upstream)
Conflicts: %{name}-branding
Provides: %{name}-branding = %{version}
BuildArch: noarch
%description branding-upstream
This package provides the upstream look and feel for %{name}.
%prep
%autosetup
sed -i '/^Categories/s/\(LXQt\;\)/X-\1/' config/lxqt-config-globalkeyshortcuts.desktop.in
%build
%cmake_qt6
%{qt6_build}
%install
%{qt6_install}
%fdupes -s %{buildroot}
install -Dm 0644 %{buildroot}%{_datadir}/lxqt/globalkeyshortcuts.conf -t %{buildroot}%{_sysconfdir}/xdg/lxqt/
%find_lang %{name} --with-qt --all-name
%ldconfig_scriptlets -n lib%{name}%{sover}
%ldconfig_scriptlets -n lib%{name}-ui%{sover}
%files
%license LICENSE
%doc AUTHORS CHANGELOG README.md
%config %{_sysconfdir}/xdg/autostart/lxqt-globalkeyshortcuts.desktop
%{_bindir}/%{name}d
%{_bindir}/lxqt-config-globalkeyshortcuts
%{_datadir}/applications/lxqt-config-globalkeyshortcuts.desktop
%dir %{_datadir}/lxqt
%{_datadir}/lxqt/globalkeyshortcuts.conf
%files devel
%{_includedir}/%{name}
%{_includedir}/%{name}-ui
%{_libdir}/pkgconfig/*.pc
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}-ui.so
%dir %{_datadir}/cmake/%{name}
%dir %{_datadir}/cmake/%{name}-ui
%{_datadir}/cmake/%{name}/*
%{_datadir}/cmake/%{name}-ui/*
%files -n lib%{name}%{sover}
%{_libdir}/lib%{name}.so.*
%files -n lib%{name}-ui%{sover}
%{_libdir}/lib%{name}-ui.so.*
%files branding-upstream
%dir %{_sysconfdir}/xdg/lxqt/
%config %{_sysconfdir}/xdg/lxqt/globalkeyshortcuts.conf
%files lang -f %{name}.lang
%dir %{_datadir}/lxqt
%dir %{_datadir}/lxqt/translations
%dir %{_datadir}/lxqt/translations/lxqt-config-globalkeyshortcuts
%changelog