summaryrefslogtreecommitdiff
path: root/user/lua-filesystem/APKBUILD
blob: c4449467b4b62e012b9d81c9f13806fb0d19d411 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Kiyoshi Aman <adelie@aerdan.vulpine.house>
pkgname=lua-filesystem
_pkgname=luafilesystem
pkgver=1.8.0
_pkgver=$(printf '%s' "$pkgver" | tr . _)
_rockver=${pkgver%.*}-${pkgver##*.}
pkgrel=0
pkgdesc="Filesystem functions for Lua"
url="http://keplerproject.github.io/luafilesystem/"
arch="all"
license="MIT"
depends="lua5.3"
makedepends="lua5.3-dev"
source="$_pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$_pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgver"

build() {
	make CFLAGS="$CFLAGS $(pkg-config lua --cflags) -fPIC"
}

check() {
	LUA_CPATH=./src/?.so lua tests/test.lua
}

package() {
	rockdir="$pkgdir/usr/lib/luarocks/rocks-5.3/$_pkgname/$_rockver"
	make LUA_LIBDIR="$pkgdir/$(pkg-config --variable=INSTALL_CMOD lua)" install
	mkdir -p "$rockdir"
	echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
}

sha512sums="79d964f13ae43716281dc8521d2f128b22f2261234c443e242b857cfdf621e208bdf4512f8ba710baa113e9b3b71e2544609de65e2c483f569c243a5cf058247  luafilesystem-1.8.0.tar.gz"