File: use-cmake-as-buildsystem-debian-extras.patch

package info (click to toggle)
netkit-ftp-ssl 0.17.34%2Breally0.17-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,728 kB
  • sloc: ansic: 6,606; makefile: 39; sh: 13
file content (58 lines) | stat: -rw-r--r-- 1,196 bytes parent folder | download | duplicates (6)
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
Description: Adjust install paths and file names for Debian
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Forwarded: not-needed
Last-Update: 2019-02-24

--- a/ftp/CMakeLists.txt
+++ b/ftp/CMakeLists.txt
@@ -1,6 +1,11 @@
 
+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__")
+endif()
+
 add_executable(
-    ftp
+    netkit-ftp
     cmds.c
     cmdtab.c
     domacro.c
@@ -9,28 +14,23 @@
     ruserpass.c
 )
 install(
-    TARGETS ftp
+    TARGETS netkit-ftp
     DESTINATION ${BIN_DIR}
 )
-install(
-    CODE "execute_process( \
-        COMMAND ${CMAKE_COMMAND} -E create_symlink \
-        ptftp \$ENV{DESTDIR}${BIN_DIR}/ftp \
-    )"
-)
-
+if(USE_READLINE)
+    target_link_libraries(
+        netkit-ftp
+        readline
+    )
+endif()
 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 \
-    )"
+    RENAME netkit-ftp.1
 )
 
 install(
     FILES netrc.5
     DESTINATION ${MAN_DIR}/man5/
+    RENAME netkit-netrc.5
 )