From 9ea0055067558dc0a7b4efe315892efe2e53d6aa Mon Sep 17 00:00:00 2001 From: Vomitblood Date: Mon, 25 Mar 2024 03:28:53 +0800 Subject: [PATCH] debian build --- .gitignore | 8 ++++++-- build/{arch-linux => arch}/PKGBUILD | 0 build/debian/debian.sh | 29 +++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 2 deletions(-) rename build/{arch-linux => arch}/PKGBUILD (100%) create mode 100644 build/debian/debian.sh diff --git a/.gitignore b/.gitignore index 127bf7e..c04da6a 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/build/arch-linux/PKGBUILD b/build/arch/PKGBUILD similarity index 100% rename from build/arch-linux/PKGBUILD rename to build/arch/PKGBUILD diff --git a/build/debian/debian.sh b/build/debian/debian.sh new file mode 100644 index 0000000..1a460cb --- /dev/null +++ b/build/debian/debian.sh @@ -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 +Description: "Pokemon Colorscripts written in Rust"" > pokerust/DEBIAN/control + +# actually build the thing +echo $(pwd) +dpkg-deb --build pokerust \ No newline at end of file