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
|
2020-10-31 14:50:52 +00:00
|
|
|
# Depends on: dbus rust
|
|
|
|
# Optional: notmuch pulseaudio
|
2019-09-02 22:24:44 +02:00
|
|
|
|
|
|
|
name=i3status-rust
|
2021-02-14 00:55:07 +00:00
|
|
|
version=0.14.5
|
2021-02-14 10:58:06 +00:00
|
|
|
release=2
|
2020-11-08 16:06:03 +00:00
|
|
|
source=(https://github.com/greshake/i3status-rust/archive/v$version/$name-$version-01.tar.gz)
|
2019-09-02 22:24:44 +02:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $name-$version
|
2020-10-31 14:50:52 +00:00
|
|
|
|
|
|
|
# configure optional dependencies
|
|
|
|
[[ -e /usr/lib/libnotmuch.so ]] && PKGMK_I3STATUS_RUST+=' notmuch'
|
2021-02-14 10:58:06 +00:00
|
|
|
[[ -e /usr/lib/pkgconfig/libpulse.pc ]] && PKGMK_I3STATUS_RUST+=' libpulse-binding'
|
2020-10-31 14:50:52 +00:00
|
|
|
|
2019-09-02 22:24:44 +02: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 14:50:52 +00:00
|
|
|
|
|
|
|
cargo update
|
2019-09-02 22:24:44 +02:00
|
|
|
cargo fetch
|
2020-10-31 14:50:52 +00:00
|
|
|
[[ -n $PKGMK_I3STATUS_RUST ]] \
|
|
|
|
&& cargo build --release --features "$PKGMK_I3STATUS_RUST" \
|
|
|
|
|| cargo build --release --no-default-features
|
2019-09-02 22:24:44 +02:00
|
|
|
install -Dt $PKG/usr/bin target/release/i3status-rs
|
|
|
|
}
|