debian build

This commit is contained in:
Vomitblood 2024-03-25 03:28:53 +08:00
parent c1e2b64aa4
commit 9ea0055067
3 changed files with 35 additions and 2 deletions

8
.gitignore vendored
View file

@ -1,5 +1,9 @@
/target
# build/arch-linux
build/arch-linux/*
!build/arch-linux/PKGBUILD
build/arch/*
!build/arch/PKGBUILD
# build/debian
build/debian/*
!build/debian/debian.sh

29
build/debian/debian.sh Normal file
View file

@ -0,0 +1,29 @@
#!/bin/sh
# create a directory structure that mirrors tha final structure of the installed package
mkdir -p pokerust/DEBIAN
mkdir -p pokerust/usr/bin
# build the executable
cd ../..
cargo build --release
cd build/debian
# copy the executable
cp ../../target/release/pokerust pokerust/usr/bin/
# create the control file
touch pokerust/DEBIAN/control
# edit the control file
echo "Package: pokerust
Version: 1.0.0
Section: base
Priority: optional
Architecture: amd64
Maintainer: Vomitblood <tohyouxuan@gmail.com>
Description: "Pokemon Colorscripts written in Rust"" > pokerust/DEBIAN/control
# actually build the thing
echo $(pwd)
dpkg-deb --build pokerust