2020-11-19 08:52:20 +00:00
|
|
|
# Description: xdg-utils replacement written in rust
|
2023-02-20 20:23:14 +01:00
|
|
|
# URL: https://github.com/Anomalocaridid/handlr-regex
|
2020-11-19 08:52:20 +00:00
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2021-07-25 17:12:39 +02:00
|
|
|
# Depends on: rust xdg-utils
|
2020-11-19 08:52:20 +00:00
|
|
|
|
|
|
|
name=handlr
|
2023-12-04 07:27:50 +01:00
|
|
|
version=0.9.0
|
2023-02-20 20:23:14 +01:00
|
|
|
release=1
|
|
|
|
source=(https://github.com/Anomalocaridid/handlr-regex/archive/v$version/$name-$version.tar.gz
|
2021-07-25 17:12:39 +02:00
|
|
|
xdg-open.sh)
|
2020-11-19 08:52:20 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
2023-02-20 20:23:14 +01:00
|
|
|
[[ ! -e $PKGMK_SOURCE_DIR/rust ]] && mkdir $PKGMK_SOURCE_DIR/rust
|
|
|
|
|
|
|
|
cargo build --release --manifest-path $name-regex-$version/Cargo.toml
|
|
|
|
|
2023-02-23 18:47:02 +01:00
|
|
|
prt-get isinst bash-completion && install -Dm644 $SRC/$name-regex-$version/assets/completions/handlr \
|
|
|
|
$PKG/usr/share/bash-completion/completions/handlr
|
|
|
|
prt-get isinst zsh && install -Dm644 $SRC/$name-regex-$version/assets/completions/_handlr \
|
|
|
|
$PKG/usr/share/zsh/site-functions/_handlr
|
|
|
|
|
2023-02-20 20:23:14 +01:00
|
|
|
install -Dt $PKG/usr/bin $name-regex-$version/target/release/$name
|
2021-07-25 17:12:39 +02:00
|
|
|
install -Dm755 $SRC/xdg-open.sh $PKG/usr/local/bin/xdg-open
|
2020-11-19 08:52:20 +00:00
|
|
|
}
|