File picom-conf.spec of Package picom-conf
#
# spec file for package picom-conf
#
# 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/
#
%define _name picom_conf
Name: picom-conf
Version: @SERVICE@
Release: 0
Summary: GUI configuration tool for Picom X composite manager
License: LGPL-2.1-or-later
Group: System/X11/Utilities
URL: https://github.com/qtilities/picom-conf
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: qtilitools
BuildRequires: update-desktop-files
BuildRequires: cmake(Qt6DBus)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: pkgconfig(libconfig)
BuildRequires: update-desktop-files
Requires: picom
Recommends: %{name}-lang
%description
picom-conf is a configuration tool for X composite manager picom.
%lang_package
%prep
%autosetup
#sed -i '/Desktop Entry/a\\Name=Picom (X Compositor)\nGenericName=X11 compositor\nComment=A X11 compositor' \
# resources/autostart/picom.desktop.in
%build
%cmake_qt6 \
-DPROJECT_QT_VERSION=6 \
-DPICOM_ENABLE_AUTOSTART=ON \
-DPROJECT_TRANSLATIONS_UPDATE=ON
%{qt6_build}
%install
%{qt6_install}
mv %{buildroot}%{_sysconfdir}/xdg/autostart/%{name}.desktop \
%{buildroot}%{_sysconfdir}/xdg/autostart/lxqt-%{name}.desktop
%suse_update_desktop_file -N "Picom (X Compositor)" -G "X11 compositor" -C "A X11 compositor" %{buildroot}%{_sysconfdir}/xdg/autostart/lxqt-%{name}.desktop
%suse_update_desktop_file -N "Picom Configuration" -G "X Compositor Configuration" -C "Configuration editor for Picom" %{_name}
%find_lang %{name} --with-qt
%files
%doc AUTHORS README.md
%{_sysconfdir}/xdg/autostart/lxqt-%{name}.desktop
%{_bindir}/%{name}
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/metainfo/%{_name}.appdata.xml
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/picom.conf.example
%exclude %{_datadir}/%{name}/translations
%license COPYING
%files lang -f %{name}.lang
%dir %{_datadir}/%{name}/translations
%if 0%{?sle_version}
%{_datadir}/%{name}/translations/%{name}_???.qm
%endif
%changelog