Use new module info strut with api version
authorMyhailo Danylenko <isbear@ukrpost.net>
Sun, 14 Mar 2010 23:14:37 +0200
changeset 9 70bb1e988a4a
parent 8 2033d1c5d226
child 10 14987412be3b
Use new module info strut with api version
CMakeLists.txt
config.h
config.h.in
yaubil.c
--- a/CMakeLists.txt	Thu Mar 04 19:56:16 2010 +0200
+++ b/CMakeLists.txt	Sun Mar 14 23:14:37 2010 +0200
@@ -16,6 +16,7 @@
 
 cmake_minimum_required(VERSION 2.6) 
 project(yaubil C) 
+set(PROJECT_VERSION "0.0.1")
 
 ## User settable options
  
@@ -30,6 +31,7 @@
 add_library(yaubil MODULE yaubil.c) 
 
 ## Compiler setup
+configure_file(config.h.in config.h)
 include_directories(SYSTEM ${GLIB_INCLUDE_DIRS} 
                     ${MCABBER_INCLUDE_DIRS})
 target_link_libraries(yaubil ${GLIB_LIBRARIES} 
@@ -39,7 +41,7 @@
 
 ## Packaging information
 set(CPACK_PACKAGE_NAME libmcabber-yaubil)
-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 "Mcabber's Yet Another Useless Built-In Language")
--- a/config.h	Thu Mar 04 19:56:16 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 23:14:37 2010 +0200
@@ -0,0 +1,8 @@
+
+#ifndef LOCAL_CONFIG_H
+#define LOCAL_CONFIG_H
+
+#define PROJECT_VERSION ( "${PROJECT_VERSION}" )
+
+#endif
+
--- a/yaubil.c	Thu Mar 04 19:56:16 2010 +0200
+++ b/yaubil.c	Sun Mar 14 23:14:37 2010 +0200
@@ -28,14 +28,33 @@
 #include <mcabber/settings.h>
 #include <mcabber/modules.h>
 
+#include "config.h"
+
 static void yaubil_init   (void);
 static void yaubil_uninit (void);
 
+#define DESCRIPTION ( "Yet Another Useless Built-In Language\nProvides commands /multi, /if, /then, /else, /eval, /let" )
+
+static module_info_t info_yaubil_experimental = {
+	.branch      = "experimental",
+	.api         = 5,
+	.version     = PROJECT_VERSION,
+	.description = DESCRIPTION,
+	.requires    = NULL,
+	.init        = yaubil_init,
+	.uninit      = yaubil_uninit,
+	.next        = NULL,
+};
+
 module_info_t info_yaubil = {
-	.mcabber_version = "0.10.0",
-	.requires        = NULL,
-	.init            = yaubil_init,
-	.uninit          = yaubil_uninit,
+	.branch      = "dev",
+	.api         = 4,
+	.version     = PROJECT_VERSION,
+	.description = DESCRIPTION,
+	.requires    = NULL,
+	.init        = yaubil_init,
+	.uninit      = yaubil_uninit,
+	.next        = &info_yaubil_experimental,
 };
 
 static gboolean ifresult = TRUE;