summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-05-13 14:37:53 +0300
committerCaleb Maclennan2020-05-13 14:40:45 +0300
commitf37cb85e9362e694b2d09bf22ff227cdf8290371 (patch)
treef731e12cb0152dc100975d1daeda426fb6b39c01
downloadaur-f37cb85e9362e694b2d09bf22ff227cdf8290371.tar.gz
Add packages for Lua CommonMark parser
Initial upload: lua-commonmark-git 0.0.0-1 Initial upload: lua-commonmark 0.0.0-1
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD45
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..3d7545ede81
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = lua-commonmark-git
+ pkgdesc = Lua parser for CommonMark using LPEG grammar
+ pkgver = 0.0.0.r12.ge71d851
+ pkgrel = 1
+ url = https://github.com/alerque/commonmark-lua
+ arch = any
+ license = MIT
+ makedepends = git
+ makedepends = lua
+ makedepends = lua52
+ makedepends = lua51
+ makedepends = luarocks
+ source = git+https://github.com/alerque/commonmark-lua.git#branch=master
+ sha256sums = SKIP
+
+pkgname = lua-commonmark-git
+ depends = lua
+ depends = lua-epnf
+ depends = lua-penlight
+ conflicts = lua-commonmark
+
+pkgname = lua52-commonmark-git
+ depends = lua52
+ depends = lua52-epnf
+ depends = lua52-penlight
+ conflicts = lua52-commonmark
+
+pkgname = lua51-commonmark-git
+ depends = lua51
+ depends = lua51-epnf
+ depends = lua51-penlight
+ conflicts = lua51-commonmark
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..00b71cfb3fd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+
+_rockname=commonmark
+_project=commonmark-lua
+pkgname=("lua-$_rockname-git" "lua52-$_rockname-git" "lua51-$_rockname-git")
+pkgver=0.0.0.r12.ge71d851
+_branch='master'
+_rockrel=0
+pkgrel=1
+pkgdesc='Lua parser for CommonMark using LPEG grammar '
+arch=('any')
+url="https://github.com/alerque/$_project"
+license=('MIT')
+_lua_deps=('epnf' 'penlight')
+makedepends=('git' 'lua' 'lua52' 'lua51' 'luarocks')
+source=("git+$url.git#branch=$_branch")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_project"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+_package_helper() {
+ cd "$_project"
+ luarocks --lua-version="$1" --tree="$pkgdir/usr/" make --deps-mode=none --no-manifest "$_rockname-scm-$_rockrel.rockspec"
+}
+
+package_lua-commonmark-git() {
+ depends=('lua' "${_lua_deps[@]/#/lua-}")
+ conflicts=("${pkgname/-git}")
+ _package_helper 5.3
+}
+
+package_lua52-commonmark-git() {
+ depends=('lua52' "${_lua_deps[@]/#/lua52-}")
+ conflicts=("${pkgname/-git}")
+ _package_helper 5.2
+}
+
+package_lua51-commonmark-git() {
+ depends=('lua51' "${_lua_deps[@]/#/lua51-}")
+ conflicts=("${pkgname/-git}")
+ _package_helper 5.1
+}