Name:           polybar
Version:        3.4.2
Release:        1%{?dist}
Summary:        Fast and easy-to-use status bar

License:        MIT
URL:            https://github.com/polybar/polybar
Source0:        %{url}/releases/download/%{version}/%{name}-%{version}.tar

BuildRequires:  clang >= 3.4
BuildRequires:  cmake >= 3.1
BuildRequires:  git
BuildRequires:  python3-sphinx
BuildRequires:  cairo-devel
BuildRequires:  xcb-util-devel
BuildRequires:  libxcb-devel
BuildRequires:  xcb-proto
BuildRequires:  xcb-util-image-devel
BuildRequires:  xcb-util-wm-devel
BuildRequires:  xcb-util-xrm-devel
BuildRequires:  xcb-util-cursor-devel
BuildRequires:  alsa-lib-devel
BuildRequires:  pulseaudio-libs-devel
BuildRequires:  i3-devel
BuildRequires:  jsoncpp-devel
BuildRequires:  libmpdclient-devel
BuildRequires:  libcurl-devel
BuildRequires:  wireless-tools-devel
BuildRequires:  libnl3-devel

%description
Polybar aims to help users build beautiful and highly customizable status bars
for their desktop environment, without the need of having a black belt in
shell scripting.

Some of the features included so far:
Date and Time Display, Keyboard Layout and Indicator Status, Backlight Level
Display, Volume Controls, MPD Playback Controls and Status Display, Network
Connection Details, User-defined Menu Tree, Workspace Panel for bspwm and i3,
CPU Load Indicator, Inter-Process Messaging, Time-based Shell Execution as
well as Command Output Tailing, And Many Others

%prep
%autosetup -n polybar

%build
mkdir -p doc/build
cd doc/build
%cmake ..
%make_build doc_man
cd ../..

%cmake -DBUILD_DOC=false -DBUILD_TESTS=ON .
%make_build

%check
CTEST_OUTPUT_ON_FAILURE=1 make test

%install
%make_install
mkdir -p %{buildroot}/%{_mandir}/man1
cp -p doc/build/man/%{name}.1 %{buildroot}/%{_mandir}/man1/

%files
%{_bindir}/%{name}
%{_bindir}/%{name}-msg
%{_datadir}/bash-completion/completions/%{name}
%{_datadir}/zsh/site-functions/_%{name}
%{_datadir}/zsh/site-functions/_%{name}_msg
%license LICENSE
%doc
%{_mandir}/man1/%{name}.1*
%{_datadir}/doc/%{name}/config

%changelog
* Sun Dec 15 2019 Max Audron
- Version 3.4.1