34 lines
887 B
Plaintext
34 lines
887 B
Plaintext
|
pkgname='keyfork'
|
||
|
pkgver='0.0.0'
|
||
|
pkgrel=1
|
||
|
pkgdesc='The Kitchen Sink of Entropy'
|
||
|
arch=('x86_64')
|
||
|
url='https://git.distrust.co/public/keyfork'
|
||
|
license=('GPL-2.0')
|
||
|
makedepends=('cargo' 'clang' 'git' 'llvm' 'pkgconf') # + nettle + pcsclite
|
||
|
depends=('nettle' 'pcsclite')
|
||
|
source=('git+https://git.distrust.co/public/keyfork.git')
|
||
|
|
||
|
prepare() {
|
||
|
cd "$srcdir/$pkgname"
|
||
|
export RUSTUP_TOOLCHAIN=stable
|
||
|
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
|
||
|
cd -
|
||
|
}
|
||
|
|
||
|
build() {
|
||
|
export RUSTUP_TOOLCHAIN=stable
|
||
|
export CARGO_TARGET_DIR=target
|
||
|
export RUSTFLAGS="-C codegen-units=1"
|
||
|
cd "$srcdir/$pkgname"
|
||
|
# NOTE: Do not use `--all-features` as features may be incomopatible with
|
||
|
# each other.
|
||
|
cargo build --frozen --release -p keyfork
|
||
|
}
|
||
|
|
||
|
package() {
|
||
|
build="$srcdir/$pkgname/target/release"
|
||
|
target="$pkgdir/usr/bin"
|
||
|
install -Dm755 "$build/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
||
|
}
|