Generate a manual page
Also mention our fancy new stream feature in the README.
This commit is contained in:
parent
1f565b4d32
commit
43da7cd3c9
|
@ -69,11 +69,35 @@ target_link_libraries (${PROJECT_NAME} ${UNISTRING_LIBRARIES}
|
||||||
${NCURSESW_LIBRARIES} termo-static ${curl_LIBRARIES})
|
${NCURSESW_LIBRARIES} termo-static ${curl_LIBRARIES})
|
||||||
add_threads (${PROJECT_NAME})
|
add_threads (${PROJECT_NAME})
|
||||||
|
|
||||||
# The files to be installed
|
# Installation
|
||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||||
|
|
||||||
|
# Generate documentation from program help
|
||||||
|
find_program (HELP2MAN_EXECUTABLE help2man)
|
||||||
|
if (NOT HELP2MAN_EXECUTABLE)
|
||||||
|
message (FATAL_ERROR "help2man not found")
|
||||||
|
endif (NOT HELP2MAN_EXECUTABLE)
|
||||||
|
|
||||||
|
foreach (page ${PROJECT_NAME})
|
||||||
|
set (page_output "${PROJECT_BINARY_DIR}/${page}.1")
|
||||||
|
list (APPEND project_MAN_PAGES "${page_output}")
|
||||||
|
add_custom_command (OUTPUT ${page_output}
|
||||||
|
COMMAND ${HELP2MAN_EXECUTABLE} -N
|
||||||
|
"${PROJECT_BINARY_DIR}/${page}" -o ${page_output}
|
||||||
|
DEPENDS ${page}
|
||||||
|
COMMENT "Generating man page for ${page}" VERBATIM)
|
||||||
|
endforeach (page)
|
||||||
|
|
||||||
|
add_custom_target (docs ALL DEPENDS ${project_MAN_PAGES})
|
||||||
|
|
||||||
|
foreach (page ${project_MAN_PAGES})
|
||||||
|
string (REGEX MATCH "\\.([0-9])$" manpage_suffix "${page}")
|
||||||
|
install (FILES "${page}"
|
||||||
|
DESTINATION "${CMAKE_INSTALL_MANDIR}/man${CMAKE_MATCH_1}")
|
||||||
|
endforeach (page)
|
||||||
|
|
||||||
# CPack
|
# CPack
|
||||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPD client")
|
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "MPD client")
|
||||||
set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
|
set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
|
||||||
|
|
|
@ -28,7 +28,8 @@ https://build.opensuse.org/project/repositories/home:pjanouch:git
|
||||||
|
|
||||||
Building and Running
|
Building and Running
|
||||||
--------------------
|
--------------------
|
||||||
Build dependencies: CMake, pkg-config, liberty (included), termo (included) +
|
Build dependencies: CMake, pkg-config, help2man, liberty (included),
|
||||||
|
termo (included) +
|
||||||
Runtime dependencies: ncursesw, libunistring, cURL
|
Runtime dependencies: ncursesw, libunistring, cURL
|
||||||
|
|
||||||
$ git clone --recursive https://github.com/pjanouch/nncmpp.git
|
$ git clone --recursive https://github.com/pjanouch/nncmpp.git
|
||||||
|
@ -73,6 +74,10 @@ colors = {
|
||||||
selection = "reverse"
|
selection = "reverse"
|
||||||
scrollbar = ""
|
scrollbar = ""
|
||||||
}
|
}
|
||||||
|
streams = {
|
||||||
|
"dnbradio.com" = "http://www.dnbradio.com/hi.m3u"
|
||||||
|
"BassDrive.com" = "http://bassdrive.com/v2/streams/BassDrive.pls"
|
||||||
|
}
|
||||||
....
|
....
|
||||||
|
|
||||||
Terminal caveats
|
Terminal caveats
|
||||||
|
|
Loading…
Reference in New Issue