diff options
author | Deposite Pirate | 2018-09-16 23:29:24 +0200 |
---|---|---|
committer | Deposite Pirate | 2018-09-16 23:29:24 +0200 |
commit | 569e598d38adb1918d127ee31af1cd332b072dcf (patch) | |
tree | 23a7204866591100db57f3acac53cd410ea8d3e4 /uhub/0001-Install-man-pages.patch |
Diffstat (limited to 'uhub/0001-Install-man-pages.patch')
-rw-r--r-- | uhub/0001-Install-man-pages.patch | 206 |
1 files changed, 206 insertions, 0 deletions
diff --git a/uhub/0001-Install-man-pages.patch b/uhub/0001-Install-man-pages.patch new file mode 100644 index 0000000..04bdf66 --- /dev/null +++ b/uhub/0001-Install-man-pages.patch @@ -0,0 +1,206 @@ +From ecefce8b7466e4866a47587df4a1364f4f250c5e Mon Sep 17 00:00:00 2001 +From: "Christoph J. Thompson" <cjsthompson@gmail.com> +Date: Sat, 13 Dec 2014 22:08:00 +0100 +Subject: [PATCH 1/5] * Install man pages * Support multilib distros such as + fedora/slackware + + modified: CMakeLists.txt + renamed: doc/plugins.conf -> doc/plugins.conf.in +--- + CMakeLists.txt | 14 ++++++++--- + doc/plugins.conf | 72 ----------------------------------------------------- + doc/plugins.conf.in | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 82 insertions(+), 76 deletions(-) + delete mode 100644 doc/plugins.conf + create mode 100644 doc/plugins.conf.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2f3941d..80a1a85 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,6 +22,12 @@ option(USE_OPENSSL "Use OpenSSL's SSL support" ON ) + option(SYSTEMD_SUPPORT "Enable systemd notify and journal logging" OFF) + option(ADC_STRESS "Enable the stress tester client" OFF) + ++set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") ++set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") ++set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages") ++ ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doc/plugins.conf.in plugins.conf @ONLY) ++ + find_package(Git) + find_package(Sqlite3) + +@@ -240,9 +246,9 @@ if (LOWLEVEL_DEBUG) + endif() + + if (UNIX) +- install( TARGETS uhub uhub-passwd RUNTIME DESTINATION bin ) +- install( TARGETS mod_example mod_welcome mod_logging mod_auth_simple mod_auth_sqlite mod_chat_history mod_chat_history_sqlite mod_chat_only mod_topic mod_no_guest_downloads DESTINATION /usr/lib/uhub/ OPTIONAL ) +- install( FILES ${CMAKE_SOURCE_DIR}/doc/uhub.conf ${CMAKE_SOURCE_DIR}/doc/plugins.conf ${CMAKE_SOURCE_DIR}/doc/rules.txt ${CMAKE_SOURCE_DIR}/doc/motd.txt DESTINATION /etc/uhub OPTIONAL ) ++ install( TARGETS uhub uhub-passwd RUNTIME DESTINATION ${INSTALL_BIN_DIR} ) ++ install( TARGETS mod_example mod_welcome mod_logging mod_auth_simple mod_auth_sqlite mod_chat_history mod_chat_history_sqlite mod_chat_only mod_topic mod_no_guest_downloads DESTINATION ${INSTALL_LIB_DIR}/uhub/ OPTIONAL ) ++ install( FILES ${CMAKE_SOURCE_DIR}/doc/uhub.conf ${CMAKE_SOURCE_DIR}/plugins.conf ${CMAKE_SOURCE_DIR}/doc/rules.txt ${CMAKE_SOURCE_DIR}/doc/motd.txt DESTINATION /etc/uhub/ OPTIONAL ) ++ install( FILES ${CMAKE_SOURCE_DIR}/doc/uhub.1 ${CMAKE_SOURCE_DIR}/doc/uhub-passwd.1 DESTINATION ${INSTALL_MAN_DIR}/man1/ OPTIONAL ) + endif() + +- +diff --git a/doc/plugins.conf b/doc/plugins.conf +deleted file mode 100644 +index 6e5a9a0..0000000 +--- a/doc/plugins.conf ++++ /dev/null +@@ -1,72 +0,0 @@ +-# ATTENTION! +-# Plugins are invoked in the order of listing in the plugin config file. +- +- +-# Sqlite based user authentication. +-# +-# This plugin provides a Sqlite based authentication database for +-# registered users. +-# Use the uhub-passwd utility to create the database and add/remove users. +-# +-# Parameters: +-# file: path/filename for database. +-# +-plugin /usr/lib/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db" +- +-# Topic commands. +-# Note: "topic" == "hub description" (as configured in uhub.conf) +-# +-# !topic - change the topic (op required) +-# !showtopic - show the topic +-# !resettopic - reset the topic to the default (op required) +-# +-# This plugins takes no parameters. +-#plugin /usr/lib/uhub/mod_topic.so +- +-# Log file writer +-# +-# Parameters: +-# file: path/filename for log file. +-# syslog: if true then syslog is used instead of writing to a file (Unix only) +-plugin /usr/lib/uhub/mod_logging.so "file=/var/log/uhub.log" +- +-# A simple example plugin +-#plugin /usr/lib/uhub/mod_example.so +- +-# A plugin sending a welcome message. +-# +-# This plugin provides the following commands: +-# !motd - Message of the day +-# !rules - Show hub rules. +-# +-# Parameters: +-# motd: path/filename for the welcome message (message of the day) +-# rules: path/filenam for the rules file +-# +-# NOTE: The files MUST exist, however if you do not wish to provide one then these parameters can be omitted. +-# +-# The motd/rules files can do the following substitutions: +-# %n - Nickname of the user who entered the hub or issued the command. +-# %a - IP address of the user +-# %c - The credentials of the user (guest, user, op, super, admin). +-# %% - Becomes '%' +-# %H - Hour 24-hour format (00-23) (Hub local time) +-# %I - Hour 12-hour format (01-12) (Hub local time) +-# %P - 'AM' or 'PM' +-# %p - 'am' or 'pm' +-# %M - Minutes (00-59) (Hub local time) +-# %S - Seconds (00-60) (Hub local time) +-plugin /usr/lib/uhub/mod_welcome.so "motd=/etc/uhub/motd.txt rules=/etc/uhub/rules.txt" +- +-# Load the chat history plugin. +-# +-# This plugin provides chat history when users are connecting, or +-# when users invoke the !history command. +-# The history command can optionally take a parameter to indicate how many lines of history is requested. +-# +-# Parameters: +-# history_max: the maximum number of messages to keep in history +-# history_default: when !history is provided without arguments, then this default number of messages are returned. +-# history_connect: the number of chat history messages to send when users connect (0 = do not send any history) +-plugin /usr/lib/uhub/mod_chat_history.so "history_max=200 history_default=10 history_connect=5" +- +diff --git a/doc/plugins.conf.in b/doc/plugins.conf.in +new file mode 100644 +index 0000000..873abcd +--- /dev/null ++++ b/doc/plugins.conf.in +@@ -0,0 +1,72 @@ ++# ATTENTION! ++# Plugins are invoked in the order of listing in the plugin config file. ++ ++ ++# Sqlite based user authentication. ++# ++# This plugin provides a Sqlite based authentication database for ++# registered users. ++# Use the uhub-passwd utility to create the database and add/remove users. ++# ++# Parameters: ++# file: path/filename for database. ++# ++plugin @INSTALL_LIB_DIR@/uhub/mod_auth_sqlite.so "file=/etc/uhub/users.db" ++ ++# Topic commands. ++# Note: "topic" == "hub description" (as configured in uhub.conf) ++# ++# !topic - change the topic (op required) ++# !showtopic - show the topic ++# !resettopic - reset the topic to the default (op required) ++# ++# This plugins takes no parameters. ++#plugin @INSTALL_LIB_DIR@/uhub/mod_topic.so ++ ++# Log file writer ++# ++# Parameters: ++# file: path/filename for log file. ++# syslog: if true then syslog is used instead of writing to a file (Unix only) ++plugin @INSTALL_LIB_DIR@/uhub/mod_logging.so "file=/var/log/uhub.log" ++ ++# A simple example plugin ++#plugin @INSTALL_LIB_DIR@/uhub/mod_example.so ++ ++# A plugin sending a welcome message. ++# ++# This plugin provides the following commands: ++# !motd - Message of the day ++# !rules - Show hub rules. ++# ++# Parameters: ++# motd: path/filename for the welcome message (message of the day) ++# rules: path/filenam for the rules file ++# ++# NOTE: The files MUST exist, however if you do not wish to provide one then these parameters can be omitted. ++# ++# The motd/rules files can do the following substitutions: ++# %n - Nickname of the user who entered the hub or issued the command. ++# %a - IP address of the user ++# %c - The credentials of the user (guest, user, op, super, admin). ++# %% - Becomes '%' ++# %H - Hour 24-hour format (00-23) (Hub local time) ++# %I - Hour 12-hour format (01-12) (Hub local time) ++# %P - 'AM' or 'PM' ++# %p - 'am' or 'pm' ++# %M - Minutes (00-59) (Hub local time) ++# %S - Seconds (00-60) (Hub local time) ++plugin @INSTALL_LIB_DIR@/uhub/mod_welcome.so "motd=/etc/uhub/motd.txt rules=/etc/uhub/rules.txt" ++ ++# Load the chat history plugin. ++# ++# This plugin provides chat history when users are connecting, or ++# when users invoke the !history command. ++# The history command can optionally take a parameter to indicate how many lines of history is requested. ++# ++# Parameters: ++# history_max: the maximum number of messages to keep in history ++# history_default: when !history is provided without arguments, then this default number of messages are returned. ++# history_connect: the number of chat history messages to send when users connect (0 = do not send any history) ++plugin @INSTALL_LIB_DIR@/uhub/mod_chat_history.so "history_max=200 history_default=10 history_connect=5" ++ +-- +2.1.3 + |