Make PKGBUILD conform with arch packaging standards

This commit is contained in:
Nicolas 2022-04-11 20:32:52 +02:00
parent 06d4311a9c
commit 042481609a

25
dist/PKGBUILD vendored
View File

@ -1,28 +1,37 @@
# Maintainer: Rico Riedel <rico.riedel@protonmail.ch>
pkgname='terminal-wipe-git' pkgname='terminal-wipe-git'
pkgver='1.0.0' pkgver='1.0.0'
pkgrel='2' pkgrel='3'
pkgdesc='Wipe your terminal with a random animation.' pkgdesc='Wipe your terminal with a random animation.'
arch=('x86_64') arch=('x86_64')
url='https://github.com/ricoriedel/wipe' url='https://github.com/ricoriedel/wipe'
license=('MIT') license=('MIT')
makedepends=('rust') makedepends=('cargo')
conflicts=('wipe') conflicts=('wipe')
source=('git+https://www.github.com/ricoriedel/wipe.git') source=('git+https://www.github.com/ricoriedel/wipe.git')
sha256sums=('SKIP') sha256sums=('SKIP')
prepare() {
cd wipe
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() { build() {
cd wipe cd wipe
cargo build --release export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
} }
check() { check() {
cd wipe cd wipe
cargo test --release export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
} }
package() { package() {
mkdir -p "$pkgdir/usr/bin" cd wipe
mkdir -p "$pkgdir/usr/share/licenses/$pkgname" install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" 'LICENSE'
mv 'wipe/target/release/wipe' "$pkgdir/usr/bin" install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/wipe"
mv 'wipe/LICENSE' "$pkgdir/usr/share/licenses/$pkgname"
} }