From 3ef59e7dbf34a63fff61d42ad324294bdf8168b2 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Tue, 10 May 2022 09:20:03 +0200 Subject: [PATCH] Copied over AUR PKGBUILD; moved lm-sensors to depends --- PKGBUILD | 54 +++++++++++++++++++++++++++++++++++++++++++ i3status-rust.install | 9 ++++++++ 2 files changed, 63 insertions(+) create mode 100644 PKGBUILD create mode 100644 i3status-rust.install diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..2f0f6e5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +pkgname=i3status-rust-git +pkgver=0.21.10.r2460.gc8a20b7c +pkgrel=1 +pkgdesc='Very resourcefriendly and feature-rich replacement for i3status to use with bar programs (like i3bar and swaybar), written in pure Rust' +arch=('x86_64') +url='https://github.com/greshake/i3status-rust' +license=('GPL3') +depends=('libpulse' 'lm_sensors') +makedepends=('git' 'rust') +optdepends=('alsa-utils: for the volume block' + 'bluez: for the bluetooth block' + 'curl: for the weather block' + 'fakeroot: for the pacman block to show pending updates' + 'ibus: for the ibus block' + 'kdeconnect: for the kdeconnect block' + 'networkmanager: for the networkmanager 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-4: for the awesome icons' + 'upower: for the battery block') +provides=("${pkgname%-*}") +conflicts=("${pkgname%-*}") +install="${pkgname%-*}.install" +source=("${pkgname%-*}::git+$url") +sha1sums=('SKIP') + +pkgver() { + cd "${pkgname%-*}" + echo $(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).r$(git rev-list --count HEAD).g$(git describe --always) +} + +build() { + cd "${pkgname%-*}" + cargo build --release --features "pulseaudio" +} + +package() { + cd "${pkgname%-*}" + install -Dm755 target/release/i3status-rs "$pkgdir/usr/bin/i3status-rs" + install -Dm644 man/i3status-rs.1 -t "$pkgdir/usr/share/man/man1" + + for icon_set in files/icons/*.toml; do + install -Dm644 "$icon_set" -t "$pkgdir/usr/share/${pkgname%-*}/icons" + done + + for theme in files/themes/*.toml; do + install -Dm644 "$theme" -t "$pkgdir/usr/share/${pkgname%-*}/themes" + done + + for example_config in examples/*.toml; do + install -Dm644 "$example_config" -t "$pkgdir/usr/share/doc/${pkgname%-*}/examples" + done +} diff --git a/i3status-rust.install b/i3status-rust.install new file mode 100644 index 0000000..f747145 --- /dev/null +++ b/i3status-rust.install @@ -0,0 +1,9 @@ +post_install() { +echo "" +echo "==> Copy example config file to .config dir:" +echo "$ cp /usr/share/doc/i3status-rust/examples/example_config.toml ~/.config/i3/config.toml" +echo "" +echo "==> And edit bar section of the i3 config file." +echo "status_command i3status-rs ~/.config/i3/config.toml" +echo "" +}