lilac/repo/vdhcoapp-git/PKGBUILD.filepicker

50 lines
848 B
Plaintext
Raw Permalink Normal View History

# Maintainer:
: ${CARGO_HOME:=$SRCDEST/cargo-home}
_pkgname="vdhcoapp-filepicker"
pkgname="$_pkgname"
pkgver=1.0.1
pkgrel=1
pkgdesc="Filepicker for VDHCoApp" # added in 2.0.16
url="https://github.com/paulrouget/static-filepicker"
license=('GPL-2.0-or-later')
arch=('x86_64')
depends=(
'gtk3'
)
makedepends=(
'cargo'
'git'
)
_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git#tag=v$pkgver")
sha256sums=('SKIP')
_cargo_env() {
export CARGO_HOME
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
}
prepare() {
_cargo_env
cd "$_pkgsrc"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
_cargo_env
cd "$_pkgsrc"
cargo build --frozen --release --all-features
}
package() {
_cargo_env
install -Dm755 "$_pkgsrc/$CARGO_TARGET_DIR/release/filepicker" -t "$pkgdir/usr/bin/"
}