diff --git a/backends/libircclient-qt/CMakeLists.txt b/backends/libircclient-qt/CMakeLists.txt index 0aa33549..eed9a3ca 100644 --- a/backends/libircclient-qt/CMakeLists.txt +++ b/backends/libircclient-qt/CMakeLists.txt @@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 2.6) FILE(GLOB SRC *.cpp) FILE(GLOB HEADERS *.h) QT4_WRAP_CPP(SRC ${HEADERS}) -ADD_EXECUTABLE(libircclient-qt_backend ${SRC}) +ADD_EXECUTABLE(spectrum_libircclient-qt_backend ${SRC}) -target_link_libraries(libircclient-qt_backend ${IRC_LIBRARY} ${QT_LIBRARIES} transport) +target_link_libraries(spectrum_libircclient-qt_backend ${IRC_LIBRARY} ${QT_LIBRARIES} transport) + +INSTALL(TARGETS spectrum_libircclient-qt_backend RUNTIME DESTINATION bin) diff --git a/backends/libpurple/CMakeLists.txt b/backends/libpurple/CMakeLists.txt index 73feb4ff..bab08739 100644 --- a/backends/libpurple/CMakeLists.txt +++ b/backends/libpurple/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 2.6) FILE(GLOB SRC *.cpp) -ADD_EXECUTABLE(libpurple_backend ${SRC}) +ADD_EXECUTABLE(spectrum_libpurple_backend ${SRC}) -target_link_libraries(libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport) +target_link_libraries(spectrum_libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport) + +INSTALL(TARGETS spectrum_libpurple_backend RUNTIME DESTINATION bin) diff --git a/spectrum/src/CMakeLists.txt b/spectrum/src/CMakeLists.txt index 26ee0696..4a3e6432 100644 --- a/spectrum/src/CMakeLists.txt +++ b/spectrum/src/CMakeLists.txt @@ -1,10 +1,17 @@ cmake_minimum_required(VERSION 2.6) FILE(GLOB SRC *.cpp) -ADD_EXECUTABLE(spectrum ${SRC}) +ADD_EXECUTABLE(spectrum2 ${SRC}) -ADD_DEPENDENCIES(spectrum libpurple_backend) -ADD_DEPENDENCIES(spectrum libircclient-qt_backend) +ADD_DEPENDENCIES(spectrum2 libpurple_backend) +ADD_DEPENDENCIES(spectrum2 libircclient-qt_backend) -target_link_libraries(spectrum transport) +target_link_libraries(spectrum2 transport) +INSTALL(TARGETS spectrum2 RUNTIME DESTINATION bin) + +INSTALL(FILES + sample2.cfg + RENAME spectrum.cfg.example + DESTINATION /etc/spectrum2 + ) diff --git a/spectrum/src/main.cpp b/spectrum/src/main.cpp index ef22af03..679ac336 100644 --- a/spectrum/src/main.cpp +++ b/spectrum/src/main.cpp @@ -26,23 +26,23 @@ int main(int argc, char **argv) if(vm.count("help")) { std::cout << desc << "\n"; - exit(1); + return 1; } } catch (std::runtime_error& e) { std::cout << desc << "\n"; - exit(1); + return 1; } catch (...) { std::cout << desc << "\n"; - exit(1); + return 1; } if (argc != 2) { std::cout << desc << "\n"; - exit(1); + return 1; } diff --git a/spectrum/src/sample2.cfg b/spectrum/src/sample2.cfg new file mode 100644 index 00000000..9cd0b64b --- /dev/null +++ b/spectrum/src/sample2.cfg @@ -0,0 +1,21 @@ +[service] +jid = localhost +password = secret +server = 127.0.0.1 +port = 5222 +server_mode = 1 +backend_host=localhost # < this option doesn't work yet +backend_port=10001 +#cert= #patch to PKCS#12 certificate +#cert_password= #password to that certificate if any +users_per_backend=2 +backend=spectrum_libpurple_backend +#backend=spectrum_libircclient-qt_backend +protocol=prpl-jabber +#protocol=prpl-msn +#protocol=prpl-icq + +[database] +type = none # "sqlite3" or "none" without database backend +database = test.sql +#prefix=icq diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b6fd25a1..21362895 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,5 +19,5 @@ SET_TARGET_PROPERTIES(transport PROPERTIES INSTALL(TARGETS transport LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries) -CONFIGURE_FILE(transport.pc.in "${CMAKE_CURRENT_BINARY_DIR}/transport.pc") -INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/transport.pc" DESTINATION lib/pkgconfig) +#CONFIGURE_FILE(transport.pc.in "${CMAKE_CURRENT_BINARY_DIR}/transport.pc") +#INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/transport.pc" DESTINATION lib/pkgconfig) diff --git a/src/config.cpp b/src/config.cpp index c7ead4ca..42c690eb 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -55,8 +55,8 @@ bool Config::load(const std::string &configfile, boost::program_options::options ("database.prefix", value()->default_value(""), "Prefix of tables in database") ; - store(parse_config_file(ifs, opts), m_variables); - notify(m_variables); +// store(parse_config_file(ifs, opts), m_variables); +// notify(m_variables); m_file = configfile;