summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2022-07-27 19:43:37 -0500
committerLuis Martinez2022-07-27 19:43:37 -0500
commitaa9249259312750cea32073eeee28f4f0c87eeb7 (patch)
tree439fef384a0ac4e68e167072bd7a03b2b9cb7f05
downloadaur-aa9249259312750cea32073eeee28f4f0c87eeb7.tar.gz
initial commit
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD48
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..4a7ed1f08a41
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = mazter-git
+ pkgdesc = Mazes in your terminal
+ pkgver = r9.b907627
+ pkgrel = 1
+ url = https://github.com/canop/mazter
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cargo
+ depends = gcc-libs
+ source = mazter::git+https://github.com/canop/mazter
+ sha256sums = SKIP
+
+pkgname = mazter-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cd7bd1f7f7dc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+
+pkgname=mazter-git
+_pkgname="${pkgname%-git}"
+pkgver=r9.b907627
+pkgrel=1
+pkgdesc='Mazes in your terminal'
+arch=('x86_64')
+url='https://github.com/canop/mazter'
+license=('MIT')
+depends=('gcc-libs')
+makedepends=('git' 'cargo')
+source=("$_pkgname::git+$url")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ (
+ set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/^v//;s/-/.r/;s/-/./' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd "$_pkgname"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cd "$_pkgname"
+ cargo build --frozen --release --all-features
+}
+
+check() {
+ export RUSTUP_TOOLCHAIN=stable
+ cd "$_pkgname"
+ cargo test --frozen --all-features
+}
+
+package() {
+ cd "$_pkgname"
+ install -D "target/release/$_pkgname" -t "$pkgdir/usr/bin/"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
+}