mirror of
https://github.com/ricoriedel/wipe.git
synced 2024-11-30 03:26:42 +00:00
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
pkgname='wipe-terminal'
|
|
version='1.0.0-3'
|
|
maintainer='Maintainer: Rico Riedel <rico.riedel@protonmail.ch>'
|
|
description='Description: Wipe your terminal with a random animation.'
|
|
arch='x86_64'
|
|
debarch='amd64'
|
|
pkgdir="$PWD/$pkgname"
|
|
srcdir="$PWD/../.."
|
|
|
|
build() {
|
|
cd "$srcdir"
|
|
|
|
export RUSTUP_TOOLCHAIN=stable
|
|
export CARGO_TARGET_DIR=target
|
|
|
|
cargo fetch --locked --target "$arch-unknown-linux-gnu"
|
|
cargo build --frozen --release --all-features
|
|
cargo test --frozen --all-features
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir"
|
|
|
|
install -Dm0644 'LICENSE' "$pkgdir/usr/share/doc/$pkgname/copyright"
|
|
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/wipe"
|
|
|
|
mkdir -p "$pkgdir/DEBIAN"
|
|
echo "Package: $pkgname" > "$pkgdir/DEBIAN/control"
|
|
echo "Version: $version" >> "$pkgdir/DEBIAN/control"
|
|
echo "Section: utils" >> "$pkgdir/DEBIAN/control"
|
|
echo "Priority: optional" >> "$pkgdir/DEBIAN/control"
|
|
echo "Architecture: $debarch" >> "$pkgdir/DEBIAN/control"
|
|
echo "Maintainer: $maintainer" >> "$pkgdir/DEBIAN/control"
|
|
echo "Description: $description" >> "$pkgdir/DEBIAN/control"
|
|
|
|
dpkg-deb --root-owner-group --build "$pkgdir"
|
|
}
|
|
|
|
mkdir -p "$pkgdir"
|
|
|
|
build
|
|
package
|