From 95a2c2fca24113bea9f52b64149c2cc63d0ba1c9 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 3 Mar 2023 14:24:31 +0100 Subject: [PATCH] Update docs and build manpage on build process --- CMakeLists.txt | 5 +++-- docs/help/index.md | 4 ++-- docs/manpage/lsyncd.1 | 6 +++--- docs/manpage/lsyncd.1.txt | 8 ++++++-- flake.nix | 12 ++++++++---- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 68d01bf..e69cbc6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,7 +91,8 @@ add_custom_command( OUTPUT defaults.out # the manpage add_custom_target( manpage COMMAND ${CMAKE_COMMAND} -E echo "Updating the manpage" - COMMAND a2x --format=manpage docs/manpage/lsyncd.1.txt + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/man + COMMAND a2x --format=manpage ${PROJECT_SOURCE_DIR}/docs/manpage/lsyncd.1.txt -D ${CMAKE_CURRENT_BINARY_DIR}/man DEPENDS docs/manpage/lsyncd.1.txt ) @@ -136,6 +137,6 @@ add_executable( lsyncd ${LSYNCD_SRC} ) target_link_libraries( lsyncd ${LUA_LIBRARIES} ) install( TARGETS lsyncd RUNTIME DESTINATION bin ) -install( FILES docs/manpage/lsyncd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT man ) +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/man/lsyncd.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT man ) install( DIRECTORY examples DESTINATION doc ) install( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION doc OPTIONAL) diff --git a/docs/help/index.md b/docs/help/index.md index 2b2b69a..a555659 100644 --- a/docs/help/index.md +++ b/docs/help/index.md @@ -9,7 +9,7 @@ There is a [discussion group to all things related Lsyncd](https://groups.google Issues ------ -For cases Lsyncd is missbehaving there are [Issues](https://github.com/axkibe/lsyncd/issues) on Github. +For cases Lsyncd is missbehaving there are [Issues](https://github.com/lsyncd/lsyncd/issues) on Github. Please check: @@ -19,4 +19,4 @@ Please check: Source & Improvement -------------------- -[Fork Lsyncd at Github](https://github.com/axkibe/lsyncd) +[Fork Lsyncd at Github](https://github.com/lsyncd/lsyncd) diff --git a/docs/manpage/lsyncd.1 b/docs/manpage/lsyncd.1 index bb07893..6f3bd65 100644 --- a/docs/manpage/lsyncd.1 +++ b/docs/manpage/lsyncd.1 @@ -1,7 +1,7 @@ '\" t .\" Title: lsyncd .\" Author: [see the "AUTHOR" section] -.\" Generator: DocBook XSL Stylesheets v1.79.1 +.\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: January 2017 .\" Manual: Lsyncd .\" Source: Lsyncd 2.2.1 @@ -149,13 +149,13 @@ Failure (syntax, unrecoverable error condition, internal failure) .RE .SH "SEE ALSO" .sp -Online Manual: https://axkibe\&.github\&.io/lsyncd/ +Online Manual: https://lsyncd\&.github\&.io/lsyncd/ .SH "VERSION" .sp This man page is for lsyncd(1) version 2\&.2\&.0 .SH "AUTHOR" .sp -Axel Kittenberger, 2010\-2017 +Axel Kittenberger, 2010\-2017 Daniel Poelzleithner, 2021\-2023 .SH "COPYING" .sp Copyright (C) 2010\-2017 Axel Kittenberger\&. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 2, or any later version\&. Free redistrubition of this Documentation (/doc directory) is granted under the terms of the Creative Commons 3\&.0 Attribution License (CC\-3\&.0\-BY)\&. diff --git a/docs/manpage/lsyncd.1.txt b/docs/manpage/lsyncd.1.txt index 8cd5aa7..7493520 100644 --- a/docs/manpage/lsyncd.1.txt +++ b/docs/manpage/lsyncd.1.txt @@ -41,7 +41,7 @@ Fine-grained customization can be achieved through the CONFIG-FILE. Custom action configs can even be written from scratch in cascading layers ranging from shell scripts to code written in the LUA(1) language. This way simplicity can be balanced with powerfulness. See the online manual for details on the -CONFIG-FILE https://axkibe.github.io/lsyncd/manual/config/file/ . +CONFIG-FILE https://lsyncd.github.io/lsyncd/manual/config/file/ . Note that under normal configuration Lsyncd will delete pre-existing files in the target directories that are not present in the respective source directory. @@ -69,6 +69,9 @@ OPTIONS *-nodaemon*:: Lsyncd will not detach from the invoker and log as well to stdout/err. +*-onepass*:: + Sync once and exit + *-pidfile* 'FILE':: Lsyncd will write its process ID in 'FILE'. @@ -89,7 +92,7 @@ EXIT STATUS SEE ALSO -------- -Online Manual: https://axkibe.github.io/lsyncd/ +Online Manual: https://lsyncd.github.io/lsyncd/ VERSION ------ @@ -98,6 +101,7 @@ This man page is for lsyncd(1) version 2.2.0 AUTHOR ------ Axel Kittenberger, 2010-2017 +Daniel Poelzleithner, 2021-2023 COPYING ------- diff --git a/flake.nix b/flake.nix index db156ec..cd40c09 100644 --- a/flake.nix +++ b/flake.nix @@ -15,14 +15,17 @@ allowBroken = true; };}); #.legacyPackages.${system}; defaultDeps = with pkgs; [ - gcc - cmake - gnumake glib rsync openssh + ]; + nativeDeps = with pkgs; [ curl + asciidoc jekyll + gcc + cmake + gnumake ]; version = builtins.elemAt (builtins.match ''.*lsyncd_version = '([0-9\.]*)'.*'' @@ -138,10 +141,11 @@ src = ./.; buildPhase = '' - make all docs-html + make all manpage docs-html ''; buildInputs = defaultDeps ++ luaPackages; + nativeBuildInputs = nativeDeps; }); mkDev = extras: pkgs.mkShell { propagatedBuildInputs = defaultDeps ++ extras;