30 lines
970 B
Plaintext
30 lines
970 B
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: notmuch pulseaudio
|
|
|
|
name=i3status-rust
|
|
version=0.14.3
|
|
release=1
|
|
source=(https://github.com/greshake/i3status-rust/archive/v$version/$name-$version-01.tar.gz)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
# configure optional dependencies
|
|
[[ -e /usr/lib/libnotmuch.so ]] && PKGMK_I3STATUS_RUST+=' notmuch'
|
|
[[ -e /usr/lib/pulseaudio/libpulsecommon-13.0.so ]] && PKGMK_I3STATUS_RUST+=' libpulse-binding'
|
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
|
|
|
cargo update
|
|
cargo fetch
|
|
[[ -n $PKGMK_I3STATUS_RUST ]] \
|
|
&& cargo build --release --features "$PKGMK_I3STATUS_RUST" \
|
|
|| cargo build --release --no-default-features
|
|
install -Dt $PKG/usr/bin target/release/i3status-rs
|
|
}
|