1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
Description: Add SSL support
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Forwarded: not-needed
Last-Update: 2019-02-24
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,11 @@
cmake_minimum_required(VERSION 3.7)
-project(netkit-ftp)
+project(netkit-ftp-ssl)
set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
find_library(USE_READLINE readline)
-find_library(USE_CRYPT crypt REQUIRED)
+find_library(LIBTERMCAP ncurses REQUIRED)
+find_library(USE_SSL ssl REQUIRED)
add_subdirectory(ftp)
--- a/ftp/CMakeLists.txt
+++ b/ftp/CMakeLists.txt
@@ -1,11 +1,17 @@
+set(
+ LIBS
+)
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64")
if(USE_READLINE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__USE_READLINE__")
+ set(LIBS ${LIBS} readline)
endif()
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SSL -DBUILD_SSL_CLIENT")
add_executable(
- netkit-ftp
+ ftp-ssl
cmds.c
cmdtab.c
domacro.c
@@ -13,24 +23,25 @@
main.c
ruserpass.c
)
+target_link_libraries(
+ ftp-ssl
+ crypto
+ ssl
+ ${LIBS}
+)
install(
- TARGETS netkit-ftp
+ TARGETS ftp-ssl
DESTINATION ${BIN_DIR}
)
-if(USE_READLINE)
- target_link_libraries(
- netkit-ftp
- readline
- )
-endif()
+
install(
FILES ftp.1
DESTINATION ${MAN_DIR}/man1/
- RENAME netkit-ftp.1
+ RENAME ftp-ssl.1
)
install(
FILES netrc.5
DESTINATION ${MAN_DIR}/man5/
- RENAME netkit-netrc.5
+ RENAME netrc-ssl.5
)
|