changeset 1113:c7c3bc804223

examples: install irccd.conf.sample
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 10:15:46 +0200
parents 2cde6684b536
children cda2076a7ece
files examples/CMakeLists.txt examples/irccd.conf.sample irccd/irccd.conf
diffstat 3 files changed, 152 insertions(+), 146 deletions(-) [+]
line wrap: on
line diff
--- a/examples/CMakeLists.txt	Wed Oct 27 10:11:43 2021 +0200
+++ b/examples/CMakeLists.txt	Wed Oct 27 10:15:46 2021 +0200
@@ -19,11 +19,17 @@
 project(examples)
 
 set(
-	FILES
+	CONFIGS
+	${examples_SOURCE_DIR}/irccd.conf.sample
+)
+
+set(
+	PLUGINS
 	${examples_SOURCE_DIR}/sample-plugin.c
 	${examples_SOURCE_DIR}/sample-plugin.js
 )
 
-add_custom_target(doc SOURCES ${FILES})
-install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR})
-source_group("" FILES ${FILES})
+add_custom_target(doc SOURCES ${CONFIGS} ${PLUGINS})
+install(FILES ${CONFIGS} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR})
+install(FILES ${PLUGINS} DESTINATION ${CMAKE_INSTALL_DOCDIR})
+source_group("" FILES ${CONFIGS} ${PLUGINS})
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/irccd.conf.sample	Wed Oct 27 10:15:46 2021 +0200
@@ -0,0 +1,142 @@
+#
+# This is an example of irccd.conf file.
+#
+# Comments start with a '#' like this header and until ends at the end of line.
+#
+# See the irccd.conf(5) manual page for details of the file syntax and
+# available options.
+#
+
+#
+# logs
+# ----------------------------------------------------------------------
+#
+# You can configure verbosity and adapter which can be console to log to
+# stdout/stderr, syslog for system logging or a unique file.
+#
+# Default is non-verbose on console
+
+logs to console
+
+#
+# Verbose on syslog:
+# logs verbose to syslog
+#
+# Explicitly quiet to a file:
+# logs quiet to file "/var/log/irccd/messages"
+#
+
+#
+# transport
+# ----------------------------------------------------------------------
+#
+# Enable irccd control through a UNIX domain socket via TCP. This is required
+# for the irccdctl utility.
+#
+# You must use a quoted string because the parser does not understand a string
+# starting with a '/' yet.
+#
+
+transport to "/tmp/irccd.sock"
+
+#
+# You can use user/group with both names instead of numeric literals.
+# transport to "/tmp/irccd.sock" with uid "www" gid "www"
+# transport to "/tmp/irccd.sock" with uid 1000 gid "users"
+#
+
+#
+# server
+# ----------------------------------------------------------------------
+#
+# Connect to an IRC server. Create a block for every server you want irccd to
+# connect to.
+#
+# The options `hostname', `port' and `ident' are required.
+#
+# It is recommended to put quotes around the server identifiers to avoid
+# colliding with syntax keywords.
+#
+# server "example" {
+#   hostname "example.org";     # Quotes are preferred.
+#   port 6667;                  # Don't use quotes, it's a number.
+#   ident "frc" "frc" "frc";    # Nickname, Username and Real name. There are no
+#                               # comma because it's not a list.
+#   ssl;                        # Set to enable SSL.
+#   channels "#test", "#staff"; # List of channels to join.
+#   options AUTO-REJOIN;        # Enable auto-rejoin after a kick.
+#   prefix "!";                 # Prefix for invoking plugins.
+#   ctcp {
+#     version "my version";     # Custom CTCP VERSION reply.
+#     source "my SCM location"; # Custom CTCP SOURCE reply.
+#   }
+# }
+#
+
+#
+# rule
+# ----------------------------------------------------------------------
+#
+# Create rules to filter plugins and their usage depending on criteria. They are
+# evaluated in order they are defined. An empty block match every event.
+#
+# This rule drop *everything*.
+# rule drop
+#
+# This rule `reallows' plugins hangman on channel #games and #test from the
+# server example.
+#
+# rule accept {
+#   servers "example";
+#   plugins "hangman";
+#   channels "#test", "#games";
+# }
+#
+
+#
+# hooks
+# ----------------------------------------------------------------------
+#
+# Hooks are independant approach to capturing events. They are invoked as-is
+# from irccd upon a new event. They can be written in any language as long as
+# they are executable. They can't be filtered through rules.
+#
+# hook "notify" to "/usr/local/bin/myscript.sh"
+#
+
+#
+# plugins
+# ----------------------------------------------------------------------
+#
+# Load Javascript and native C plugins. The block options is optional, if not
+# present the plugin is searched through a standard set of directories.
+#
+# It is recommended to put quotes around the plugin identifiers to avoid
+# colliding with syntax keywords.
+#
+# This will load the plugin `ask' from default path and default options.
+# plugin "ask"
+#
+# This will load the plugin `hangman' and set custom configuration options and
+# templates.
+# plugin "hangman" {
+#   config {
+#     "collaborative" "false";
+#   }
+#   templates {
+#     "win" "Congrats #{nickname}, you found #{word}";
+#   }
+# }
+#
+# This will load a plugin `custom' with a custom location and override its
+# paths.
+# plugin "custom" {
+#   location "/opt/custom.js";
+#
+#   paths {
+#     "data" "/opt/custom/data";
+#     "cache" "/opt/custom/cache";
+#     "config" "/opt/custom";
+#   }
+# }
+#
--- a/irccd/irccd.conf	Wed Oct 27 10:11:43 2021 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-#
-# This is an example of irccd.conf file.
-#
-# Comments start with a '#' like this header and until ends at the end of line.
-#
-# See the irccd.conf(5) manual page for details of the file syntax and
-# available options.
-#
-
-#
-# logs
-# ----------------------------------------------------------------------
-#
-# You can configure verbosity and adapter which can be console to log to
-# stdout/stderr, syslog for system logging or a unique file.
-#
-# Default is non-verbose on console
-
-logs to console
-
-#
-# Verbose on syslog:
-# logs verbose to syslog
-#
-# Explicitly quiet to a file:
-# logs quiet to file "/var/log/irccd/messages"
-#
-
-#
-# transport
-# ----------------------------------------------------------------------
-#
-# Enable irccd control through a UNIX domain socket via TCP. This is required
-# for the irccdctl utility.
-#
-# You must use a quoted string because the parser does not understand a string
-# starting with a '/' yet.
-#
-
-transport to "/tmp/irccd.sock"
-
-#
-# You can use user/group with both names instead of numeric literals.
-# transport to "/tmp/irccd.sock" with uid "www" gid "www"
-# transport to "/tmp/irccd.sock" with uid 1000 gid "users"
-#
-
-#
-# server
-# ----------------------------------------------------------------------
-#
-# Connect to an IRC server. Create a block for every server you want irccd to
-# connect to.
-#
-# The options `hostname', `port' and `ident' are required.
-#
-# It is recommended to put quotes around the server identifiers to avoid
-# colliding with syntax keywords.
-#
-# server "example" {
-#   hostname "example.org";     # Quotes are preferred.
-#   port 6667;                  # Don't use quotes, it's a number.
-#   ident "frc" "frc" "frc";    # Nickname, Username and Real name. There are no
-#                               # comma because it's not a list.
-#   ssl;                        # Set to enable SSL.
-#   channels "#test", "#staff"; # List of channels to join.
-#   options AUTO-REJOIN;        # Enable auto-rejoin after a kick.
-#   prefix "!";                 # Prefix for invoking plugins.
-#   ctcp {
-#     version "my version";     # Custom CTCP VERSION reply.
-#     source "my SCM location"; # Custom CTCP SOURCE reply.
-#   }
-# }
-#
-
-#
-# rule
-# ----------------------------------------------------------------------
-#
-# Create rules to filter plugins and their usage depending on criteria. They are
-# evaluated in order they are defined. An empty block match every event.
-#
-# This rule drop *everything*.
-# rule drop
-#
-# This rule `reallows' plugins hangman on channel #games and #test from the
-# server example.
-#
-# rule accept {
-#   servers "example";
-#   plugins "hangman";
-#   channels "#test", "#games";
-# }
-#
-
-#
-# hooks
-# ----------------------------------------------------------------------
-#
-# Hooks are independant approach to capturing events. They are invoked as-is
-# from irccd upon a new event. They can be written in any language as long as
-# they are executable. They can't be filtered through rules.
-#
-# hook "notify" to "/usr/local/bin/myscript.sh"
-#
-
-#
-# plugins
-# ----------------------------------------------------------------------
-#
-# Load Javascript and native C plugins. The block options is optional, if not
-# present the plugin is searched through a standard set of directories.
-#
-# It is recommended to put quotes around the plugin identifiers to avoid
-# colliding with syntax keywords.
-#
-# This will load the plugin `ask' from default path and default options.
-# plugin "ask"
-#
-# This will load the plugin `hangman' and set custom configuration options and
-# templates.
-# plugin "hangman" {
-#   config {
-#     "collaborative" "false";
-#   }
-#   templates {
-#     "win" "Congrats #{nickname}, you found #{word}";
-#   }
-# }
-#
-# This will load a plugin `custom' with a custom location and override its
-# paths.
-# plugin "custom" {
-#   location "/opt/custom.js";
-#
-#   paths {
-#     "data" "/opt/custom/data";
-#     "cache" "/opt/custom/cache";
-#     "config" "/opt/custom";
-#   }
-# }
-#