build: add manpages
Manual pages got removed from synergy in #7361. This commit brings them back. They are rudimentary and autogenerated using `help2man`, with only a message about finding the documentation at the wiki page added. Not much, but a lot better than nothing. Package names added to Continuous Integration are based on these web pages: https://archlinux.org/packages/extra/x86_64/help2man/ https://packages.debian.org/help2man https://packages.fedoraproject.org/pkgs/help2man/help2man/ https://software.opensuse.org/package/help2man
This commit is contained in:
parent
c1f1734943
commit
ebb63d8113
9 changed files with 67 additions and 4 deletions
|
|
@ -39,25 +39,26 @@ runs:
|
|||
xorg-dev libx11-dev libxtst-dev libssl-dev \
|
||||
libglib2.0-dev libxkbfile-dev qt6-base-dev qt6-tools-dev \
|
||||
libgtk-3-dev libgtest-dev libgmock-dev \
|
||||
libei-dev libportal-dev libtomlplusplus-dev libcli11-dev -y >/dev/null
|
||||
libei-dev libportal-dev libtomlplusplus-dev libcli11-dev \
|
||||
help2man -y >/dev/null
|
||||
elif [ ${{inputs.like}} == "fedora" ]; then
|
||||
dnf install -y cmake make ninja-build gcc-c++ \
|
||||
rpm-build openssl-devel glib2-devel \
|
||||
libXtst-devel libxkbfile-devel qt6-qtbase-devel qt6-qttools-devel \
|
||||
gtk3-devel gtest-devel gmock-devel \
|
||||
libei-devel libportal-devel tomlplusplus-devel \
|
||||
cli11-devel
|
||||
cli11-devel help2man
|
||||
elif [ ${{inputs.like}} == "suse" ]; then
|
||||
zypper refresh
|
||||
zypper install -y --force-resolution \
|
||||
cmake make ninja gcc-c++ rpm-build libopenssl-devel \
|
||||
glib2-devel libXtst-devel libxkbfile-devel qt6-base-devel qt6-tools-devel gtk3-devel \
|
||||
googletest-devel googlemock-devel libei-devel \
|
||||
libportal-devel tomlplusplus-devel cli11-devel
|
||||
libportal-devel tomlplusplus-devel cli11-devel help2man
|
||||
elif [ ${{ inputs.like }} == "arch" ]; then
|
||||
pacman -Syu --noconfirm base-devel cmake ninja \
|
||||
gcc openssl glib2 libxtst libxkbfile gtest libei libportal \
|
||||
qt6-base qt6-tools gtk3 tomlplusplus cli11
|
||||
qt6-base qt6-tools gtk3 tomlplusplus cli11 help2man
|
||||
else
|
||||
echo "Unknown like"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -145,6 +145,12 @@ precedence = "override"
|
|||
SPDX-FileCopyrightText = "Deskflow Developers"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
||||
[[annotations]]
|
||||
path = "src/apps/res/manpage.txt"
|
||||
precedence = "override"
|
||||
SPDX-FileCopyrightText = "Deskflow Developers"
|
||||
SPDX-License-Identifier = "MIT"
|
||||
|
||||
[[annotations]]
|
||||
path = "src/apps/res/icons/deskflow-**/**/**/**.svg"
|
||||
precedence = "override"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,30 @@
|
|||
# SPDX-FileCopyrightText: 2009 - 2012 Nick Bolton
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
find_program(HELP2MAN help2man)
|
||||
if(NOT HELP2MAN)
|
||||
message(STATUS "Man page tool (help2man) not found, man pages will not be generated")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(generate_app_man TARGET)
|
||||
if(HELP2MAN)
|
||||
add_custom_command(
|
||||
TARGET ${target} POST_BUILD
|
||||
COMMAND ${HELP2MAN}
|
||||
--include ${CMAKE_SOURCE_DIR}/src/apps/res/manpage.txt
|
||||
--no-info
|
||||
$<TARGET_FILE:${target}>
|
||||
-o $<TARGET_FILE_DIR:${target}>/${target}.1
|
||||
)
|
||||
install(
|
||||
FILES $<TARGET_FILE_DIR:${target}>/${target}.1
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
|
||||
)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
option(BUILD_UNIFIED "Build unified binary" OFF)
|
||||
if(BUILD_UNIFIED)
|
||||
add_subdirectory(deskflow-core)
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ if(APPLE)
|
|||
)
|
||||
elseif(UNIX)
|
||||
install(TARGETS ${target} DESTINATION bin)
|
||||
generate_app_man(${target})
|
||||
elseif(WIN32)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ if(APPLE)
|
|||
)
|
||||
elseif(UNIX)
|
||||
install(TARGETS ${target} DESTINATION bin)
|
||||
generate_app_man(${target})
|
||||
elseif(WIN32)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
|
|
|
|||
|
|
@ -84,4 +84,19 @@ elseif(APPLE)
|
|||
install(TARGETS ${target} BUNDLE DESTINATION .)
|
||||
else()
|
||||
install(TARGETS ${target} DESTINATION bin)
|
||||
if(HELP2MAN)
|
||||
configure_file(deskflow.man.template.in ${CMAKE_CURRENT_BINARY_DIR}/${target})
|
||||
add_custom_command(
|
||||
TARGET ${target} POST_BUILD
|
||||
COMMAND ${HELP2MAN}
|
||||
--version-string "${CMAKE_PROJECT_VERSION}"
|
||||
--include ${CMAKE_SOURCE_DIR}/src/apps/res/manpage.txt
|
||||
--no-info ${CMAKE_CURRENT_BINARY_DIR}/${target}
|
||||
-o ${CMAKE_CURRENT_BINARY_DIR}/${target}.1
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${target}.1
|
||||
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
9
src/apps/deskflow-gui/deskflow.man.template.in
Executable file
9
src/apps/deskflow-gui/deskflow.man.template.in
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
# SPDX-FileCopyrightText: Deskflow Developers
|
||||
# SPDX-License-Identifier: MIT
|
||||
#!/bin/sh -eu
|
||||
|
||||
if [ "$1" = '--help' ]; then
|
||||
cat << EOM
|
||||
@CMAKE_PROJECT_DESCRIPTION@. This is the GUI. It takes no arguments or options.
|
||||
EOM
|
||||
fi
|
||||
|
|
@ -45,6 +45,7 @@ if(APPLE)
|
|||
)
|
||||
elseif(UNIX)
|
||||
install(TARGETS ${target} DESTINATION bin)
|
||||
generate_app_man(${target})
|
||||
elseif(WIN32)
|
||||
install(
|
||||
TARGETS ${target}
|
||||
|
|
|
|||
5
src/apps/res/manpage.txt
Normal file
5
src/apps/res/manpage.txt
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[SEE ALSO]
|
||||
deskflow(1), deskflow-client(1), deskflow-server(2)
|
||||
|
||||
All documentation is on the web, so please point your browser at
|
||||
<https://github.com/deskflow/deskflow/wiki> and surf away.
|
||||
Loading…
Reference in a new issue