Skip to content

Commit

Permalink
use asciidoc for manpages, instead of docbook
Browse files Browse the repository at this point in the history
This is the same like the matching Icecream commit.
  • Loading branch information
llunak committed Jul 30, 2020
1 parent f936e9d commit 479490f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 216 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,20 @@ before_script:

- mkdir build
- cd build
- PKG_CONFIG_PATH=../icecream/lib/pkgconfig cmake ..
- PKG_CONFIG_PATH=../icecream/lib/pkgconfig cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/_inst

script: make
script:
- make
- make install

addons:
apt:
packages:
- cmake
- qtbase5-dev
- extra-cmake-modules
- asciidoc
- xsltproc # for asciidoc
# for icecream
- libcap-ng-dev
- liblzo2-dev
Expand Down
22 changes: 0 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,28 +37,6 @@ set_package_properties(Icecream PROPERTIES
URL "http://en.opensuse.org/Icecream"
TYPE REQUIRED
)
find_package(Docbook2X)
set_package_properties(Docbook2X PROPERTIES
DESCRIPTION "docbook2X converts DocBook documents into the traditional Unix man page format"
PURPOSE "Required for man-page generation"
URL "http://docbook2x.sourceforge.net/"
)

# add a target to generate API documentation with Doxygen
find_package(Doxygen)
set_package_properties(Doxygen PROPERTIES
TYPE OPTIONAL
DESCRIPTION "Doxygen documentation generator"
PURPOSE "Needed for generating API documentation (make doc)"
)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
Expand Down
97 changes: 0 additions & 97 deletions cmake/modules/FindDocbook2X.cmake

This file was deleted.

25 changes: 23 additions & 2 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
# It's not possible to install the docbook right now (Qt-only project)
#add_subdirectory(icemon)

if(DOCBOOK_TO_MAN_EXECUTABLE)
install_docbook_man_page(icemon 1)
find_program(ASCIIDOC asciidoc)
find_program(A2X a2x)

if(NOT ASCIIDOC OR NOT A2X)
message(WARNING "Could not find asciidoc or a2x, manual page will not be generated.")
else()
add_custom_target(manpage ALL)
add_custom_command(
TARGET manpage
COMMAND ${ASCIIDOC} -a revnumber=${PROJECT_VERSION} -d manpage -b docbook
-o ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml ${CMAKE_CURRENT_SOURCE_DIR}/icemon.adoc
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/icemon.adoc
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml)
add_custom_command(
TARGET manpage
COMMAND ${A2X} --doctype manpage --format manpage
${CMAKE_CURRENT_BINARY_DIR}/icemon.xml
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
MAIN_DEPENDENCY ${CMAKE_CURRENT_BINARY_DIR}/icemon.xml
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/icemon.1)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/icemon.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
endif()
54 changes: 54 additions & 0 deletions doc/icemon.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
ICEMON(1)
=========
:doctype: manpage
:man source: icemon
:man version: {revnumber}
:man manual: Icemon User's Manual


Name
----
icemon - Icecream network monitor


Synopsis
--------
*icemon* _OPTION_


Description
-----------
Icemon is a graphical application to view an Icecream compile network and monitor its traffic.



Options
-------

*-h, --help*::
Print help message and exit.

*-n, --netname* _net-name_::
The name of the Icecream network `icemon` should connect to.

*-s, --scheduler* _host-name_::
The hostname of the Icecream scheduler `icemon` should connect to.



See Also
--------
ifdef::env-github[]
link:https://github.com/icecc/icecream/tree/master/doc/icecream.adoc[icecream(7)]
link:https://github.com/icecc/icecream/tree/master/doc/icecc-scheduler.adoc[icecc-scheduler(1)]
link:https://github.com/icecc/icecream/tree/master/doc/iceccd.adoc[iceccd(1)]
endif::[]

ifndef::env-github[]
icecream(7), icecc-scheduler(1), iceccd(1)
endif::[]


Website
-------
Project home: https://github.com/icecc/icemon
93 changes: 0 additions & 93 deletions doc/man-icemon.1.xml

This file was deleted.

0 comments on commit 479490f

Please sign in to comment.