mirror of
https://github.com/ricoriedel/wipe.git
synced 2024-11-26 09:46:37 +00:00
Add debian build script
This commit is contained in:
parent
1a3f09f35d
commit
1b49403057
@ -1,4 +1,6 @@
|
|||||||
# Don't forget to update PKGBUILD
|
# Don't forget to update
|
||||||
|
# - dist/arch/PKGBUILD
|
||||||
|
# - dist/deb/build
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "wipe"
|
name = "wipe"
|
||||||
|
45
dist/deb/build
vendored
Executable file
45
dist/deb/build
vendored
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
#!/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
|
Loading…
Reference in New Issue
Block a user