--- a/CMakeLists.txt Thu Mar 04 19:54:57 2010 +0200
+++ b/CMakeLists.txt Sun Mar 14 22:44:29 2010 +0200
@@ -16,6 +16,7 @@
cmake_minimum_required(VERSION 2.6)
project(templatecmd C)
+set(PROJECT_VERSION "0.0.1")
## User settable options
@@ -30,6 +31,7 @@
add_library(templatecmd MODULE templatecmd.c)
## Compiler setup
+configure_file(config.h.in config.h)
include_directories(SYSTEM ${GLIB_INCLUDE_DIRS}
${MCABBER_INCLUDE_DIRS})
target_link_libraries(templatecmd ${GLIB_LIBRARIES}
@@ -39,7 +41,7 @@
## Packaging information
set(CPACK_PACKAGE_NAME libmcabber-templatecmd)
-set(CPACK_PACKAGE_VERSION "0.0.1")
+set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_PACKAGE_VENDOR "IsBear")
set(CPACK_PACKAGE_CONTACT "Myhailo Danylenko <isbear@ukrpost.net>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Temlate commands for mcabber")
--- a/config.h Thu Mar 04 19:54:57 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-
-#ifndef LOCAL_CONFIG_H
-#define LOCAL_CONFIG_H
-
-#define MODULES_ENABLE 1
-
-# endif
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/config.h.in Sun Mar 14 22:44:29 2010 +0200
@@ -0,0 +1,8 @@
+
+#ifndef LOCAL_CONFIG_H
+#define LOCAL_CONFIG_H
+
+#define PROJECT_VERSION ( "${PROJECT_VERSION}" )
+
+#endif
+
--- a/templatecmd.c Thu Mar 04 19:54:57 2010 +0200
+++ b/templatecmd.c Sun Mar 14 22:44:29 2010 +0200
@@ -26,14 +26,33 @@
#include <mcabber/logprint.h>
#include <mcabber/modules.h>
+#include "config.h"
+
static void tcmd_init (void);
static void tcmd_uninit (void);
+#define DESCRIPTION ( "Templated commands\nProvides command /templatecmd (and any commands, you define with it)" )
+
+static module_info_t info_templatecmd_experimental = {
+ .branch = "experimental",
+ .api = 5,
+ .version = PROJECT_VERSION,
+ .description = DESCRIPTION,
+ .requires = NULL,
+ .init = tcmd_init,
+ .uninit = tcmd_uninit,
+ .next = NULL,
+};
+
module_info_t info_templatecmd = {
- .mcabber_version = "0.10.0",
- .requires = NULL,
- .init = tcmd_init,
- .uninit = tcmd_uninit,
+ .branch = "dev",
+ .api = 4,
+ .version = PROJECT_VERSION,
+ .description = DESCRIPTION,
+ .requires = NULL,
+ .init = tcmd_init,
+ .uninit = tcmd_uninit,
+ .next = &info_templatecmd_experimental,
};
typedef struct {