File kvantum.spec of Package kvantum

#
# spec file for package kvantum
#
# Copyright (c) 2023 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/
#


Name:           kvantum
Version:        @SERVICE@
Release:        0
Summary:        A Linux SVG-based theme engine for Qt and KDE
License:        GPL-3.0-only
Group:          System/GUI/KDE
URL:            https://github.com/tsujan/Kvantum
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  cmake(KF5WindowSystem)
BuildRequires:  cmake(Qt5LinguistTools)
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  kf5-filesystem
BuildRequires:  libQt5PlatformHeaders-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xext)

%description
Kvantum (by Pedram Pourang, a.k.a. Tsu Jan) is an SVG-based theme engine
for Qt, tuned to KDE and LXQt, with an emphasis on elegance, usability and
practicality.

%lang_package

%prep
%autosetup
sed -i 's/\(LXQt\)/X-\1/' %{name}manager/data/%{name}manager.desktop
sed -i '/Categories=/s/Utility\;//' %{name}manager/data/%{name}manager.desktop

%build
%cmake
%cmake_build

%install
%cmake_install
install -dm 0755 %{buildroot}%{_sysconfdir}/xdg/Kvantum
cat > %{buildroot}%{_sysconfdir}/xdg/Kvantum/kvantum.kvconfig <<-EOF
[General]
theme=KvRoughGlass
EOF

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

%files
%doc ChangeLog NEWS README.md
%{_bindir}/%{name}*
%dir %{_sysconfdir}/xdg
%dir %{_sysconfdir}/xdg/Kvantum
%config(noreplace) %{_sysconfdir}/xdg/Kvantum/kvantum.kvconfig
%dir %{_kf5_plugindir}/styles
%{_kf5_plugindir}/styles/lib%{name}.so
%{_datadir}/Kvantum
%{_datadir}/applications/%{name}manager.desktop
%dir %{_datadir}/color-schemes
%{_datadir}/color-schemes/Kv*
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%license COPYING

%files lang -f %{name}.lang
%dir %{_datadir}/kvantummanager
%dir %{_datadir}/kvantummanager/translations
%dir %{_datadir}/kvantumpreview
%dir %{_datadir}/kvantumpreview/translations
%changelog
openSUSE Build Service is sponsored by