File: use-cmake-as-buildsystem.patch

package info (click to toggle)
netkit-ftp-ssl 0.17.34%2Breally0.17-1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 2,724 kB
  • sloc: ansic: 6,606; makefile: 36; sh: 13
file content (57 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download | duplicates (3)
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
Description: Use cmake as build system
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Bug-Debian: https://bugs.debian.org/912126
Last-Update: 2019-02-24

--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.7)
+project(netkit-ftp)
+
+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)
+
+add_subdirectory(ftp)
--- /dev/null
+++ b/ftp/CMakeLists.txt
@@ -0,0 +1,36 @@
+
+add_executable(
+    ftp
+    cmds.c
+    cmdtab.c
+    domacro.c
+    ftp.c
+    main.c
+    ruserpass.c
+)
+install(
+    TARGETS ftp
+    DESTINATION ${BIN_DIR}
+)
+install(
+    CODE "execute_process( \
+        COMMAND ${CMAKE_COMMAND} -E create_symlink \
+        ptftp \$ENV{DESTDIR}${BIN_DIR}/ftp \
+    )"
+)
+
+install(
+    FILES ftp.1
+    DESTINATION ${MAN_DIR}/man1/
+)
+install(
+    CODE "execute_process( \
+        COMMAND ${CMAKE_COMMAND} -E create_symlink \
+        pftp.1 \$ENV{DESTDIR}${MAN_DIR}/pftp.1 \
+    )"
+)
+
+install(
+    FILES netrc.5
+    DESTINATION ${MAN_DIR}/man5/
+)