forked from ports/contrib
40 lines
1.5 KiB
Plaintext
40 lines
1.5 KiB
Plaintext
# Description: i3status replacement written in rust
|
|
# URL: https://github.com/greshake/i3status-rust
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Depends on: dbus rust
|
|
# Optional: alsa-utils bluez curl font-powerline font-awesome-compat kdeconnect lm_sensors notmuch pulseaudio upower
|
|
|
|
name=i3status-rust
|
|
version=0.20.4
|
|
release=1
|
|
source=(https://github.com/greshake/i3status-rust/archive/v$version/$name-$version.tar.gz)
|
|
|
|
build() {
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
|
|
|
# configure optional dependencies
|
|
[[ -e /usr/lib/libnotmuch.so ]] && PKGMK_I3STATUS_RUST+=' notmuch'
|
|
[[ -e /usr/lib/pkgconfig/libpulse.pc ]] && PKGMK_I3STATUS_RUST+=' libpulse-binding'
|
|
|
|
cargo update --manifest-path $name-$version/Cargo.toml
|
|
|
|
[[ -n $PKGMK_I3STATUS_RUST ]] \
|
|
&& 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
|
|
|
|
install -Dt $PKG/usr/bin $name-$version/target/release/i3status-rs
|
|
|
|
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=i3status-rust-git#n44
|
|
install -Dm644 $name-$version/man/i3status-rs.1 -t "$PKG/usr/share/man/man1"
|
|
|
|
for icon_set in $name-$version/files/icons/*.toml; do
|
|
install -Dm644 $icon_set -t $PKG/usr/share/$name/icons
|
|
done
|
|
|
|
for theme in $name-$version/files/themes/*.toml; do
|
|
install -Dm644 $theme -t $PKG/usr/share/$name/themes
|
|
done
|
|
}
|