handlr: added a wrapper to /usr/local/bin to override xdg-open from xdg-utils
This commit is contained in:
parent
599d71647b
commit
c3abec6f34
@ -1,3 +1,6 @@
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/handlr
|
||||
drwxr-xr-x root/root usr/local/
|
||||
drwxr-xr-x root/root usr/local/bin/
|
||||
-rwxr-xr-x root/root usr/local/bin/xdg-open
|
||||
|
@ -1,5 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF34iSnN3etxgcaUuCSiv/rHZrjnv8WtiYqEoy54O2vCiSjt8i6bWB7hcAg61EMoH+tTn38DQVSYnBto/h+sdv1wE=
|
||||
SHA256 (Pkgfile) = 6b11376a6cdfd6b7c90b14defcacac47128d867ac99b9d334b8c4092a55905fc
|
||||
SHA256 (.footprint) = 6b3abe8c8e8c450b3a5ae1ceda4c4f15a6faf0567db1d4a840fe38d8060702bd
|
||||
RWSagIOpLGJF36hNMokspiDpuS5oH5/kBi7Flq4+pnUM32nQcWuYebJ8Oqvr9YMUOLFnNwmaDdU3NyTZfKBQQaJ/Sy9fSu4mnwU=
|
||||
SHA256 (Pkgfile) = 3007101f044b704f9b2d7ba4be5d74d2ebe3025b80b750395e51bf42b0fe54fb
|
||||
SHA256 (.footprint) = dc2db921b47a3d580f3fb58345bac4c9b0267c93ee81f23d7a827df71fead35e
|
||||
SHA256 (handlr-0.6.4.tar.gz) = 7aae79775a08fdeb822eb0dafe90fdedffb97063649c9a950e9a8b8e6bf8e5ba
|
||||
SHA256 (xdg-open.sh) = 21fae4188078463026d6d30bda53483c3e27a1915b1f4a8cb1ae0437d4aca87e
|
||||
|
@ -1,22 +1,22 @@
|
||||
# Description: xdg-utils replacement written in rust
|
||||
# URL: https://github.com/chmln/handlr
|
||||
# Maintainer: Tim Biermann, tbier at posteo dot de
|
||||
# Depends on: rust
|
||||
# Depends on: rust xdg-utils
|
||||
|
||||
name=handlr
|
||||
version=0.6.4
|
||||
release=1
|
||||
source=(https://github.com/chmln/handlr/archive/v$version/$name-$version.tar.gz)
|
||||
release=2
|
||||
source=(https://github.com/chmln/handlr/archive/v$version/$name-$version.tar.gz
|
||||
xdg-open.sh)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
prt-get isinst zsh && install -Dm644 $SRC/$name-$version/completions/_handlr \
|
||||
$PKG/usr/share/zsh/site-functions/_handlr
|
||||
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
|
||||
cargo build --release --locked
|
||||
install -Dt $PKG/usr/bin target/release/handlr
|
||||
cargo update --manifest-path $name-$version/Cargo.toml
|
||||
cargo build --release --locked --manifest-path $name-$version/Cargo.toml
|
||||
install -Dt $PKG/usr/bin $name-$version/target/release/$name
|
||||
install -Dm755 $SRC/xdg-open.sh $PKG/usr/local/bin/xdg-open
|
||||
}
|
||||
|
11
handlr/README.md
Normal file
11
handlr/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
handlr README.md
|
||||
================
|
||||
|
||||
This package replaces `xdg-open` from `contrib/xdg-utils`
|
||||
|
||||
To not overwrite files, it requires you to put `/usr/local/bin` in your `PATH`
|
||||
__before__ `/usr/bin`, for example:
|
||||
|
||||
```
|
||||
export PATH="/usr/local/bin:/bin:/usr/bin"
|
||||
```
|
2
handlr/xdg-open.sh
Normal file
2
handlr/xdg-open.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
handlr open "$@"
|
Loading…
Reference in New Issue
Block a user