# Maintainer: Aki pkgname=lua-cpml pkgver=1.0.0.r64.geb209f6 pkgrel=2 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' 'modules.diff') sha256sums=('SKIP' '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" patch --forward --strip=1 --input="$srcdir/modules.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 }