forked from vesoft-inc/nebula-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
71 lines (64 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
cmake_minimum_required(VERSION 3.15)
project("Nebula Graph Studio")
# package name
set(CPACK_PACKAGE_NAME "nebula graph studio")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64")
set(CPACK_RPM_PACKAGE_RELEASE CPACK_RPM_PACKAGE_RELEASE_TEMPLATE)
# user define install dir ON
# set(CPACK_SET_DESTDIR ON)
set(CPACK_RPM_PACKAGE_RELOCATABLE ON)
# default install path
set(CPACK_INSTALL_PREFIX "/usr/local/nebula-graph-studio")
# package version
set(CPACK_PACKAGE_VERSION CPACK_PACKAGE_VERSION_TEMPLATE)
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_RPM_PACKAGE_ARCHITECTURE})
set(CPACK_PACKAGE_CHECKSUM SHA256)
# group name
set(CPACK_RPM_PACKAGE_GROUP "vesoft")
# vendor name
set(CPACK_PACKAGE_VENDOR "vesoft inc")
set(CPACK_RPM_PACKAGE_LICENSE "Apache 2.0 + Common Clause 1.0")
set(CPACK_RPM_PRE_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/preinst.sh)
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/postinst.sh)
set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/prerm.sh)
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/scripts/postrm.sh)
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/local")
# DEB
set(CPACK_PACKAGE_CONTACT "https://discuss.nebula-graph.com.cn/")
include(CPack)
# 添加一个名为 NebulaGraphStudio 的 component
cpack_add_component(NebulaGraphStduio
DISPLAY_NAME "Nebula Graph Studio"
DESCRIPTION "The Web App For Nebula"
GROUP NebulaGraphStduioGroup)
cpack_add_component_group(NebulaGraphStudioGroup)
install(
DIRECTORY
./
DESTINATION
${CPACK_INSTALL_PREFIX}
COMPONENT
NebulaGraphStudio
PATTERN "app/assets/components" EXCLUDE
PATTERN "app/assets/config" EXCLUDE
PATTERN "app/assets/context" EXCLUDE
PATTERN "app/assets/modules" EXCLUDE
PATTERN "app/assets/store" EXCLUDE
PATTERN "app/assets/utils" EXCLUDE
PATTERN "docs" EXCLUDE
PATTERN "docs/*" EXCLUDE
PATTERN ".git" EXCLUDE
PATTERN ".git/*" EXCLUDE
PATTERN "docker" EXCLUDE
PATTERN "docker/*" EXCLUDE
PATTERN "logs" EXCLUDE
PATTERN "logs/*" EXCLUDE
PATTERN "tmp/*" EXCLUDE
PATTERN "nebula-go-api" EXCLUDE
PATTERN "nebula-go-api/*" EXCLUDE
PATTERN ".github" EXCLUDE
PATTERN ".github/*" EXCLUDE
PATTERN ".gitignore" EXCLUDE
PATTERN "node_modules" EXCLUDE
PATTERN "node_modules/*" EXCLUDE
)