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
|
Description: Use cmake as build system
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Bug-Debian: https://bugs.debian.org/912124
Last-Update: 2018-11-25
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,8 @@
+cmake_minimum_required(VERSION 3.7)
+project(netkit-bootparamd)
+
+set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
+set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+
+add_subdirectory(rpc.bootparamd)
--- /dev/null
+++ b/rpc.bootparamd/CMakeLists.txt
@@ -0,0 +1,89 @@
+include_directories(
+ BEFORE
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+add_executable(
+ rpc.bootparamd
+
+ bootparam_prot_svc.c
+ bootparam_prot_xdr.c
+ rpc.bootparamd.c
+ main.c
+
+ bootparam_prot.h
+)
+add_executable(
+ callbootd
+
+ callbootd.c
+ bootparam_prot_clnt.c
+ bootparam_prot_xdr.c
+
+ bootparam_prot.h
+)
+
+install(
+ TARGETS rpc.bootparamd
+ DESTINATION ${SBIN_DIR}
+)
+install(
+ FILES bootparamd.8
+ DESTINATION ${MAN_DIR}/man8/
+ RENAME rpc.bootparamd.8
+)
+install(
+ CODE "execute_process( \
+ COMMAND ${CMAKE_COMMAND} -E create_symlink \
+ rpc.bootparamd.8 \$ENV{DESTDIR}${MAN_DIR}/man8/tftpd.8 \
+ )"
+)
+
+add_custom_command(
+ COMMENT "Creating bootparam_prot.x"
+ OUTPUT bootparam_prot.x
+ COMMAND
+ ${CMAKE_COMMAND} -E copy
+ ${CMAKE_CURRENT_SOURCE_DIR}/bootparam_prot.x.real bootparam_prot.x
+ DEPENDS bootparam_prot.x.real
+)
+
+add_custom_command(
+ COMMENT "Creating bootparam_prot.h"
+ OUTPUT bootparam_prot.h
+ COMMAND rpcgen
+ ARGS
+ -h bootparam_prot.x
+ -o bootparam_prot.h
+ DEPENDS bootparam_prot.x
+)
+
+add_custom_command(
+ COMMENT "Creating bootparam_prot_xdr.c"
+ OUTPUT bootparam_prot_xdr.c
+ COMMAND rpcgen
+ ARGS
+ -c bootparam_prot.x
+ -o ${CMAKE_CURRENT_BINARY_DIR}/bootparam_prot_xdr.c
+ DEPENDS bootparam_prot.x
+)
+
+add_custom_command(
+ COMMENT "Creating bootparam_prot_clnt.c"
+ OUTPUT bootparam_prot_clnt.c
+ COMMAND rpcgen
+ ARGS
+ -l bootparam_prot.x
+ -o bootparam_prot_clnt.c
+ DEPENDS bootparam_prot.x
+)
+
+add_custom_command(
+ COMMENT "Creating bootparam_prot_svc.c"
+ OUTPUT bootparam_prot_svc.c
+ COMMAND rpcgen
+ ARGS
+ -m bootparam_prot.x
+ -o bootparam_prot_svc.c
+ DEPENDS bootparam_prot.x
+)
|