diff --git a/ar.c b/ar.c index bc7739c..6810a71 100644 --- a/ar.c +++ b/ar.c @@ -39,7 +39,7 @@ static int ar_version(lua_State *L) { ////////////////////////////////////////////////////////////////////// LUALIB_API int luaopen_archive(lua_State *L) { - static luaL_reg fns[] = { + static luaL_Reg fns[] = { { "version", ar_version }, { NULL, NULL } }; diff --git a/ar_entry.c b/ar_entry.c index 72056ac..56b13c8 100644 --- a/ar_entry.c +++ b/ar_entry.c @@ -430,13 +430,13 @@ static int ar_entry_pathname(lua_State *L) { ////////////////////////////////////////////////////////////////////// int ar_entry_init(lua_State *L) { - static luaL_reg fns[] = { + static luaL_Reg fns[] = { { "entry", ar_entry }, { "_entry_ref_count", ar_ref_count }, { NULL, NULL } }; // So far there are no methods on the entry objects. - static luaL_reg m_fns[] = { + static luaL_Reg m_fns[] = { { "fflags", ar_entry_fflags }, { "dev", ar_entry_dev }, { "ino", ar_entry_ino }, diff --git a/ar_read.c b/ar_read.c index 39e0812..d20ba75 100644 --- a/ar_read.c +++ b/ar_read.c @@ -317,12 +317,12 @@ static int ar_read_data(lua_State *L) { // of the stack, and the archive{read} metatable is registered. ////////////////////////////////////////////////////////////////////// int ar_read_init(lua_State *L) { - static luaL_reg fns[] = { + static luaL_Reg fns[] = { { "read", ar_read }, { "_read_ref_count", ar_ref_count }, { NULL, NULL } }; - static luaL_reg m_fns[] = { + static luaL_Reg m_fns[] = { { "next_header", ar_read_next_header }, { "headers", ar_read_headers }, { "data", ar_read_data }, diff --git a/ar_write.c b/ar_write.c index 95ed17e..688e6a5 100644 --- a/ar_write.c +++ b/ar_write.c @@ -319,12 +319,12 @@ static int ar_write_data(lua_State *L) { // of the stack, and the archive{write} metatable is registered. ////////////////////////////////////////////////////////////////////// int ar_write_init(lua_State *L) { - static luaL_reg fns[] = { + static luaL_Reg fns[] = { { "write", ar_write }, { "_write_ref_count", ar_ref_count }, { NULL, NULL } }; - static luaL_reg m_fns[] = { + static luaL_Reg m_fns[] = { { "header", ar_write_header }, { "data", ar_write_data }, { "close", ar_write_destroy }, diff --git a/lua-archive-git-1.rockspec b/lua-archive-git-1.rockspec new file mode 100755 index 0000000..8b48bd3 --- /dev/null +++ b/lua-archive-git-1.rockspec @@ -0,0 +1,29 @@ +#!/usr/bin/env lua + +package = 'lua-archive' +version = 'git-1' +source = { + url = 'git://github.com/brimworks/lua-archive' +} + +description = { + summary = "libarchive integration for Lua", + detailed = [[ + lua-archive is a light wrapper for the libarchive library so + all archive file types supported by libarchive can be processed + in Lua. + ]], + homepage = "https://github.com/brimworks/lua-archive/", + license = "MIT" +} +dependencies = { + "lua >= 5.1" +} + +build = { + type = "cmake", + variables = { + INSTALL_CMOD = "$(LIBDIR)", + CMAKE_BUILD_TYPE = "$(CMAKE_BUILD_TYPE)", + } +}