File lxqt-globalkeys.spec of Package lxqt-globalkeys

#
# spec file for package lxqt-globalkeys
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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/
#


Name:           lxqt-globalkeys
Version:        0.14.1
Release:        0
Summary:        Global keyboard shortcuts registration
License:        LGPL-2.1-or-later
Group:          System/GUI/LXQt
URL:            https://lxqt.org
Source:         https://downloads.lxqt.org/downloads/%{name}/%{version}/%{name}-%{version}.tar.xz
Source1:        https://downloads.lxqt.org/downloads/%{name}/%{version}/%{name}-%{version}.tar.xz.asc
Source2:        %{name}.keyring
BuildRequires:  cmake >= 3.1.0
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  lxqt-build-tools
BuildRequires:  pkgconfig
BuildRequires:  cmake(KF5WindowSystem) >= 5.36.0
BuildRequires:  pkgconfig(Qt5UiTools) >= 5.7.1
BuildRequires:  pkgconfig(lxqt) >= 0.14.1
Requires(post): desktop-file-utils
Requires(pre):  desktop-file-utils
Obsoletes:      %{name}-qt5 < %{version}
Provides:       %{name}-qt5 = %{version}

%description
Daemon and library for global keyboard shortcuts registration

%lang_package

%package devel
Summary:        Development files for lxqt-globalkeys
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       lib%{name}-ui0 = %{version}
Requires:       lib%{name}0 = %{version}
Requires:       pkgconfig

%description devel
Development files for lxqt-globalkeys including headers and libraries

%package -n lib%{name}0
Summary:        Lxqt-globalkeys libraries
Group:          System/Libraries

%description -n lib%{name}0
lxqt-globalkeys main system library

%package -n lib%{name}-ui0
Summary:        UI lxqt-globalkeys libraries
Group:          System/Libraries
Recommends:     %{name}-lang = %{version}-%{release}

%description -n lib%{name}-ui0
UI system libraries for lxqt-globalkeys

%prep
%setup -q

%build
%cmake
make %{?_smp_mflags}

%install
%cmake_install
%fdupes -s %{buildroot}

%find_lang %{name} --with-qt --all-name

%if 0%{?suse_version} < 1500
%post
%desktop_database_post

%postun
%desktop_database_postun
%endif

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

%files
%license LICENSE
%doc AUTHORS
%dir %{_sysconfdir}/xdg/
%dir %{_sysconfdir}/xdg/autostart/
%dir %{_sysconfdir}/xdg/lxqt/
%{_bindir}/%{name}d
%{_bindir}/lxqt-config-globalkeyshortcuts
%{_datadir}/applications/lxqt-config-globalkeyshortcuts.desktop
%{_sysconfdir}/xdg/autostart/lxqt-globalkeyshortcuts.desktop
%config %{_sysconfdir}/xdg/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}0
%{_libdir}/lib%{name}.so.*

%files -n lib%{name}-ui0
%{_libdir}/lib%{name}-ui.so.*

%files lang -f %{name}.lang
%dir %{_datadir}/lxqt
%dir %{_datadir}/lxqt/translations
%dir %{_datadir}/lxqt/translations/lxqt-config-globalkeyshortcuts

%changelog
openSUSE Build Service is sponsored by