This repository has been archived by the owner on Dec 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
77 lines (69 loc) · 2.36 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8)
project(paperbark NONE)
set(PACKAGE_VERSION 7)
set(PACKAGE_MAINTAINER "Derek Dai <[email protected]>")
set(PACKAGE_DESCRIPTION "a versioned filesystem manager based on zfsonlinux")
find_program(BASH_EXEC bash)
if(NOT BASH_EXEC)
message(FATAL_ERROR "command bash are needed while building package")
endif()
install(
FILES
scripts/config
scripts/pbadmin-cmd-init
scripts/pbadmin-utils
scripts/pb-cmd-export
scripts/pb-cmd-import
scripts/pb-cmd-init
scripts/pb-cmd-list
scripts/pb-cmd-list-snapshot
scripts/pb-cmd-pull
scripts/pb-cmd-push
scripts/pb-cmd-remote
scripts/pb-cmd-remove
scripts/pb-cmd-remove-snapshot
scripts/pb-cmd-rename
scripts/pb-cmd-run
scripts/pb-cmd-search
scripts/pb-cmd-snapshot
scripts/pbentry-pbadmin
scripts/pbentry-pbtunnel
scripts/pbentry-post-update
scripts/pbtunnel
scripts/pbtunnel-cmd-pull
scripts/pbtunnel-cmd-push
scripts/pbtunnel-cmd-remove
scripts/pbtunnel-cmd-search
scripts/remote
scripts/ssh
scripts/suentry-pb
scripts/utils
scripts/zfs
DESTINATION
share/paperbark
)
install(PROGRAMS ${CMAKE_BINARY_DIR}/pbentry DESTINATION share/paperbark)
install(
FILES
${CMAKE_BINARY_DIR}/pb
${CMAKE_BINARY_DIR}/pbadmin
DESTINATION
bin
)
execute_process(COMMAND cmake -E create_symlink ../share/paperbark/pbentry pb
COMMAND cmake -E create_symlink ../share/paperbark/pbentry pbadmin
)
configure_file(scripts/pbentry.in pbentry @ONLY)
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_DESCRIPTION ${PACKAGE_DESCRIPTION})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PACKAGE_DESCRIPTION})
set(CPACK_PACKAGE_VENDOR ${PACKAGE_MAINTAINER})
set(CPACK_PACKAGE_VERSION ${PACKAGE_VERSION})
set(CPACK_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${PACKAGE_VERSION})
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
set(CPACK_DEBIAN_PACKAGE_DEPENDS "pv, ssh, lbzip2, util-linux (>=2.20), ubuntu-zfs | zfs (>=0.6.3), sudo, bash (>=4.2)")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE all)
set(CPACK_DEBIAN_PACKAGE_SECTION Development)
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_SOURCE_DIR}/debian/postinst)
include(CPack)