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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
Description: Use cmake as build system
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Bug-Debian: https://bugs.debian.org/912131
Last-Update: 2019-02-24
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.7)
+project(netkit-telnet)
+
+set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
+set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+
+set(USE_GLIBC 1)
+
+set(
+ CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+ -D_GNU_SOURCE \
+ -DACCEPT_USERVAR \
+ -Wall \
+ -Wno-trigraphs \
+")
+set(
+ CMAKE_C_FLAGS "${CMAKE_C_FLAGS} \
+ -D_GNU_SOURCE \
+ -DACCEPT_USERVAR \
+ -Wall \
+ -Wno-trigraphs \
+")
+
+add_subdirectory(telnet)
+add_subdirectory(telnetd)
+add_subdirectory(telnetlogin)
--- /dev/null
+++ b/telnet/CMakeLists.txt
@@ -0,0 +1,31 @@
+
+set(
+ CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
+ -DUSE_TERMIO \
+ -DKLUDGELINEMODE \
+")
+
+add_executable(
+ telnet
+ commands.cc
+ environ.cc
+ genget.cc
+ main.cc
+ netlink.cc
+ network.cc
+ ring.cc
+ sys_bsd.cc
+ telnet.cc
+ terminal.cc
+ tn3270.cc
+ utilities.cc
+)
+install(
+ TARGETS telnet
+ DESTINATION ${BIN_DIR}
+)
+
+install(
+ FILES telnet.1
+ DESTINATION ${MAN_DIR}/man1/
+)
--- /dev/null
+++ b/telnetd/CMakeLists.txt
@@ -0,0 +1,43 @@
+
+set(CMAKE_C_FLAGS "\
+ ${CMAKE_C_FLAGS} \
+ -DISSUE_FILE='\"/etc/issue.net\"' \
+ -DPARANOID_TTYS \
+ -DNO_REVOKE \
+ -DKLUDGELINEMODE \
+ -DDIAGNOSTICS \
+ -DLOGIN_WRAPPER='\"/usr/lib/telnetlogin\"' \
+")
+
+add_executable(
+ in.telnetd
+ global.c
+ setproctitle.c
+ slc.c
+ state.c
+ sys_term.c
+ telnetd.c
+ termstat.c
+ utility.c
+)
+target_link_libraries(
+ in.telnetd
+ ncurses
+ util
+)
+install(
+ TARGETS in.telnetd
+ DESTINATION ${SBIN_DIR}
+)
+
+install(
+ FILES telnetd.8
+ DESTINATION ${MAN_DIR}/man8/
+ RENAME in.telnetd.8
+)
+install(
+ CODE "execute_process( \
+ COMMAND ${CMAKE_COMMAND} -E create_symlink \
+ telnetd.8 \$ENV{DESTDIR}${MAN_DIR}/man8/in.telnetd.8 \
+ )"
+)
--- /dev/null
+++ b/telnetlogin/CMakeLists.txt
@@ -0,0 +1,19 @@
+
+add_executable(
+ telnetlogin
+ telnetlogin.c
+)
+install(
+ TARGETS telnetlogin
+ DESTINATION ${SBIN_DIR}
+ PERMISSIONS
+ SETUID
+ OWNER_WRITE OWNER_READ OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+
+)
+
+install(
+ FILES telnetlogin.8
+ DESTINATION ${MAN_DIR}/man8/
+)
|