-%define kdeappsver 19.04.1
-%define kframever 5.56.0
-%define qtver 5.9.0
+#
+# Conditional build:
+%bcond_with tests # build with tests
+%define kdeappsver 22.08.1
+%define kframever 5.94.0
+%define qtver 5.15.2
%define kaname grantlee-editor
Summary: Grantlee Editor
Name: ka5-%{kaname}
-Version: 19.04.1
+Version: 22.08.1
Release: 1
License: GPL v2+/LGPL v2.1+
Group: X11/Libraries
-Source0: http://download.kde.org/stable/applications/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
-# Source0-md5: 6bb70524f9d7f939831ccd3756c28403
+Source0: https://download.kde.org/stable/release-service/%{kdeappsver}/src/%{kaname}-%{version}.tar.xz
+# Source0-md5: cc0b95a211e521fcdddd0b206e33ad55
URL: http://www.kde.org/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Gui-devel
BuildRequires: gettext-devel
BuildRequires: ka5-akonadi-mime-devel >= %{kdeappsver}
BuildRequires: ka5-grantleetheme-devel >= %{kdeappsver}
-BuildRequires: ka5-kdepim-apps-libs-devel >= %{kdeappsver}
BuildRequires: ka5-kimap-devel >= %{kdeappsver}
BuildRequires: ka5-kpimtextedit-devel >= %{kdeappsver}
BuildRequires: ka5-libkleo-devel >= %{kdeappsver}
BuildRequires: shared-mime-info
BuildRequires: tar >= 1:1.22
BuildRequires: xz
+ExcludeArch: x32
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Utilities and tools to manage themes in KDE PIM applications.
+%description -l pl.UTF-8
+Narzędzia do zarządzania motywami w aplikacjach KDE PIM.
+
%prep
%setup -q -n %{kaname}-%{version}
cd build
%cmake \
-G Ninja \
+ %{!?with_tests:-DBUILD_TESTING=OFF} \
-DHTML_INSTALL_DIR=%{_kdedocdir} \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
..
%ninja_build
+%if %{with tests}
+ctest
+%endif
+
+
%install
rm -rf $RPM_BUILD_ROOT
%ninja_install -C build
%files -f %{kaname}.lang
%defattr(644,root,root,755)
-/etc/xdg/grantleeditor.categories
-/etc/xdg/grantleeditor.renamecategories
%attr(755,root,root) %{_bindir}/contactprintthemeeditor
%attr(755,root,root) %{_bindir}/contactthemeeditor
%attr(755,root,root) %{_bindir}/headerthemeeditor
-%attr(755,root,root) %{_libdir}/libgrantleethemeeditor.so
-%attr(755,root,root) %ghost %{_libdir}/libgrantleethemeeditor.so.5
-%attr(755,root,root) %{_libdir}/libgrantleethemeeditor.so.5.*.*
+%ghost %{_libdir}/libgrantleethemeeditor.so.5
+%attr(755,root,root) %{_libdir}/libgrantleethemeeditor.so.*.*.*
%{_desktopdir}/org.kde.contactprintthemeeditor.desktop
%{_desktopdir}/org.kde.contactthemeeditor.desktop
%{_desktopdir}/org.kde.headerthemeeditor.desktop
%{_datadir}/config.kcfg/grantleethemeeditor.kcfg
+%{_datadir}/qlogging-categories5/grantleeditor.categories
+%{_datadir}/qlogging-categories5/grantleeditor.renamecategories