changeset 1149:d0e522ff5143 release-4.0

plugins: substitute version, closes #2533
author David Demelier <markand@malikania.fr>
date Fri, 04 Feb 2022 10:04:04 +0100
parents e904cc1fd718
children 1a1496eeacf4
files cmake/IrccdDefinePlugin.cmake plugins/ask/ask.js plugins/auth/auth.js plugins/hangman/hangman.js plugins/history/history.js plugins/joke/joke.js plugins/logger/logger.js plugins/plugin/plugin.js plugins/roulette/roulette.js plugins/tictactoe/tictactoe.js
diffstat 10 files changed, 20 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/cmake/IrccdDefinePlugin.cmake	Thu Feb 03 13:15:44 2022 +0100
+++ b/cmake/IrccdDefinePlugin.cmake	Fri Feb 04 10:04:04 2022 +0100
@@ -79,7 +79,17 @@
 
 	add_custom_target(irccd-plugin-${PLG_NAME} SOURCES ${PLG_SCRIPT})
 	set_target_properties(irccd-plugin-${PLG_NAME} PROPERTIES FOLDER plugins)
-	install(FILES ${PLG_SCRIPT} DESTINATION ${CMAKE_INSTALL_LIBDIR}/irccd)
+
+	cmake_path(GET PLG_SCRIPT FILENAME filename)
+	configure_file(
+		${PLG_SCRIPT}
+		${CMAKE_CURRENT_BINARY_DIR}/${filename}
+		@ONLY
+	)
+	install(
+		FILES ${CMAKE_CURRENT_BINARY_DIR}/${filename}
+		DESTINATION ${CMAKE_INSTALL_LIBDIR}/irccd
+	)
 
 	if (PLG_MAN)
 		install(
--- a/plugins/ask/ask.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/ask/ask.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "Crazy module for asking a medium",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/auth/auth.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/auth/auth.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "Generic plugin to authenticate to services",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/hangman/hangman.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/hangman/hangman.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "A hangman game for IRC",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/history/history.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/history/history.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "track nickname's history",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/joke/joke.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/joke/joke.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "display some jokes",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/logger/logger.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/logger/logger.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "A plugin to log everything",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/plugin/plugin.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/plugin/plugin.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "A plugin to inspect plugins",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/roulette/roulette.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/roulette/roulette.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "A russian roulette for IRC",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.
--- a/plugins/tictactoe/tictactoe.js	Thu Feb 03 13:15:44 2022 +0100
+++ b/plugins/tictactoe/tictactoe.js	Fri Feb 04 10:04:04 2022 +0100
@@ -21,7 +21,7 @@
 	author: "David Demelier <markand@malikania.fr>",
 	license: "ISC",
 	summary: "A tictactoe game for IRC",
-	version: "@IRCCD_VERSION@"
+	version: "@irccd_VERSION@"
 };
 
 // Modules.