changeset 1139:2e09e46de490

man: improvements
author David Demelier <markand@malikania.fr>
date Thu, 03 Feb 2022 12:46:16 +0100
parents be767bfa5c2e
children 206bf06a6bea
files CMakeLists.txt man/CMakeLists.txt man/irccd-api-plugin.3 man/irccd-api-rule.3 man/irccd-api.3 man/libirccd.3
diffstat 6 files changed, 23 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Wed Feb 02 21:51:42 2022 +0100
+++ b/CMakeLists.txt	Thu Feb 03 12:46:16 2022 +0100
@@ -62,6 +62,7 @@
 option(IRCCD_WITH_TESTS "Enable unit tests" On)
 option(IRCCD_WITH_PKGCONFIG "Enable installation of pkg-config file" On)
 
+set(IRCCD_MAN_DATE "February 3, 2022")
 set(IRCCD_WITH_UID "irccd" CACHE STRING "Default uid to run irccd as")
 set(IRCCD_WITH_GID "irccd" CACHE STRING "Default gid to run irccd as")
 set(IRCCD_WITH_PKGCONFIGDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
--- a/man/CMakeLists.txt	Wed Feb 02 21:51:42 2022 +0100
+++ b/man/CMakeLists.txt	Thu Feb 03 12:46:16 2022 +0100
@@ -72,7 +72,18 @@
 		${MANPAGES_7}
 )
 
-install(FILES ${MANPAGES_1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
-install(FILES ${MANPAGES_3} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3)
-install(FILES ${MANPAGES_5} DESTINATION ${CMAKE_INSTALL_MANDIR}/man5)
-install(FILES ${MANPAGES_7} DESTINATION ${CMAKE_INSTALL_MANDIR}/man7)
+function(process section files)
+	foreach (m ${MANPAGES_${section}})
+		cmake_path(GET m FILENAME base)
+		configure_file(${m} ${CMAKE_BINARY_DIR}/${base} @ONLY)
+		install(
+			FILES ${CMAKE_BINARY_DIR}/${base}
+			DESTINATION ${CMAKE_INSTALL_MANDIR}/man${section}
+		)
+	endforeach ()
+endfunction()
+
+process(1 "${MANPAGES_1}")
+process(3 "${MANPAGES_3}")
+process(5 "${MANPAGES_5}")
+process(7 "${MANPAGES_7}")
--- a/man/irccd-api-plugin.3	Wed Feb 02 21:51:42 2022 +0100
+++ b/man/irccd-api-plugin.3	Thu Feb 03 12:46:16 2022 +0100
@@ -43,17 +43,11 @@
 .Pp
 .Bl -tag
 .It Va config No (Object)
-Contains the
-.Va [plugin.<name>]
-section.
+Contains the plugin options.
 .It Va paths No (Object)
-Contains the
-.Va [paths.<name>]
-section.
+Contains the plugin paths.
 .It Va templates No (Object)
-Contains the
-.Va [templates.<name>]
-section.
+Contains the plugin templates.
 .El
 .\" METHODS
 .Sh METHODS
--- a/man/irccd-api-rule.3	Wed Feb 02 21:51:42 2022 +0100
+++ b/man/irccd-api-rule.3	Thu Feb 03 12:46:16 2022 +0100
@@ -43,7 +43,7 @@
 .It Va servers No (array)
 List of servers to match as array of strings targeting server identifiers.
 .It Va channels No (array)
-List of channels to match
+List of channels to match.
 .It Va origins No (array)
 List of origins (the full nickname and user hostname) to match.
 .It Va events No (array)
--- a/man/irccd-api.3	Wed Feb 02 21:51:42 2022 +0100
+++ b/man/irccd-api.3	Thu Feb 03 12:46:16 2022 +0100
@@ -67,7 +67,7 @@
 Javascript will let you test its presence.
 .Pp
 An example of plugin can be found at
-.Pa @CMAKE_INSTALL_FULL_DATADIR@/irccd/sample-plugin.js
+.Pa @CMAKE_INSTALL_FULL_DOCDIR@/sample-plugin.js
 .\" INFO
 .Sh INFO
 The global
--- a/man/libirccd.3	Wed Feb 02 21:51:42 2022 +0100
+++ b/man/libirccd.3	Thu Feb 03 12:46:16 2022 +0100
@@ -76,7 +76,7 @@
 issue, every symbol or macros are prefixed by irc_ or IRC_.
 .Pp
 An example of plugin can be found at
-.Pa @CMAKE_INSTALL_FULL_DATADIR@/irccd/sample-plugin.c
+.Pa @CMAKE_INSTALL_FULL_DOCDIR@/sample-plugin.c
 .\" PLUGIN INTERFACE
 .Sh PLUGIN INTERFACE
 To be opened by
@@ -203,6 +203,7 @@
 .El
 .\" SEE ALSO
 .Sh SEE ALSO
+.Xr irccd-cmake 7 ,
 .Xr libirccd-channel 3 ,
 .Xr libirccd-compat 3 ,
 .Xr libirccd-event 3 ,