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

Summary:	Show the state of keyboard LEDs
Name:		xfce4-kbdleds-plugin
Version:	0.2.3
Release:	%mkrel 1
License:	GPLv2+
Group:		Graphical desktop/Xfce
URL:		https://github.com/oco2000/xfce4-kbdleds-plugin/
Source0:	https://github.com/oco2000/xfce4-kbdleds-plugin/archive/xfce4-kbdleds-plugin-%{version}.tar.gz
# Upstream patches
Patch0:		0001-Change-some-includes.patch
Patch1:		0002-Fix-memory-allocation-functions.patch
BuildRequires:	intltool
BuildRequires:	xfce4-dev-tools
BuildRequires:	pkgconfig(gtk+-3.0)
BuildRequires:	pkgconfig(libxfce4ui-2)
BuildRequires:	pkgconfig(libxfce4panel-2.0)
Requires:	xfce4-panel

%description
This plugin shows the state of your keyboard LEDs:
Caps, Scroll and Num Lock in Xfce panel.

%prep
%autosetup -p1 -n %{name}-%{name}-%{version}

%build
%xdt_autogen
%configure \
	--disable-static
%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 AUTHORS README*
%{_libdir}/xfce4/panel/plugins/libkbdleds.so
%{_datadir}/xfce4/panel/plugins/kbdleds.desktop
%{_iconsdir}/hicolor/*/apps/*