%define url_ver %(echo %{version} | cut -d. -f1,2)

#exclude plugin .so from provides
%global __provides_exclude_from %{_libdir}/xfce4/panel/plugins/.*\\.so

Summary:	Cpu-freq plugin for Xfce desktop
Name:		xfce4-cpufreq-plugin
Version:	1.2.8
Release:	%mkrel 1
License:	GPLv2+
Group:		Graphical desktop/Xfce
URL:		https://docs.xfce.org/panel-plugins/xfce4-cpufreq-plugin
Source0:	https://archive.xfce.org/src/panel-plugins/%{name}/%{url_ver}/%{name}-%{version}.tar.bz2
BuildRequires:	intltool
BuildRequires:	xfce4-dev-tools
BuildRequires:	pkgconfig(gthread-2.0)
BuildRequires:	pkgconfig(gtk+-3.0)
BuildRequires:	pkgconfig(libxfce4util-1.0)
BuildRequires:	pkgconfig(libxfce4ui-2)
BuildRequires:	pkgconfig(libxfce4panel-2.0)
Requires:	xfce4-panel >= 4.8.0

%description
xfce4-cpufreq-plugin shows the current CPU frequency and governor in the
panel, and the frequencies and governors and more information for all
CPUs in a separate overview.

Note that at the moment, xfce4-cpufreq-plugin does not permit to change
any of these CPU settings.

%prep
%setup -q
%autopatch -p1

%build
%configure
%make_build

%install
%make_install

#we don't want these
find %{buildroot} -name "*.la" -delete

%find_lang %{name}

%files -f %{name}.lang
%license COPYING
%doc README* ChangeLog AUTHORS
%{_libdir}/xfce4/panel/plugins/libcpufreq.so
%{_datadir}/xfce4/panel/plugins/cpufreq.desktop
%{_iconsdir}/hicolor/*/apps/*.png