Add a stubbed IRC client

This commit is contained in:
Přemysl Eric Janouch 2015-04-11 21:05:13 +02:00
parent f194a240df
commit d2e62bc80d
2 changed files with 25 additions and 4 deletions

View File

@ -17,8 +17,10 @@ set (project_VERSION "${project_VERSION}.${project_VERSION_MINOR}")
set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}") set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}")
# Dependencies # Dependencies
find_package (Curses)
find_package (PkgConfig REQUIRED) find_package (PkgConfig REQUIRED)
pkg_check_modules (libssl REQUIRED libssl libcrypto) pkg_check_modules (libssl REQUIRED libssl libcrypto)
pkg_check_modules (ncursesw ncursesw)
# -lpthread is only there for debugging (gdb & errno) # -lpthread is only there for debugging (gdb & errno)
# -lrt is only for glibc < 2.17 # -lrt is only for glibc < 2.17
@ -26,6 +28,16 @@ list (APPEND project_libraries ${libssl_LIBRARIES} rt pthread)
include_directories (${libssl_INCLUDE_DIRS}) include_directories (${libssl_INCLUDE_DIRS})
link_directories (${libssl_LIBRARY_DIRS}) link_directories (${libssl_LIBRARY_DIRS})
if (ncursesw_FOUND)
list (APPEND project_libraries ${ncursesw_LIBRARIES})
include_directories (${ncursesw_INCLUDE_DIRS})
elseif (CURSES_FOUND)
list (APPEND project_libraries ${CURSES_LIBRARY})
include_directories (${CURSES_INCLUDE_DIR})
else (CURSES_FOUND)
message (SEND_ERROR "Curses not found")
endif (ncursesw_FOUND)
# Generate a configuration file # Generate a configuration file
include (GNUInstallDirs) include (GNUInstallDirs)
set (plugin_dir ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}) set (plugin_dir ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME})
@ -48,11 +60,14 @@ set_source_files_properties (${PROJECT_BINARY_DIR}/kike-replies.c
add_executable (zyklonb zyklonb.c ${common_sources} ${common_headers}) add_executable (zyklonb zyklonb.c ${common_sources} ${common_headers})
target_link_libraries (zyklonb ${project_libraries}) target_link_libraries (zyklonb ${project_libraries})
add_executable (degesch degesch.c ${common_sources} ${common_headers})
target_link_libraries (degesch ${project_libraries} readline)
add_executable (kike kike.c kike-replies.c ${common_sources} ${common_headers}) add_executable (kike kike.c kike-replies.c ${common_sources} ${common_headers})
target_link_libraries (kike ${project_libraries}) target_link_libraries (kike ${project_libraries})
# Installation # Installation
install (TARGETS zyklonb kike DESTINATION ${CMAKE_INSTALL_BINDIR}) install (TARGETS zyklonb degesch kike DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
foreach (plugin coin eval script youtube ${plugins}) foreach (plugin coin eval script youtube ${plugins})
@ -65,7 +80,7 @@ if (NOT HELP2MAN_EXECUTABLE)
message (FATAL_ERROR "help2man not found") message (FATAL_ERROR "help2man not found")
endif (NOT HELP2MAN_EXECUTABLE) endif (NOT HELP2MAN_EXECUTABLE)
foreach (page zyklonb kike) foreach (page zyklonb degesch kike)
set (page_output "${PROJECT_BINARY_DIR}/${page}.1") set (page_output "${PROJECT_BINARY_DIR}/${page}.1")
list (APPEND project_MAN_PAGES "${page_output}") list (APPEND project_MAN_PAGES "${page_output}")
add_custom_command (OUTPUT ${page_output} add_custom_command (OUTPUT ${page_output}
@ -84,7 +99,7 @@ foreach (page ${project_MAN_PAGES})
endforeach (page) endforeach (page)
# CPack # CPack
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Experimental IRC bot & daemon") set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Experimental IRC bot, client and daemon")
set (CPACK_PACKAGE_VERSION ${project_VERSION}) set (CPACK_PACKAGE_VERSION ${project_VERSION})
set (CPACK_PACKAGE_VENDOR "Premysl Janouch") set (CPACK_PACKAGE_VENDOR "Premysl Janouch")
set (CPACK_PACKAGE_CONTACT "Přemysl Janouch <p.janouch@gmail.com>") set (CPACK_PACKAGE_CONTACT "Přemysl Janouch <p.janouch@gmail.com>")

8
README
View File

@ -26,10 +26,16 @@ Some interesting features:
- epoll support on Linux - epoll support on Linux
- superfast build time, small memory footprint - superfast build time, small memory footprint
degesch
-------
To complete it all, I've also started working on an IRC client. I thought it
would be interesting to build an IRC client on top of libreadline. Also way
simpler than doing it in ncurses.
Building Building
-------- --------
Build dependencies: CMake, pkg-config, help2man, awk, sh, liberty (included) Build dependencies: CMake, pkg-config, help2man, awk, sh, liberty (included)
Runtime dependencies: openssl Runtime dependencies: openssl, ncursesw (degesch), readline (degesch)
$ git clone https://github.com/pjanouch/ZyklonB.git $ git clone https://github.com/pjanouch/ZyklonB.git
$ git submodule init $ git submodule init