Blob Blame History Raw
%if 0%{?rhel} == 6
%define cmake_pkg cmake28
%else
%define cmake_pkg cmake
%endif

Name:		libsysstat
Version:	0.2.0
Release:	1%{?dist}
License:	GPLv2 and LGPLv2+
Summary:	Library used to query system info and statistics
Url:		http://www.lxde.org
Source:		https://github.com/lxde/libsysstat/archive/%{version}.tar.gz
Patch0:		%{name}-libpath.patch
BuildRequires:  %{cmake_pkg} >= 2.8.11
BuildRequires:	pkgconfig(Qt5Core)
BuildRequires:	qt5-qttools-devel

%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
%patch0 -p 0

%build
mkdir build
pushd build
%{?cmake28}%{!?cmake28:%{?cmake}} -DUSE_QT5=ON ..
make %{?_smp_mflags}
popd

%install
pushd build
%make_install
popd

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%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
* 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