Files
extra/lua-filesystem/PKGBUILD
2025-06-22 20:39:04 -05:00

43 lines
1.6 KiB
Bash

# Maintainer: Jesus E. <heckyel@riseup.net>
pkgbase=lua-filesystem
pkgname=(lua-filesystem lua51-filesystem lua52-filesystem)
pkgver=1.8.0
_tag=${pkgver//./_}
pkgrel=1
pkgdesc='File System Library for the Lua Programming Language'
arch=('i686' 'x86_64')
url='http://keplerproject.github.io/luafilesystem/'
license=('Expat')
makedepends=('lua' 'lua51' 'lua52')
source=("$pkgbase-${_tag}.tar.gz::https://github.com/keplerproject/luafilesystem/archive/v${_tag}.tar.gz")
sha512sums=('79d964f13ae43716281dc8521d2f128b22f2261234c443e242b857cfdf621e208bdf4512f8ba710baa113e9b3b71e2544609de65e2c483f569c243a5cf058247')
build() {
cp -a luafilesystem-${_tag} luafilesystem-${_tag}-51
make -C luafilesystem-${_tag}-51 PREFIX=/usr LIB_OPTION="-shared ${LDFLAGS}" LUA_VERSION=5.1
cp -a luafilesystem-${_tag} luafilesystem-${_tag}-52
make -C luafilesystem-${_tag}-52 PREFIX=/usr LIB_OPTION="-shared ${LDFLAGS}" LUA_VERSION=5.2
make -C luafilesystem-${_tag} PREFIX=/usr LIB_OPTION="-shared ${LDFLAGS}" LUA_VERSION=5.3
}
package_lua-filesystem() {
cd luafilesystem-${_tag}
make DESTDIR="$pkgdir" PREFIX=/usr LUA_VERSION=5.3 install
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_lua51-filesystem() {
cd luafilesystem-${_tag}-51
make DESTDIR="$pkgdir" PREFIX=/usr LUA_VERSION=5.1 install
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_lua52-filesystem() {
cd luafilesystem-${_tag}-52
make DESTDIR="$pkgdir" PREFIX=/usr LUA_VERSION=5.2 install
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}