contrib/handlr/Pkgfile

26 lines
986 B
Plaintext
Raw Normal View History

2020-11-19 09:52:20 +01: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 09:52:20 +01:00
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: rust xdg-utils
2020-11-19 09:52:20 +01:00
name=handlr
2023-05-13 16:18:31 +02:00
version=0.8.5
2023-02-20 20:23:14 +01:00
release=1
source=(https://github.com/Anomalocaridid/handlr-regex/archive/v$version/$name-$version.tar.gz
xdg-open.sh)
2020-11-19 09:52:20 +01: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
install -Dm755 $SRC/xdg-open.sh $PKG/usr/local/bin/xdg-open
2020-11-19 09:52:20 +01:00
}