# HG changeset patch # User Myhailo Danylenko # Date 1268597417 -7200 # Node ID f2f4c7810a7222e22ab1d14a2ea9ed362187e1b7 # Parent 0379139a20039853428fc18d368f6d2b55d37cb4 Use new module struct with api version diff -r 0379139a2003 -r f2f4c7810a72 CMakeLists.txt --- a/CMakeLists.txt Thu Mar 11 19:35:18 2010 +0200 +++ b/CMakeLists.txt Sun Mar 14 22:10:17 2010 +0200 @@ -17,6 +17,7 @@ cmake_minimum_required(VERSION 2.6) project(lua C) +set(PROJECT_VERSION "0.0.1") ## User options option(DEBUG "Enable debugging output" ON) @@ -61,7 +62,7 @@ ## Packaging information set(CPACK_PACKAGE_NAME libmcabber-lua) -set(CPACK_PACKAGE_VERSION "0.0.1") +set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) set(CPACK_PACKAGE_VENDOR "IsBear") set(CPACK_PACKAGE_CONTACT "Myhailo Danylenko ") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mcabber lua module") diff -r 0379139a2003 -r f2f4c7810a72 config.h.in --- a/config.h.in Thu Mar 11 19:35:18 2010 +0200 +++ b/config.h.in Sun Mar 14 22:10:17 2010 +0200 @@ -34,6 +34,8 @@ // priority of glib event sources for timeout and bgread #define MLUA_SOURCE_PRIORITY ( ${ML_SOURCE_PRIORITY} ) +#define PROJECT_VERSION ( "${PROJECT_VERSION}" ) + #ifdef DEBUG # include diff -r 0379139a2003 -r f2f4c7810a72 main.c --- a/main.c Thu Mar 11 19:35:18 2010 +0200 +++ b/main.c Sun Mar 14 22:10:17 2010 +0200 @@ -46,11 +46,38 @@ static void mlua_init (void); static void mlua_uninit (void); +#ifdef LLM_LOG_HANDLER +#define DESCRIPTION ( \ + "Lua scripting interface\n" \ + "Recognizes options lua_init_file, lua_hook_function and lua_lm_debug\n" \ + "Provides command /lua" ) +#else +#define DESCRIPTION ( \ + "Lua scripting interface\n" \ + "Recognizes options lua_init_file and lua_hook_function\n" \ + "Provides command /lua" ) +#endif + +static module_info_t info_lua_experimental = { + .branch = "experimental", + .api = 5, + .version = PROJECT_VERSION, + .description = DESCRIPTION, + .requires = NULL, + .init = mlua_init, + .uninit = mlua_uninit, + .next = NULL, +}; + module_info_t info_lua = { - .mcabber_version = "0.10.0", - .requires = NULL, - .init = mlua_init, - .uninit = mlua_uninit, + .branch = "dev", + .api = 4, + .version = PROJECT_VERSION, + .description = DESCRIPTION, + .requires = NULL, + .init = mlua_init, + .uninit = mlua_uninit, + .next = &info_lua_experimental, }; // global lua state object, necessary for uninitialization function