# HG changeset patch # User David Demelier # Date 1474190169 -7200 # Node ID 08a04101159990711781b96dde0b2c4ee55f02e3 # Parent 4f4b9c290395fb1a39f21e292fe6c4661565edc4 CMake: improve installer diff -r 4f4b9c290395 -r 08a041011599 cmake/IrccdPackage.cmake --- a/cmake/IrccdPackage.cmake Sun Sep 18 09:55:56 2016 +0200 +++ b/cmake/IrccdPackage.cmake Sun Sep 18 11:16:09 2016 +0200 @@ -44,4 +44,10 @@ if (WIN32) set(CPACK_GENERATOR "NSIS") + + if (IRCCD_64BITS) + set(CPACK_PACKAGE_FILE_NAME "irccd-${IRCCD_VERSION}-Windows-amd64") + else () + set(CPACK_PACKAGE_FILE_NAME "irccd-${IRCCD_VERSION}-Windows-x86") + endif () endif () diff -r 4f4b9c290395 -r 08a041011599 doc/examples/CMakeLists.txt --- a/doc/examples/CMakeLists.txt Sun Sep 18 09:55:56 2016 +0200 +++ b/doc/examples/CMakeLists.txt Sun Sep 18 11:16:09 2016 +0200 @@ -18,47 +18,24 @@ project(examples) -add_custom_command( - OUTPUT - ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample - ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample - COMMAND - ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample - COMMAND - ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample - DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf - ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf +configure_file( + ${examples_SOURCE_DIR}/irccd.conf.sample + ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf ) -add_custom_target( - docs-examples - DEPENDS - ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccd.conf.sample - ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf.sample - SOURCES - ${CMAKE_CURRENT_SOURCE_DIR}/irccd.conf - ${CMAKE_CURRENT_SOURCE_DIR}/irccdctl.conf - ${CMAKE_CURRENT_SOURCE_DIR}/template-plugin.cpp -) - -set_target_properties( - docs-examples - PROPERTIES - PROJECT_LABEL examples - FOLDER docs -) - -add_dependencies(all-docs docs-examples) - -install( - FILES irccdctl.conf - DESTINATION "${WITH_CONFDIR}" - RENAME "irccdctl.conf.sample" +configure_file( + ${examples_SOURCE_DIR}/irccdctl.conf.sample + ${IRCCD_FAKEROOTDIR}/${WITH_CONFDIR}/irccdctl.conf ) install( - FILES irccd.conf - DESTINATION "${WITH_CONFDIR}" - RENAME "irccd.conf.sample" + FILES + ${examples_SOURCE_DIR}/irccd.conf.sample + ${examples_SOURCE_DIR}/irccdctl.conf.sample + COMPONENT examples + DESTINATION ${WITH_CONFDIR} ) + +setg(CPACK_COMPONENT_EXAMPLES_HIDDEN On) +setg(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Install examples of configuration files") +setg(CPACK_COMPONENT_EXAMPLES_GROUP "Documentation") diff -r 4f4b9c290395 -r 08a041011599 doc/examples/irccd.conf --- a/doc/examples/irccd.conf Sun Sep 18 09:55:56 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -# -# irccd.conf -- config file for irccd -# - -# Section general: -# This section describe global options used by irccd. -# -# [general] -# uid = "nobody" # (string or number) the user id to use (Optional, default: none), -# gid = "nobody" # (string or number) the group id to use (Optional, default: none), -# foreground = false # (bool) set to true to not daemonize (Optional, default: false), -# pidfile = "/tmp/irccd.pid" # (string) path to a file where to store the irccd pid (Optional, default: none). - -[general] -foreground = true - -# Section plugins: -# Load plugins by name or by paths. -# -# [plugins] -# abc = # This will search for abc -# ask = /tmp/ask.js # This use /tmp/ask.js to load the plugin - -[plugins] -history = "" -ask = "" - -# Section identities: -# This describe identities, you can add any number you want they are used with servers so you can reuse an -# identity for one or more servers if you want. -# -# [identity] -# name = "id" # (id) the identity unique id, -# nickname = "foo" # (string) the nickname (Optional, default: irccd), -# username = "bar" # (string) the realname (Optional, default: IRC Client daemon), -# realname = "Jean" # (string) the username name (Optional, default: irccd), -# ctcp-version = "irccd" # (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon), -# ctcp-autoreply = true # (bool) enable auto CTCP VERSION reply, (Optional, default: true). - -[identity] -name = "default" -nickname = "superbot" -username = "superbot" -realname = "Superbot Killer" - -# Section transport: -# You can use transport to wait for any input you want. Unix and internet sockets are supported. Unix are used -# for file based socket while internet bind to standard address plus a specific port. -# -# For internet sockets: -# -# [transport] -# type = "ip" -# port = "1234" # (int) port number, -# address = "*" # (string) address to bind or "*" for any (Optional, default: *), -# family = ( "ipv4", "ipv6" ) # (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4). -# -# For unix sockets: -# -# [transport] -# type = "unix" -# path = "/tmp/irccd.sock" # (string) the file path to the socket. - -[transport] -type = "ip" -address = "*" -port = "5980" -family = "ipv4 ipv6" - -# Section server: -# List of server you want to connect to. A server may use an identity to -# set the username, nickname and so on. A server is registered with a -# unique id that is needed for irccdctl(1). -# -# [server] -# name = "id" # (id) the unique id, -# host = "chat.foo.com" # (string) the server address, -# port = "4321" # (int) the server port (Optional, default: 6667), -# identity = "default" # (string) an identity to use (Optional, default: irccd's default), -# password = "secret" # (string) an optional password (Optional, default: none), -# auto-rejoin = false # (bool) auto rejoin a channel after being kicked (Optional, default: false), -# join-invite = false # (bool) join channels upon invitation (Optional, default: false), -# channels = "" # (list) list of channels to auto join, (Optional, default: empty), -# command-char = "!" # (string) the prefix for invoking special commands (Optional, default: !), -# ssl = false # (bool) enable or disable SSL (Optional, default: false), -# ssl-verify = false # (bool) verify the SSL certificates (Optional, default: true), -# reconnect = true # (bool) enable reconnection after failure (Optional, default: true), -# reconnect-tries = 0 # (int) number of tries before giving up. A value of 0 means indefinitely (Optional, default: 0), -# reconnect-timeout = 5 # (int) number of seconds to wait before retrying (Optional, default: 30). - -[server] -identity = "default" -name = "localhost" -host = "localhost" -port = 6667 -reconnect-timeout = 60 -reconnect-tries = 20 - -# Section rule: -# Add one or more rules to filter IRC events. -# -# servers = "" # (list) a list of servers that will match the rule (Optional, default: empty), -# channels = "" # (list) a list of channel (Optional, default: empty), -# plugins = "" # (list) which plugins (Optional, default: empty), -# events = "" # (list) which events (e.g onCommand, onMessage, ...) (Optional, default: empty), -# action = "" # (string) set to **accept** or **drop**. -# -# Block plugin hangman everywhere. -# -# [rule] -# plugins = "hangman" -# action = drop -# -# Allow it again on #games@localhost -# -# [rule] -# servers = "localhost" -# channels = "#games" -# plugins = "hangman" -# action = accept diff -r 4f4b9c290395 -r 08a041011599 doc/examples/irccd.conf.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/examples/irccd.conf.sample Sun Sep 18 11:16:09 2016 +0200 @@ -0,0 +1,120 @@ +# +# irccd.conf -- config file for irccd +# + +# Section general: +# This section describe global options used by irccd. +# +# [general] +# uid = "nobody" # (string or number) the user id to use (Optional, default: none), +# gid = "nobody" # (string or number) the group id to use (Optional, default: none), +# foreground = false # (bool) set to true to not daemonize (Optional, default: false), +# pidfile = "/tmp/irccd.pid" # (string) path to a file where to store the irccd pid (Optional, default: none). + +[general] +foreground = true + +# Section plugins: +# Load plugins by name or by paths. +# +# [plugins] +# abc = # This will search for abc +# ask = /tmp/ask.js # This use /tmp/ask.js to load the plugin + +[plugins] +history = "" +ask = "" + +# Section identities: +# This describe identities, you can add any number you want they are used with servers so you can reuse an +# identity for one or more servers if you want. +# +# [identity] +# name = "id" # (id) the identity unique id, +# nickname = "foo" # (string) the nickname (Optional, default: irccd), +# username = "bar" # (string) the realname (Optional, default: IRC Client daemon), +# realname = "Jean" # (string) the username name (Optional, default: irccd), +# ctcp-version = "irccd" # (string) what version to respond to CTCP VERSION (Optional, default: IRC Client Daemon), +# ctcp-autoreply = true # (bool) enable auto CTCP VERSION reply, (Optional, default: true). + +[identity] +name = "default" +nickname = "superbot" +username = "superbot" +realname = "Superbot Killer" + +# Section transport: +# You can use transport to wait for any input you want. Unix and internet sockets are supported. Unix are used +# for file based socket while internet bind to standard address plus a specific port. +# +# For internet sockets: +# +# [transport] +# type = "ip" +# port = "1234" # (int) port number, +# address = "*" # (string) address to bind or "*" for any (Optional, default: *), +# family = ( "ipv4", "ipv6" ) # (list) ipv6, ipv4. Both are accepted (Optional, default: ipv4). +# +# For unix sockets: +# +# [transport] +# type = "unix" +# path = "/tmp/irccd.sock" # (string) the file path to the socket. + +[transport] +type = "ip" +address = "*" +port = "5980" +family = "ipv4 ipv6" + +# Section server: +# List of server you want to connect to. A server may use an identity to +# set the username, nickname and so on. A server is registered with a +# unique id that is needed for irccdctl(1). +# +# [server] +# name = "id" # (id) the unique id, +# host = "chat.foo.com" # (string) the server address, +# port = "4321" # (int) the server port (Optional, default: 6667), +# identity = "default" # (string) an identity to use (Optional, default: irccd's default), +# password = "secret" # (string) an optional password (Optional, default: none), +# auto-rejoin = false # (bool) auto rejoin a channel after being kicked (Optional, default: false), +# join-invite = false # (bool) join channels upon invitation (Optional, default: false), +# channels = "" # (list) list of channels to auto join, (Optional, default: empty), +# command-char = "!" # (string) the prefix for invoking special commands (Optional, default: !), +# ssl = false # (bool) enable or disable SSL (Optional, default: false), +# ssl-verify = false # (bool) verify the SSL certificates (Optional, default: true), +# reconnect = true # (bool) enable reconnection after failure (Optional, default: true), +# reconnect-tries = 0 # (int) number of tries before giving up. A value of 0 means indefinitely (Optional, default: 0), +# reconnect-timeout = 5 # (int) number of seconds to wait before retrying (Optional, default: 30). + +[server] +identity = "default" +name = "localhost" +host = "localhost" +port = 6667 +reconnect-timeout = 60 +reconnect-tries = 20 + +# Section rule: +# Add one or more rules to filter IRC events. +# +# servers = "" # (list) a list of servers that will match the rule (Optional, default: empty), +# channels = "" # (list) a list of channel (Optional, default: empty), +# plugins = "" # (list) which plugins (Optional, default: empty), +# events = "" # (list) which events (e.g onCommand, onMessage, ...) (Optional, default: empty), +# action = "" # (string) set to **accept** or **drop**. +# +# Block plugin hangman everywhere. +# +# [rule] +# plugins = "hangman" +# action = drop +# +# Allow it again on #games@localhost +# +# [rule] +# servers = "localhost" +# channels = "#games" +# plugins = "hangman" +# action = accept diff -r 4f4b9c290395 -r 08a041011599 doc/examples/irccdctl.conf --- a/doc/examples/irccdctl.conf Sun Sep 18 09:55:56 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# -# irccdctl.conf -- config file for irccdctl -# - -# Section general: -# This section describe global options used by irccd. -# -# [general] -# verbose = false # (bool) enable verbose message (Optional, default: false). - - -[general] - -# Section connect: -# This section is used to connect to a irccd transport. -# -# For internet sockets: -# -# [connect] -# type = "ip" -# host = "localhost" # (string) host to connect, -# port = "1234" # (int) port number, -# family = "ipv4 ipv6" # (string) internet family: ipv6 or ipv4 (Optional, default: ipv4). -# -# For unix sockets: -# -# [connect] -# type = "unix" -# path = "/tmp/irccd.sock" # (string) the file path to the socket. - -[connect] -type = "ip" -host = "localhost" -port = "5980" diff -r 4f4b9c290395 -r 08a041011599 doc/examples/irccdctl.conf.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/examples/irccdctl.conf.sample Sun Sep 18 11:16:09 2016 +0200 @@ -0,0 +1,34 @@ +# +# irccdctl.conf -- config file for irccdctl +# + +# Section general: +# This section describe global options used by irccd. +# +# [general] +# verbose = false # (bool) enable verbose message (Optional, default: false). + + +[general] + +# Section connect: +# This section is used to connect to a irccd transport. +# +# For internet sockets: +# +# [connect] +# type = "ip" +# host = "localhost" # (string) host to connect, +# port = "1234" # (int) port number, +# family = "ipv4 ipv6" # (string) internet family: ipv6 or ipv4 (Optional, default: ipv4). +# +# For unix sockets: +# +# [connect] +# type = "unix" +# path = "/tmp/irccd.sock" # (string) the file path to the socket. + +[connect] +type = "ip" +host = "localhost" +port = "5980" diff -r 4f4b9c290395 -r 08a041011599 doc/html/CMakeLists.txt --- a/doc/html/CMakeLists.txt Sun Sep 18 09:55:56 2016 +0200 +++ b/doc/html/CMakeLists.txt Sun Sep 18 11:16:09 2016 +0200 @@ -267,3 +267,7 @@ DESTINATION ${WITH_DOCDIR}/js ) endif () + +setg(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation") +setg(CPACK_COMPONENT_DOCS_DESCRIPTION "User guide and JavaScript API.") +setg(CPACK_COMPONENT_DOCS_GROUP "Documentation") diff -r 4f4b9c290395 -r 08a041011599 lib/CMakeLists.txt --- a/lib/CMakeLists.txt Sun Sep 18 09:55:56 2016 +0200 +++ b/lib/CMakeLists.txt Sun Sep 18 11:16:09 2016 +0200 @@ -77,9 +77,11 @@ ARCHIVE DESTINATION lib ) -set(CPACK_COMPONENT_LIBIRCCD_GROUP "Applications") -set(CPACK_COMPONENT_LIBIRCCD_DISPLAY_NAME "Irccd library") -set(CPACK_COMPONENT_LIBIRCCD_DESCRIPTION "Irccd runtime library") +setg(CPACK_COMPONENT_LIBIRCCD_GROUP "Applications") +setg(CPACK_COMPONENT_LIBIRCCD_DISPLAY_NAME "Irccd library") +setg(CPACK_COMPONENT_LIBIRCCD_DESCRIPTION "Irccd runtime library") +setg(CPACK_COMPONENT_LIBIRCCD_REQUIRED On) +setg(CPACK_COMPONENT_LIBIRCCD_HIDDEN On) # # Headers. @@ -156,4 +158,7 @@ COMPONENT pkgconfig DESTINATION ${WITH_PKGCONFIGDIR} ) + + setg(CPACK_COMPONENT_PKGCONFIG_DESCRIPTION "Install .pc pkgconfig file") + setg(CPACK_COMPONENT_PKGCONFIG_GROUP "Development") endif ()