# Maintainer: Frederik Schwan # Contributor: Daniel M. Capella # Contributor: Josip Ponjavic pkgname=i3status-rust pkgver=0.31.5 pkgrel=1 pkgdesc='Resourcefriendly and feature-rich replacement for i3status, written in pure Rust' arch=('x86_64') url='https://github.com/greshake/i3status-rust' license=('GPL3') depends=('libpulse' 'lm_sensors') makedepends=('rust' 'pandoc') optdepends=('alsa-utils: for the volume block' 'bluez: for the bluetooth block' 'fakeroot: for the pacman block to show pending updates' 'kdeconnect: for the kdeconnect block' 'powerline-fonts: for all themes using the Powerline arrow char' 'pulseaudio: for the volume block' 'speedtest-cli: for the speedtest block' 'ttf-font-awesome: for the awesome icons' 'upower: for the battery block') source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/greshake/i3status-rust/archive/refs/tags/v${pkgver}.tar.gz") b2sums=('8d38fcdbc3bdb32e5a3ea0a09e27ee5e0677806dfffc64afdbc0d2ecd1f3e7f19c38c7c264525c7889c10356772c955a381469dcfdb9cd88b4abb9573e177166') prepare() { cd ${pkgname}-${pkgver} cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { cd ${pkgname}-${pkgver} export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cargo build --release --locked --features 'pulseaudio maildir' cargo xtask generate-manpage } package() { cd ${pkgname}-${pkgver} install -Dm755 -t "${pkgdir}"/usr/bin target/release/i3status-rs install -Dm644 -t "${pkgdir}"/usr/share/man/man1 man/i3status-rs.1 for icon in files/icons/*.toml; do install -Dm644 -t "${pkgdir}"/usr/share/${pkgname}/icons "${icon}" done for theme in files/themes/*.toml; do install -Dm644 -t "${pkgdir}"/usr/share/${pkgname}/themes "${theme}" done for example in examples/*.toml; do install -Dm644 -t "${pkgdir}"/usr/share/doc/${pkgname}/examples/ ${example} done }