summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTechcable2022-09-07 14:12:19 -0700
committerTechcable2022-09-07 14:14:08 -0700
commitf3e93f22cbf4f050839b6dcd9a1287616b6f2ac2 (patch)
tree0cff9e4600c8a8e66ae96e5b107c30bfdd6b31a2
downloadaur-f3e93f22cbf4f050839b6dcd9a1287616b6f2ac2.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore10
-rw-r--r--PKGBUILD44
3 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c8a43d4122a5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = janet-spork-git
+ pkgdesc = Various Janet utility modules - the official Contrib library.
+ pkgver = 0.r251.ac1d647
+ pkgrel = 1
+ url = https://github.com/janet-lang/spork
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = janet-lang
+ provides = janet-spork
+ conflicts = janet-spork
+ options = !strip
+ options = staticlibs
+ source = janet-spork::git+https://github.com/janet-lang/spork.git
+ sha256sums = SKIP
+
+pkgname = janet-spork-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..c0e24df7b995
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+# Packages & tars
+*.pkg.*
+*.tar.*
+
+# Build
+src
+pkg
+
+# Duplicated git files (don't know why)
+/janet-spork
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1e7862376e67
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Techcable <$USER at techcable dot net>
+# Based off janet-spork from amano.kenji
+pkgname=janet-spork-git
+pkgver=0.r251.ac1d647
+pkgrel=1
+pkgdesc="Various Janet utility modules - the official "Contrib" library."
+arch=(any)
+url="https://github.com/janet-lang/spork"
+license=('MIT')
+depends=('janet-lang')
+makedepends=('git')
+provides=('janet-spork')
+conflicts=("janet-spork")
+backup=()
+# 1. Don't strip (debug info is important, we're tiny)
+# 2. Offer staticlibs for embedding (we're basically Lua)
+options=('!strip' 'staticlibs')
+source=('janet-spork::git+https://github.com/janet-lang/spork.git')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+
+ # TODO: This format will change if spork ever gets an official release
+ printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ jpm build
+}
+
+check() {
+ cd "$srcdir/${pkgname%-git}"
+ jpm test
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+ install -D -t "${pkgdir}/usr/share/doc/${pkgname%-vcs}" README.md doc/*
+ modpath="$(janet -e '(print (dyn :syspath))')"
+ mkdir -p "${pkgdir}/${modpath}"
+ jpm --dest-dir="$pkgdir" --modpath="$modpath" --binpath="/usr/bin" install
+}
+sha256sums=('SKIP')