From fefa2906437daa763aab32be6ce2bdd4c5dfd22d Mon Sep 17 00:00:00 2001 From: Vomitblood Date: Mon, 25 Mar 2024 01:57:02 +0800 Subject: [PATCH] arch pkgbuild --- .gitignore | 4 ++++ build/arch-linux/PKGBUILD | 30 ++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 build/arch-linux/PKGBUILD diff --git a/.gitignore b/.gitignore index ea8c4bf..127bf7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ /target + +# build/arch-linux +build/arch-linux/* +!build/arch-linux/PKGBUILD diff --git a/build/arch-linux/PKGBUILD b/build/arch-linux/PKGBUILD new file mode 100644 index 0000000..dad5e89 --- /dev/null +++ b/build/arch-linux/PKGBUILD @@ -0,0 +1,30 @@ +pkgname=pokerust-git +pkgdesc="Pokemon Colorscripts written in Rust" +_gitname=pokerust +pkgver=r5.7fe497e +pkgrel=1 +arch=('x86_64') +url="https://github.com/Vomitblood/$_gitname" +license=('GPL') +depends=('glibc' 'gcc-libs') +makedepends=('git' 'cargo') +provides=("$_gitname") +source=("git+$url.git") +md5sums=('SKIP') +options=(!debug) +PKGEXT='.pkg.tar' + +pkgver() { + cd "$_gitname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$_gitname" + cargo build --release +} + +package() { + cd "$srcdir/$_gitname" + install -Dm755 target/release/$_gitname "$pkgdir/usr/bin/$_gitname" +}