summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOscar Lim <olim@ucla.edu>2016-02-11 00:08:22 -0800
committerOscar Lim <olim@ucla.edu>2016-02-11 00:45:50 -0800
commit43d16e123da847a371f8fafb1b795ba9405127cf (patch)
tree821f7bc43778cc0a13d5424e6aaab8a8937b889a
parent7499b422e3f07bf25704cbf7989e845f89697fa8 (diff)
downloadluasystem-43d16e123da847a371f8fafb1b795ba9405127cf.zip
Release v0.1.0v0.1.0
-rw-r--r--luasystem-0.1.0-0.rockspec47
-rw-r--r--src/core.c5
2 files changed, 52 insertions, 0 deletions
diff --git a/luasystem-0.1.0-0.rockspec b/luasystem-0.1.0-0.rockspec
new file mode 100644
index 0000000..a1a322f
--- /dev/null
+++ b/luasystem-0.1.0-0.rockspec
@@ -0,0 +1,47 @@
+package = 'luasystem'
+version = '0.1.0-0'
+source = {
+ url = "https://github.com/o-lim/luasystem/archive/v0.1.0.tar.gz",
+ dir = "luasystem-0.1.0"
+}
+description = {
+ summary = 'Platform independent system calls for Lua.',
+ detailed = [[
+ Adds a Lua API for making platform independent system calls.
+ ]],
+ homepage = 'http://olivinelabs.com/luasystem/',
+ license = 'MIT <http://opensource.org/licenses/MIT>'
+}
+dependencies = {
+ 'lua >= 5.1',
+}
+
+local function make_platform(plat)
+ local defines = {
+ unix = { },
+ macosx = { },
+ win32 = { },
+ mingw32 = { "WINVER=0x0501" },
+ }
+ return {
+ modules = {
+ ['system.core'] = {
+ sources = { 'src/core.c', 'src/compat.c', 'src/time.c', },
+ defines = defines[plat],
+ },
+ },
+ }
+end
+
+build = {
+ type = 'builtin',
+ platforms = {
+ unix = make_platform('unix'),
+ macosx = make_platform('macosx'),
+ win32 = make_platform('win32'),
+ mingw32 = make_platform('mingw32'),
+ },
+ modules = {
+ ['system.init'] = 'system/init.lua',
+ },
+}
diff --git a/src/core.c b/src/core.c
index d2acb95..31e768b 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1,6 +1,8 @@
#include <lua.h>
#include <lauxlib.h>
+#define LUASYSTEM_VERSION "LuaSystem 0.1.0"
+
#ifdef _WIN32
#define LUAEXPORT __declspec(dllexport)
#else
@@ -14,6 +16,9 @@ void time_open(lua_State *L);
*-------------------------------------------------------------------------*/
LUAEXPORT int luaopen_system_core(lua_State *L) {
lua_newtable(L);
+ lua_pushstring(L, "_VERSION");
+ lua_pushstring(L, LUASYSTEM_VERSION);
+ lua_rawset(L, -3);
time_open(L);
return 1;
}