NAME="polybar"
DESC="A fast and easy-to-use status bar "
VERSION="3.7.1"
FILES=("https://github.com/polybar/polybar/releases/download/$VERSION/polybar-$VERSION.tar.gz")
HASHES=("5de6ad385ba09dc453a4e5ec7054749a4882b5b21a62c17ae40bf7c90613ff0f")
DEPENDS=(
  "libuv" "cairo" "xcb-util-image"
  "xcb-util-wm" "xcb-util-xrm" "xcb-util-cursor"
  "alsa-lib" "pulseaudio" "mpd"
 "libnl" "jsoncpp" "curl"
)

PACKAGE() {
  tar xf polybar-$VERSION.tar.gz
  cd $NAME-$VERSION

  mkdir build
  cd    build

  cmake .. -GNinja              \
    -DCMAKE_BUILD_TYPE=Release  \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_DOC_HTML=OFF        \
    -DBUILD_TESTS=ON            \
    -DPYTHON_EXECUTABLE=/usr/bin/python3
  cmake --build . && DESTDIR="$ROOTDIR" cmake --install .

  cd ../.. && rm -r $NAME-$VERSION
}
