diff options
author | Philipp A | 2020-12-30 18:20:45 +0100 |
---|---|---|
committer | Philipp A | 2020-12-30 18:20:45 +0100 |
commit | ec875e962549e71833350d350ef7daf4c0990c87 (patch) | |
tree | cbe41dac5d713d8c527f234724a73f7017442ff7 | |
download | aur-ec875e962549e71833350d350ef7daf4c0990c87.tar.gz |
iniz
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 42 |
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2552d1018723 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = digestif-git + pkgdesc = A code analyzer and Language Server Protocol implementation for [La|Con|Bib]TeX[t] documents. + pkgver = 0.3.149.bbd522e + pkgrel = 1 + url = https://github.com/astoff/digestif + arch = any + license = MIT + makedepends = luarocks + depends = lua + depends = lua-lpeg + depends = lua-dkjson + provides = digestif + conflicts = digestif + source = git+https://github.com/astoff/digestif.git + sha256sums = SKIP + +pkgname = digestif-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..d58461410c4d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/src/ +/pkg/ +/digestif/ +/*.pkg.tar.* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8d2594d5c682 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +_name=digestif +pkgname=digestif-git +pkgver=0.3.149.bbd522e +pkgrel=1 +arch=(any) +license=(MIT) +url="https://github.com/astoff/$_name" +pkgdesc='A code analyzer and Language Server Protocol implementation for [La|Con|Bib]TeX[t] documents.' +provides=($_name) +conflicts=($_name) +depends=(lua lua-lpeg lua-dkjson) +makedepends=(luarocks) +source=("git+$url.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_name" + printf "%s.%s.%s" \ + "$(git describe --tags --abbrev=0)" \ + "$(git rev-list --count HEAD)" \ + "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$_name" + sed "s/version = \"dev-1\"/version = \"$pkgver-1\"/" "$_name-dev-1.rockspec" > "$_name-$pkgver-1.rockspec" + luarocks build --pack-binary-rock --deps-mode=none "$_name-$pkgver-1.rockspec" +} + +package() { + cd "$srcdir/$_name" + local luaver=$(lua -e 'print(_VERSION)' | cut -d' ' -f2) + luarocks install --tree="$pkgdir/usr/" --deps-mode=none "$_name-$pkgver-1.rockspec" + cat >"$pkgdir/usr/bin/digestif" <<EOF +#!/bin/bash +lua /usr/lib/luarocks/rocks-$luaver/digestif/$pkgver-1/bin/digestif "\$@" +EOF + chmod +x "$pkgdir/usr/bin/digestif" + #sed -Ei "s|'$pkgdir|'|" "$pkgdir/usr/bin/digestif" + # remove luarocks-created root manifest + rm "$pkgdir/usr/lib/luarocks/rocks-$luaver/manifest" +} |