summaryrefslogtreecommitdiff
path: root/user/lua-filesystem/APKBUILD
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2018-10-09 07:57:35 -0500
committerKiyoshi Aman <kiyoshi.aman+apkfission@gmail.com>2018-10-09 21:28:56 -0500
commit3a977ae559552329a08cc97802193eb019e398e9 (patch)
tree9c0c7b7eaafa4c3ca18936455381080644c31b57 /user/lua-filesystem/APKBUILD
parentae6c7d2be3c39179a93f89df0c1e819a753b7d32 (diff)
downloadpackages-3a977ae559552329a08cc97802193eb019e398e9.tar.gz
packages-3a977ae559552329a08cc97802193eb019e398e9.tar.bz2
packages-3a977ae559552329a08cc97802193eb019e398e9.tar.xz
packages-3a977ae559552329a08cc97802193eb019e398e9.zip
user/lua-filesystem: new package for prosody
Diffstat (limited to 'user/lua-filesystem/APKBUILD')
-rw-r--r--user/lua-filesystem/APKBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/user/lua-filesystem/APKBUILD b/user/lua-filesystem/APKBUILD
new file mode 100644
index 000000000..e809a654f
--- /dev/null
+++ b/user/lua-filesystem/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+pkgname=lua-filesystem
+_pkgname=luafilesystem
+pkgver=1.7.0.2
+_pkgver=${pkgver//./_}
+_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() {
+ cd "$builddir"
+ make CFLAGS="$CFLAGS $(pkg-config lua --cflags) -fPIC"
+}
+
+check() {
+ cd "$builddir"
+ LUA_CPATH=./src/?.so lua tests/test.lua
+}
+
+package() {
+ local rockdir="$pkgdir"/usr/lib/luarocks/rocks-5.3/$_rockname/$_rockver
+ cd "$builddir"
+ make LUA_LIBDIR="$pkgdir"/$(pkg-config --variable=INSTALL_CMOD lua5.3) install
+ mkdir -p "$rockdir"
+ echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
+}
+
+sha512sums="a1d4d077776e57cd878dbcd21656da141ea3686c587b5420a2b039aeaf086b7e7d05d531ee1cc2bbd7d06660d1315b09593e52143f6711f033ce8eecdc550511 luafilesystem-1.7.0.2.tar.gz"