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
|
Description: Use cmake as build system
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Bug-Debian: https://bugs.debian.org/912123
Last-Update: 2019-02-24
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.7)
+project(linux-ftpd-ssl)
+
+set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
+set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+
+find_library(USE_CRYPT crypt REQUIRED)
+
+add_subdirectory(ftpd)
+add_subdirectory(support)
--- /dev/null
+++ b/ftpd/CMakeLists.txt
@@ -0,0 +1,52 @@
+
+include_directories(
+ BEFORE
+ "../support/"
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+add_executable(
+ in.ftpd
+ ftpd.c
+ logutmp.c
+ logwtmp.c
+ popen.c
+ extern.h
+ ftpcmd.c
+)
+target_link_libraries(
+ in.ftpd
+ ${USE_CRYPT}
+ support
+)
+install(
+ TARGETS in.ftpd
+ DESTINATION ${SBIN_DIR}
+)
+
+add_custom_command(
+ COMMENT "Creating y.tab.c"
+ OUTPUT y.tab.c
+ COMMAND
+ yacc ${CMAKE_CURRENT_SOURCE_DIR}/ftpcmd.y
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ftpcmd.y
+)
+add_custom_command(
+ COMMENT "Creating ftpcmd.c"
+ OUTPUT ftpcmd.c
+ COMMAND
+ ${CMAKE_COMMAND} -E rename
+ y.tab.c ftpcmd.c
+ DEPENDS y.tab.c
+)
+
+install(
+ FILES ftpd.8
+ DESTINATION ${MAN_DIR}/man8/
+ RENAME in.ftpd.8
+)
+
+install(
+ FILES ftpusers.5
+ DESTINATION ${MAN_DIR}/man5/
+)
--- /dev/null
+++ b/support/CMakeLists.txt
@@ -0,0 +1,9 @@
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHASSETPROCTITLE")
+
+add_library(
+ support
+ isexpired.c
+ setproctitle.c
+ vis.c
+)
|