%if 0%{?rhel} < 9
%undefine __cmake_in_source_build
%endif
%bcond_with clang

Name:		libsysstat
Version:	0.4.6
Release:	2%{?dist}
License:	GPLv2 and LGPLv2+
Summary:	Library used to query system info and statistics
Url:		http://www.lxde.org
Source0:         https://github.com/lxqt/%{name}/archive/%{version}/%{name}-%{version}.tar.xz

BuildRequires: cmake
%if %{with clang}
BuildRequires: clang >= 5.0
%endif
BuildRequires: pkgconfig(Qt5Core) >= 5.15
BuildRequires: pkgconfig(Qt5Help)
BuildRequires: lxqt-build-tools >= 0.10.0


%description
Library used to query system info and statistics

%package devel
Summary:	Devel files for libsysstat
Requires:	%{name}%{?_isa} = %{version}-%{release}
Requires:	pkgconfig

%description devel
Sysstat libraries for development.

%prep
%setup -q

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

%{cmake} .

%cmake_build

%install
%cmake_install

%ldconfig_scriptlets

%files
%doc AUTHORS COPYING
%{_libdir}/libsysstat-qt5.so.*

%files devel
%dir %{_includedir}/sysstat-qt5/
%dir %{_datadir}/cmake/sysstat-qt5/
%{_includedir}/sysstat-qt5/*
%{_datadir}/cmake/sysstat-qt5/*
%{_libdir}/pkgconfig/sysstat-qt5.pc
%{_libdir}/libsysstat-qt5.so

%changelog
* Thu May 18 2023 Raven <raven@sysadmins.ws> -0.4.6-2
- clang build ability

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

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

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

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

* Fri Sep 20 2019 Zamir SUN <sztsian@gmail.com> - 0.4.2-3
- Improve compatibility with epel7

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

* Wed Feb 13 2019 Zamir SUN <sztsian@gmail.com>  - 0.4.2-1
- Prepare for LXQt 0.14.0

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

* Sat Aug 04 2018 Zamir SUN <zsun@fedoraproject.org> - 0.4.1-1
- Update to version 0.4.1

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Sun Sep 25 2016 Helio Chissini de Castro <helio@kde.org> - 0.3.2-1
- New upstream release tied to lxqt 0.11

* Mon May 30 2016 Than Ngo <than@redhat.com> - 0.3.1-4
- cleanup

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Dec 08 2015 Helio Chissini de Castro <helio@kde.org> - 0.3.1-2
- Prepare for lxqt epel7

* Mon Nov 02 2015 Helio Chissini de Castro <helio@kde.org> - 0.3.1-1
- New upstream version

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.3.0-3
- Rebuilt for GCC 5 C++11 ABI change

* Wed Feb 18 2015 Helio Chissini de Castro <helio@kde.org> - 0.3.0-2
- Rebuild (gcc5)

* Sun Feb 08 2015 Helio Chissini de Castro <helio@kde.org> - 0.3.0-1
- New upstream version 0.3.0

* Fri Oct 24 2014 TI_Eugene <ti.eugene@gmail.com> - 0.2.0-1
- Version bump
- qt5 only

* Fri Sep 26 2014 TI_Eugene <ti.eugene@gmail.com> - 0.1.0-1
- Initial packaging
