summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD53
3 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3c6e36ddab90
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = catgirl-engine-git
+ pkgdesc = A game engine for cool moddability and procedurally generated data
+ pkgver = v0.12.30.r20.g9e0dc34
+ pkgrel = 1
+ url = https://github.com/lexi-the-cute/catgirl-engine
+ arch = any
+ license = Zlib
+ makedepends = git
+ makedepends = rust
+ makedepends = cargo-nightly
+ provides = catgirl-engine=v0.12.30
+ conflicts = catgirl-engine
+ source = git+https://github.com/lexi-the-cute/catgirl-engine.git
+ b2sums = SKIP
+
+pkgname = catgirl-engine-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ff7ae20a78c4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.zst
+*.gz
+pkg/
+src/
+catgirl-engine/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ebd615044623
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Lexi <@alexis@foxgirl.land> (a fediverse address)
+
+pkgname=catgirl-engine-git
+pkgdesc="A game engine for cool moddability and procedurally generated data"
+arch=('any')
+license=(Zlib)
+url="https://github.com/lexi-the-cute/catgirl-engine"
+pkgver=v0.12.30.r20.g9e0dc34
+pkgrel=1
+provides=("catgirl-engine=${pkgver%%.r*}")
+conflicts=(catgirl-engine)
+source=("git+https://github.com/lexi-the-cute/catgirl-engine.git")
+b2sums=("SKIP")
+depends=()
+makedepends=(
+ "git"
+ "rust"
+ "cargo-nightly"
+)
+
+# Automatically updates pkgver variable
+pkgver() {
+ cd "catgirl-engine"
+ git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+# Prepares for building
+prepare() {
+ export RUSTUP_TOOLCHAIN=nightly
+ cd "catgirl-engine"
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}
+
+# Builds files
+build() {
+ export RUSTFLAGS="-L/usr/lib -lzstd"
+ export RUSTUP_TOOLCHAIN=nightly
+ export CARGO_TARGET_DIR=target
+ cd "catgirl-engine"
+ cargo build --frozen --release
+}
+
+# Checks built files
+check() {
+ cd "catgirl-engine"
+ cargo test --frozen --workspace
+}
+
+# Packages built files
+package() {
+ cd "catgirl-engine"
+ install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/catgirl-engine"
+}