2019-09-02 22:24:44 +02:00
|
|
|
# Description: i3status replacement written in rust
|
|
|
|
# URL: https://github.com/greshake/i3status-rust
|
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2022-02-05 10:30:36 +01:00
|
|
|
# Depends on: dbus lm_sensors rust
|
|
|
|
# Optional: alsa-utils bluez curl font-awesome-compat font-powerline kdeconnect notmuch pulseaudio upower
|
2019-09-02 22:24:44 +02:00
|
|
|
|
|
|
|
name=i3status-rust
|
2023-02-28 17:47:01 +01:00
|
|
|
version=0.30.4
|
2021-05-13 14:43:00 +02:00
|
|
|
release=1
|
2023-02-23 18:07:07 +01:00
|
|
|
source=(https://github.com/greshake/i3status-rust/archive/v$version/$name-$version.tar.gz)
|
2019-09-02 22:24:44 +02:00
|
|
|
|
|
|
|
build() {
|
2021-02-14 16:11:48 +01:00
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
2020-10-31 15:50:52 +01:00
|
|
|
|
|
|
|
# configure optional dependencies
|
2021-11-11 15:23:26 +01:00
|
|
|
prt-get isinst pulseaudio && PKGMK_I3STATUS_RUST+=' libpulse-binding'
|
2020-10-31 15:50:52 +01:00
|
|
|
|
|
|
|
[[ -n $PKGMK_I3STATUS_RUST ]] \
|
2023-02-23 18:07:07 +01:00
|
|
|
&& cargo build --manifest-path $name-$version/Cargo.toml --release --features "$PKGMK_I3STATUS_RUST" \
|
|
|
|
|| cargo build --manifest-path $name-$version/Cargo.toml --release --no-default-features
|
2021-02-14 16:11:48 +01:00
|
|
|
|
2023-02-23 18:07:07 +01:00
|
|
|
install -Dt $PKG/usr/bin $name-$version/target/release/i3status-rs
|
2021-05-09 15:23:13 +02:00
|
|
|
|
2023-02-23 18:07:07 +01:00
|
|
|
install -Dm644 $name-$version/man/i3status-rs.1 -t $PKG/usr/share/man/man1
|
2021-05-09 15:23:13 +02:00
|
|
|
|
2023-02-23 18:07:07 +01:00
|
|
|
for icon_set in $name-$version/files/icons/*.toml; do
|
2021-05-09 15:36:40 +02:00
|
|
|
install -Dm644 $icon_set -t $PKG/usr/share/$name/icons
|
2021-05-09 15:23:13 +02:00
|
|
|
done
|
|
|
|
|
2023-02-23 18:07:07 +01:00
|
|
|
for theme in $name-$version/files/themes/*.toml; do
|
2021-05-09 15:36:40 +02:00
|
|
|
install -Dm644 $theme -t $PKG/usr/share/$name/themes
|
2021-05-09 15:23:13 +02:00
|
|
|
done
|
2019-09-02 22:24:44 +02:00
|
|
|
}
|