Skip to content

Commit 5f26be4

Browse files
author
Pan
committed
Added latest libssh source. Updated setup.py
1 parent 5b164d0 commit 5f26be4

File tree

291 files changed

+85248
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

291 files changed

+85248
-2
lines changed

libssh/AUTHORS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Author(s):
2+
Aris Adamantiadis <aris@0xbadc0de.be> (project initiator)
3+
4+
Andreas Schneider <asn@cryptomilk.org> (developer)
5+
6+
Nick Zitzmann <seiryu (at) comcast (dot) net> (mostly client SFTP stuff)
7+
8+
Norbert Kiesel <nkiesel (at) tbdnetworks (dot) com> (getaddrinfo and other patches)
9+
10+
Jean-Philippe Garcia Ballester <giga (at) le-pec (dot) org> (Port to libgcrypt and configure.in voodoo, debian packaging)
11+
12+
Contributor(s):
13+
14+
Laurent Bigonville <bigon (at) bigon (dot) be> (debian packaging)
15+

libssh/BSD

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Some parts are under the BSDv2 License :
2+
3+
4+
Copyright (c) 2000 Markus Friedl. All rights reserved.
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions
7+
are met:
8+
1. Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
14+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+

libssh/CMakeLists.txt

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
project(libssh C)
2+
3+
# Required cmake version
4+
cmake_minimum_required(VERSION 2.8.5)
5+
6+
# global needed variables
7+
set(APPLICATION_NAME ${PROJECT_NAME})
8+
9+
set(APPLICATION_VERSION_MAJOR "0")
10+
set(APPLICATION_VERSION_MINOR "7")
11+
set(APPLICATION_VERSION_PATCH "90")
12+
13+
set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
14+
15+
# SOVERSION scheme: CURRENT.AGE.REVISION
16+
# If there was an incompatible interface change:
17+
# Increment CURRENT. Set AGE and REVISION to 0
18+
# If there was a compatible interface change:
19+
# Increment AGE. Set REVISION to 0
20+
# If the source code was changed, but there were no interface changes:
21+
# Increment REVISION.
22+
set(LIBRARY_VERSION "4.5.0")
23+
set(LIBRARY_SOVERSION "4")
24+
25+
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
26+
set(CMAKE_MODULE_PATH
27+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
28+
)
29+
30+
# add definitions
31+
include(DefineCMakeDefaults)
32+
include(DefinePlatformDefaults)
33+
include(DefineCompilerFlags)
34+
include(DefineInstallationPaths)
35+
include(DefineOptions.cmake)
36+
include(CPackConfig.cmake)
37+
38+
# disallow in-source build
39+
include(MacroEnsureOutOfSourceBuild)
40+
macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")
41+
42+
# search for libraries
43+
if (WITH_ZLIB)
44+
find_package(ZLIB REQUIRED)
45+
endif (WITH_ZLIB)
46+
47+
if (WITH_GCRYPT)
48+
find_package(GCrypt 1.5.0 REQUIRED)
49+
if (NOT GCRYPT_FOUND)
50+
message(FATAL_ERROR "Could not find GCrypt")
51+
endif (NOT GCRYPT_FOUND)
52+
elseif(WITH_MBEDTLS)
53+
find_package(MbedTLS REQUIRED)
54+
if (NOT MBEDTLS_FOUND)
55+
message(FATAL_ERROR "Could not find mbedTLS")
56+
endif (NOT MBEDTLS_FOUND)
57+
else (WITH_GCRYPT)
58+
find_package(OpenSSL)
59+
if (NOT OPENSSL_FOUND)
60+
find_package(GCrypt)
61+
if (NOT GCRYPT_FOUND)
62+
find_package(MbedTLS)
63+
if (NOT MBEDTLS_FOUND)
64+
message(FATAL_ERROR "Could not find OpenSSL, GCrypt or mbedTLS")
65+
endif (NOT MBEDTLS_FOUND)
66+
endif (NOT GCRYPT_FOUND)
67+
endif (NOT OPENSSL_FOUND)
68+
endif(WITH_GCRYPT)
69+
70+
# Find out if we have threading available
71+
set(CMAKE_THREAD_PREFER_PTHREADS ON)
72+
find_package(Threads)
73+
74+
if (WITH_GSSAPI)
75+
find_package(GSSAPI)
76+
endif (WITH_GSSAPI)
77+
78+
if (WITH_NACL)
79+
find_package(NaCl)
80+
if (NOT NACL_FOUND)
81+
set(WITH_NACL OFF)
82+
endif (NOT NACL_FOUND)
83+
endif (WITH_NACL)
84+
85+
if (BSD OR SOLARIS OR OSX)
86+
find_package(Argp)
87+
endif (BSD OR SOLARIS OR OSX)
88+
89+
# config.h checks
90+
include(ConfigureChecks.cmake)
91+
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
92+
93+
# check subdirectories
94+
add_subdirectory(doc)
95+
add_subdirectory(include)
96+
add_subdirectory(src)
97+
98+
# pkg-config file
99+
if (UNIX)
100+
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
101+
install(
102+
FILES
103+
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
104+
${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc
105+
DESTINATION
106+
${LIB_INSTALL_DIR}/pkgconfig
107+
COMPONENT
108+
pkgconfig
109+
)
110+
111+
if (LIBSSH_THREADS)
112+
configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc)
113+
install(
114+
FILES
115+
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
116+
${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc
117+
DESTINATION
118+
${LIB_INSTALL_DIR}/pkgconfig
119+
COMPONENT
120+
pkgconfig
121+
)
122+
endif (LIBSSH_THREADS)
123+
endif (UNIX)
124+
125+
# cmake config files
126+
set(LIBSSH_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
127+
set(LIBSSH_THREADS_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
128+
129+
configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY)
130+
configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY)
131+
install(
132+
FILES
133+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
134+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
135+
DESTINATION
136+
${CMAKE_INSTALL_DIR}/${PROJECT_NAME}
137+
COMPONENT
138+
devel
139+
)
140+
141+
142+
# in tree build settings
143+
configure_file(libssh-build-tree-settings.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libssh-build-tree-settings.cmake @ONLY)
144+
145+
if (WITH_EXAMPLES)
146+
add_subdirectory(examples)
147+
endif (WITH_EXAMPLES)
148+
149+
if (WITH_TESTING)
150+
find_package(CMocka REQUIRED)
151+
include(AddCMockaTest)
152+
add_subdirectory(tests)
153+
endif (WITH_TESTING)
154+
155+
156+
message(STATUS "********************************************")
157+
message(STATUS "********** ${PROJECT_NAME} build options : **********")
158+
159+
message(STATUS "zlib support: ${WITH_ZLIB}")
160+
message(STATUS "libgcrypt support: ${WITH_GCRYPT}")
161+
message(STATUS "libmbedTLS support: ${WITH_MBEDTLS}")
162+
message(STATUS "libnacl support: ${WITH_NACL}")
163+
message(STATUS "SSH-1 support: ${WITH_SSH1}")
164+
message(STATUS "SFTP support: ${WITH_SFTP}")
165+
message(STATUS "Server support : ${WITH_SERVER}")
166+
message(STATUS "GSSAPI support : ${WITH_GSSAPI}")
167+
message(STATUS "Pcap debugging support : ${WITH_PCAP}")
168+
message(STATUS "With static library: ${WITH_STATIC_LIB}")
169+
message(STATUS "Unit testing: ${WITH_TESTING}")
170+
message(STATUS "Client code Unit testing: ${WITH_CLIENT_TESTING}")
171+
if (WITH_INTERNAL_DOC)
172+
message(STATUS "Internal documentation generation")
173+
else (WITH_INTERNAL_DOC)
174+
message(STATUS "Public API documentation generation")
175+
endif (WITH_INTERNAL_DOC)
176+
message(STATUS "Benchmarks: ${WITH_BENCHMARKS}")
177+
message(STATUS "********************************************")
178+

0 commit comments

Comments
 (0)