2022-04-15 12:13:36 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
pkgname='wipe-terminal'
|
2022-04-15 12:31:30 +00:00
|
|
|
version='1.0.1-4'
|
2022-04-15 12:15:16 +00:00
|
|
|
maintainer='Rico Riedel <rico.riedel@protonmail.ch>'
|
|
|
|
description='Wipe your terminal with a random animation.'
|
2022-04-15 12:13:36 +00:00
|
|
|
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
|