From 3b7886fbed2e23da39d4f87e4325cb7616004cc5 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 3 Nov 2024 17:33:52 +0100 Subject: Added lua-cpml package Note that this package is meant for luajit and lua 5.1, but has been bumped to 5.4 naively here simply because I use 5.4 more often. --- lua-cpml/PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua-cpml/PKGBUILD (limited to 'lua-cpml/PKGBUILD') diff --git a/lua-cpml/PKGBUILD b/lua-cpml/PKGBUILD new file mode 100644 index 0000000..e79738f --- /dev/null +++ b/lua-cpml/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Aki + +pkgname=lua-cpml +pkgver=1.0.0.r64.geb209f6 +pkgrel=1 +pkgdesc="Cirno's Perfect Math Library" +arch=('any') +url='https://github.com/excessive/cpml' +license=('BSD' 'MIT' 'CC0') +makedepends=('luarocks') +source=("git+https://github.com/excessive/cpml.git" 'lua_version.diff') +sha256sums=('SKIP' 'SKIP') + + +pkgver() { + cd cpml + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + + +prepare() { + cd cpml + patch --forward --strip=1 --input="$srcdir/lua_version.diff" +} + + +build() { + cd cpml + luarocks make --pack-binary-rock cpml-scm-1.rockspec +} + + +package() { + cd cpml + luarocks --lua-version=5.4 --tree="$pkgdir/usr" install --deps-mode=none cpml-scm-1.all.rock + find "$pkgdir/usr" -name manifest -delete +} -- cgit v1.1