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
|
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
)
target_include_directories(rpc.bootparamd PUBLIC ${TIRPC_INCLUDE_DIRS})
target_link_libraries(rpc.bootparamd ${TIRPC_LIBRARIES})
add_executable(
callbootd
callbootd.c
bootparam_prot_clnt.c
bootparam_prot_xdr.c
bootparam_prot.h
)
target_include_directories(callbootd PUBLIC ${TIRPC_INCLUDE_DIRS})
target_link_libraries(callbootd ${TIRPC_LIBRARIES})
install(
TARGETS rpc.bootparamd
DESTINATION ${SBIN_DIR}
)
add_custom_command(
COMMENT "Creating bootparam_prot.x"
OUTPUT bootparam_prot.x
COMMAND
${CMAKE_COMMAND} -E copy
/usr/include/rpcsvc/bootparam_prot.x bootparam_prot.x
COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/debian/bootparamprog_1.patch
)
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
)
install(
FILES bootparams.5
DESTINATION ${MAN_DIR}/man5/
)
install(
FILES bootparamd.8
DESTINATION ${MAN_DIR}/man8/
)
install(
CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
bootparamd.8 \$ENV{DESTDIR}${MAN_DIR}/man8/rpc.bootparamd.8 \
)"
)
|