File polybar.spec of Package polybar-git
#
# spec file for package polybar
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: polybar
Version: @SERVICE@
Release: 0
Summary: A fast and easy-to-use status bar
License: MIT
Group: System/GUI/Other
URL: https://github.com/polybar/polybar
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: git
BuildRequires: i3-gaps-devel
BuildRequires: libiw-devel
BuildRequires: libmpdclient-devel
BuildRequires: pkgconfig
BuildRequires: python3-Sphinx
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libnl-genl-3.0)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(python)
BuildRequires: pkgconfig(xcb-composite)
BuildRequires: pkgconfig(xcb-cursor)
BuildRequires: pkgconfig(xcb-damage)
BuildRequires: pkgconfig(xcb-ewmh)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-image)
BuildRequires: pkgconfig(xcb-proto)
BuildRequires: pkgconfig(xcb-randr)
BuildRequires: pkgconfig(xcb-render)
BuildRequires: pkgconfig(xcb-sync)
BuildRequires: pkgconfig(xcb-util)
BuildRequires: pkgconfig(xcb-xkb)
BuildRequires: pkgconfig(xcb-xrm)
# Fonts used in example config
BuildRequires: gnu-unifont-ttf-fonts
BuildRequires: siji-bitmap-fonts
BuildRequires: xorg-x11-fonts-core
Requires: gnu-unifont-ttf-fonts
Requires: siji-bitmap-fonts
%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.
%package bash-completion
Summary: Bash completion for %{name}
Group: System/Shells
Requires: bash-completion
Supplements: (%{name} and bash)
BuildArch: noarch
%description bash-completion
Bash command line completion support for %{name}.
%package zsh-completion
Summary: Zsh Completion for %{name}
Group: System/Shells
Requires: zsh
Supplements: (%{name} and zsh)
BuildArch: noarch
%description zsh-completion
ZSH command line completion support for %{name}.
%prep
%autosetup
# error on line nnn at column nn: xmlParseEntityRef: no name
sed -i 's/\& contributors/\& contributors/' doc/conf.py
%build
%cmake \
-DBUILD_DOC=ON \
-DBUILD_IPC_MSG=ON \
-DBUILD_TESTS=OFF \
-DENABLE_ALSA=OFF \
-DENABLE_CCACHE=ON \
-DENABLE_CURL=ON \
-DENABLE_I3=ON \
-DENABLE_MPD=ON \
-DENABLE_NETWORK=ON \
-DENABLE_PULSEAUDIO=ON \
-DWITH_LIBNL=ON \
-DWITH_XCOMPOSITE=ON \
-DWITH_XCURSOR=ON \
-DWITH_XKB=ON \
-DWITH_XRANDR=ON \
-DWITH_XRM=ON
%make_build
%install
%cmake_install
find %{buildroot}%{_datadir}/doc/%{name}/ -type f -name '.*' -delete -print
%files
%doc README.md SUPPORT.md
%{_bindir}/%{name}*
%dir %{_datadir}/doc/%{name}
%{_datadir}/doc/%{name}/*
%{_mandir}/man?/%{name}.?%{ext_man}
%license LICENSE
%files bash-completion
%dir %{_datadir}/bash-completion/
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/%{name}
%files zsh-completion
%dir %{_datadir}/zsh/
%dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_%{name}*
%changelog