%bcond_with clang

Name:           lxqt-themes
Version:        2.0.0
Release:        1%{?dist}
Summary:        LXQt standard themes

License:        LGPLv2+
URL:            https://lxqt-project.org/
Source0:        https://github.com/lxqt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz

# Pagure do not provide tarballs yet.
# To generate this tarball, clone from pagure
# https://pagure.io/lxqt-themes-fedora/
# Remove the .git dir and manual compress it
#Source1:        lxqt-themes-fedora-1.0.tar.xz

BuildArch:      noarch

%if %{with clang}
BuildRequires: clang >= 5.0
%else
BuildRequires: gcc-c++
%endif
BuildRequires:  cmake(lxqt2-build-tools)
BuildRequires:  pkgconfig(lxqt)
BuildRequires:  perl

Requires:       hicolor-icon-theme
Requires:       desktop-backgrounds-compat
Requires:       breeze-cursor-themes
Requires:       breeze-icon-theme

# The themes were essential part of the previous lxqt-common package which
# no longer exists. Therefore we obsolete and provide it here:
Provides:       lxqt-common = %{version}-%{release}
Obsoletes:      lxqt-common < 2.0
# The old name for the theme subpackage was lxqt-theme
Provides:       lxqt-theme = %{version}-%{release}
Obsoletes:      lxqt-theme < 2.0

%description
This package contains the standard themes for the LXQt desktop, namely
ambiance, dark, frost, kde-plasma, light and system.

%package system
Summary: Default Fedora theme for LXQt
Requires: lxqt-themes = %{version}
Requires: breeze-cursor-theme
Requires: breeze-icon-theme
Requires: redhat-logos

# Obsolete and provide the old subpackage of lxqt-common
Provides:       lxqt-theme-fedora = %{version}-%{release}
Obsoletes:      lxqt-theme-fedora < %{version}-%{release}


%description system
%{summary}.

%prep
%autosetup -p1

%build

%if %{with clang}
export CC=clang
export CXX=clang++
%endif

%cmake_lxqt
%cmake_build

%install
%cmake_install

%files
%license COPYING
%doc AUTHORS CHANGELOG README.md
%{_datadir}/lxqt/graphics
%dir %{_datadir}/lxqt/themes
%{_datadir}/lxqt/themes/{ambiance,dark,frost,kde-plasma,light,system,Clearlooks,Leech,kvantum,silver,Arch-Colors,KDE-Plasma,Valendas}
%{_datadir}/icons/hicolor/scalable/*/*.svg
%{_datadir}/lxqt/palettes
%{_datadir}/lxqt/wallpapers

%files system
#%%{_datadir}/sddm/themes/02-lxqt-fedora/
#%%{_datadir}/lxqt/themes/fedora-lxqt
#%%{_sysconfdir}/xdg/openbox/lxqt-rc.xml

%changelog
* Fri Sep 27 2024 Raven <raven@sysadmins.ws> - 2.0.0-1
- update to 2.0.0

* Mon Nov  6 2023 Raven <raven@sysadmins.ws> - 1.3.0-2
- clang support

* Thu May 18 2023 Raven <raven@sysadmins.ws> - 1.3.0-1
- update to 1.3.0

* Sat Nov 12 2022 Raven <raven@sysadmins.ws> - 1.2.0-2
- lxqt-rc.xml dropped due to conflict with lxqt-session

* Fri Nov 11 2022 Raven <raven@sysadmins.ws> - 1.2.0-1
- update to 1.2.0

* Mon Nov 08 2021 Raven <raven@sysadmins.ws> - 1.0.0-1
- update to 1.0.0
- drop RHEL7 support

* Tue Jan 26 2021 Raven <raven@sysadmins.ws> - 0.16.0-1
- version update

* Tue Jun 16 2020 Raven <raven@sysadmins.ws> - 0.15.0-1
- version update

* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Wed Feb 13 2019 Zamir SUN <zsun@fedoraproject.org>  - 0.14.0-1
- Prepare for LXQt 0.14.0

* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Mon Sep 03 2018 Zamir SUN <zsun@fedoraproject.org> - 0.13.0-5
- Obsolete and provide the old subpackage of lxqt-common
- Fixes RHBZ 1624739

* Sun Aug 26 2018 Zamir SUN <zsun@fedoraproject.org> - 0.13.0-4
- Merge lxqt-themes-fedora into lxqt-themes

* Fri Aug 24 2018 Zamir SUN <zsun@fedoraproject.org> - 0.13.0-3
- Bump for package review

* Sun Jun 03 2018 Christian Dersch <lupinix@mailbox.org> - 0.13.0-2
- add requirements for the themes

* Sun Jun  3 2018 Christian Dersch <lupinix@mailbox.org> - 0.13.0-1
- initial package