oceanbase

Форк
0
/
RPM.cmake 
455 строк · 17.1 Кб
1
set(CPACK_GENERATOR "RPM")
2
# use seperated RPM SPECs and generate different RPMs
3
set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
4
set(CPACK_RPM_COMPONENT_INSTALL ON)
5
# use "server" as main component so its RPM filename won't have "server"
6
set(CPACK_RPM_MAIN_COMPONENT "server")
7
# let rpmbuild determine rpm filename
8
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
9
## Stardard debuginfo generating instructions in cmake.  However 6u
10
## server with rpm-4.8.0 which doesn't support dwarf4 won't generate
11
## BUILDID for RPM. And Our debuginfo package doesn't contain source
12
## code. Thus we don't use the way cmake sugguests.
13
#set(CPACK_RPM_DEBUGINFO_PACKAGE ON)
14
#set(CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX "/usr/src/debug")
15
# RPM package informations.
16
set(CPACK_PACKAGING_INSTALL_PREFIX /home/admin/oceanbase)
17
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OceanBase is a distributed relational database")
18
set(CPACK_PACKAGE_VENDOR "OceanBase Inc.")
19
set(CPACK_RPM_PACKAGE_RELEASE ${OB_RELEASEID})
20
if (OB_BUILD_OPENSOURCE)
21
set(CPACK_PACKAGE_NAME "oceanbase-ce")
22
set(CPACK_PACKAGE_VERSION "${OceanBase_CE_VERSION}")
23
set(CPACK_PACKAGE_VERSION_MAJOR "${OceanBase_CE_VERSION_MAJOR}")
24
set(CPACK_PACKAGE_VERSION_MINOR "${OceanBase_CE_VERSION_MINOR}")
25
set(CPACK_PACKAGE_VERSION_PATCH "${OceanBase_CE_VERSION_PATCH}")
26
set(CPACK_RPM_PACKAGE_URL "${OceanBase_CE_HOMEPAGE_URL}")
27
set(CPACK_RPM_PACKAGE_RELEASE_DIST ON)
28
## set relocation path install prefix for each component
29
set(CPACK_RPM_DEVEL_PACKAGE_PREFIX /usr)
30
set(CPACK_RPM_UTILS_PACKAGE_PREFIX /usr)
31
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/home")
32
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/home/admin")
33
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/home/admin/oceanbase")
34
else()
35
set(CPACK_PACKAGE_NAME "oceanbase")
36
set(CPACK_PACKAGE_VERSION "${OceanBase_VERSION}")
37
set(CPACK_PACKAGE_VERSION_MAJOR "${OceanBase_VERSION_MAJOR}")
38
set(CPACK_PACKAGE_VERSION_MINOR "${OceanBase_VERSION_MINOR}")
39
set(CPACK_PACKAGE_VERSION_PATCH "${OceanBase_VERSION_PATCH}")
40
set(CPACK_RPM_PACKAGE_URL "${OceanBase_HOMEPAGE_URL}")
41
endif()
42
set(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
43
set(CPACK_RPM_PACKAGE_DESCRIPTION "OceanBase is a distributed relational database")
44
set(CPACK_RPM_PACKAGE_LICENSE "Mulan PubL v2.")
45
set(CPACK_RPM_DEFAULT_USER "admin")
46
set(CPACK_RPM_DEFAULT_GROUP "admin")
47
if (OB_BUILD_OPENSOURCE)
48
set(DEBUG_INSTALL_POST "mv $RPM_BUILD_ROOT/../server/home/admin/oceanbase/bin/obshell %{_builddir}/obshell; %{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} %{_builddir}/%{?buildsubdir}; mv %{_builddir}/obshell $RPM_BUILD_ROOT/../server/home/admin/oceanbase/bin/obshell; %{nil}")
49
else()
50
set(DEBUG_INSTALL_POST "%{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} %{_builddir}/%{?buildsubdir};%{nil}")
51
endif()
52
set(CPACK_RPM_SPEC_MORE_DEFINE
53
  "%global _missing_build_ids_terminate_build 0
54
%global _find_debuginfo_opts -g
55
%define __strip ${CMAKE_SOURCE_DIR}/deps/3rd/usr/local/oceanbase/devtools/bin/llvm-strip
56
%undefine __brp_mangle_shebangs
57
%global __requires_exclude ^\(/bin/bash\|/usr/bin/\.*\)$
58
%define __debug_install_post ${DEBUG_INSTALL_POST}
59
%if \\\"%name\\\" != \\\"oceanbase-ce-sql-parser\\\" && \\\"%name\\\" != \\\"oceanbase-sql-parser\\\"
60
%debug_package
61
%endif
62
")
63

64
if (OB_BUILD_OPENSOURCE)
65
  set(CPACK_RPM_PACKAGE_REQUIRES "jq, systemd")
66

67
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/oceanbase-service.sh.template
68
                ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/oceanbase-service.sh
69
                @ONLY)
70
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/telemetry.sh.template
71
                ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/telemetry.sh
72
                @ONLY)
73

74
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/post_install.sh.template
75
                ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/post_install.sh
76
                @ONLY)
77
  set(CPACK_RPM_SERVER_POST_INSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/post_install.sh)
78

79
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/pre_uninstall.sh.template
80
                ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/pre_uninstall.sh
81
                @ONLY)
82
  set(CPACK_RPM_SERVER_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/pre_uninstall.sh)
83

84
  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/post_uninstall.sh.template
85
                ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/post_uninstall.sh
86
                @ONLY)
87
  set(CPACK_RPM_SERVER_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/tools/rpm/systemd/profile/post_uninstall.sh)
88
endif()
89

90
## TIPS
91
#
92
# - PATH is relative to the **ROOT directory** of project other than the cmake directory.
93

94
set(BITCODE_TO_ELF_LIST "")
95

96
## server
97
if (OB_BUILD_OPENSOURCE)
98
install(PROGRAMS
99
  tools/import_time_zone_info.py
100
  tools/import_srs_data.py
101
  ${CMAKE_BINARY_DIR}/src/observer/observer
102
  deps/3rd/home/admin/oceanbase/bin/obshell
103
  DESTINATION bin
104
  COMPONENT server)
105
else()
106
install(PROGRAMS
107
  script/dooba/dooba
108
  tools/import_time_zone_info.py
109
  tools/import_srs_data.py
110
  ${CMAKE_BINARY_DIR}/tools/ob_admin/ob_admin
111
  tools/ob_admin/io_bench/bench_io.sh
112
  ${CMAKE_BINARY_DIR}/src/observer/observer
113
  ${DEVTOOLS_DIR}/bin/obstack
114
  DESTINATION bin
115
  COMPONENT server)
116
endif()
117

118
install(FILES
119
  src/sql/fill_help_tables-ob.sql
120
  src/share/parameter/default_parameter.json
121
  src/share/system_variable/default_system_variable.json
122
  tools/timezone_V1.log
123
  tools/default_srs_data_mysql.sql
124
  tools/upgrade/upgrade_pre.py
125
  tools/upgrade/upgrade_post.py
126
  tools/upgrade/upgrade_checker.py
127
  tools/upgrade/upgrade_health_checker.py
128
  tools/upgrade/oceanbase_upgrade_dep.yml
129
  DESTINATION etc
130
  COMPONENT server)
131

132
install(
133
  DIRECTORY src/share/inner_table/sys_package/
134
  DESTINATION admin
135
  COMPONENT server)
136

137
if (OB_BUILD_OPENSOURCE)
138
install(FILES
139
  tools/rpm/systemd/profile/oceanbase.cnf
140
  tools/rpm/systemd/profile/oceanbase-pre.json
141
  tools/rpm/systemd/profile/oceanbase.service
142
  tools/rpm/systemd/profile/oceanbase-service.sh
143
  tools/rpm/systemd/profile/post_install.sh
144
  tools/rpm/systemd/profile/post_uninstall.sh
145
  tools/rpm/systemd/profile/pre_uninstall.sh
146
  tools/rpm/systemd/profile/telemetry.sh
147
  DESTINATION profile
148
  COMPONENT server)
149
endif()
150

151
## oceanbase-cdc
152
if (NOT OB_SO_CACHE AND OB_BUILD_CDC)
153
include(GNUInstallDirs)
154
install(
155
  TARGETS obcdc obcdc_tailf
156
  COMPONENT cdc
157
  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
158
  RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
159
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
160
  PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libobcdc
161
  )
162

163
get_property(CDCMSG_HEADER_DIR GLOBAL PROPERTY CDC_MSG_HEADER_DIR)
164
install(
165
  DIRECTORY
166
  ${CDCMSG_HEADER_DIR}
167
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
168
  COMPONENT cdc
169
  )
170
install(
171
  DIRECTORY
172
    ${PROJECT_SOURCE_DIR}/src/logservice/libobcdc/tests/scripts/
173
    DESTINATION ${CMAKE_INSTALL_RUNSTATEDIR}
174
  COMPONENT cdc
175
  )
176

177
if(OB_BUILD_OPENSOURCE)
178
install(
179
  FILES
180
    ${PROJECT_SOURCE_DIR}/src/logservice/libobcdc/tests/libobcdc.conf
181
    ${PROJECT_SOURCE_DIR}/tools/upgrade/obcdc_compatiable_ob_info.yaml
182
    DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}
183
  COMPONENT cdc
184
  )
185
else()
186
install(
187
  FILES
188
    ${PROJECT_SOURCE_DIR}/src/logservice/libobcdc/tests/libobcdc.conf
189
    ${PROJECT_SOURCE_DIR}/tools/upgrade/obcdc_compatiable_ob_info.yaml
190
    ${PROJECT_SOURCE_DIR}/src/logservice/libobcdc/tests/timezone_info.conf
191
    DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}
192
  COMPONENT cdc
193
  )
194
endif()
195
endif()
196

197
## oceanbase-sql-parser
198
if (OB_BUILD_LIBOB_SQL_PROXY_PARSER)
199

200
  if (ENABLE_THIN_LTO)
201
    message(STATUS "add libob_sql_proxy_parser_static_to_elf")
202
    add_custom_command(
203
      OUTPUT libob_sql_proxy_parser_static_to_elf
204
      COMMAND ${CMAKE_SOURCE_DIR}/cmake/script/bitcode_to_elfobj --ld=${OB_LD_BIN} --input=${CMAKE_BINARY_DIR}/src/sql/parser/libob_sql_proxy_parser_static.a --output=${CMAKE_BINARY_DIR}/src/sql/parser/libob_sql_proxy_parser_static.a
205
      DEPENDS ob_sql_proxy_parser_static
206
      COMMAND_EXPAND_LISTS)
207
    list(APPEND BITCODE_TO_ELF_LIST libob_sql_proxy_parser_static_to_elf)
208
  endif()
209

210
  install(PROGRAMS
211
    ${CMAKE_BINARY_DIR}/src/sql/parser/libob_sql_proxy_parser_static.a
212
    DESTINATION lib
213
    COMPONENT sql-parser
214
    )
215
endif()
216

217
install(FILES
218
  src/objit/include/objit/common/ob_item_type.h
219
  deps/oblib/src/common/sql_mode/ob_sql_mode.h
220
  src/sql/parser/ob_sql_parser.h
221
  src/sql/parser/parse_malloc.h
222
  src/sql/parser/parser_proxy_func.h
223
  src/sql/parser/parse_node.h
224
  DESTINATION include
225
  COMPONENT sql-parser)
226

227
install(FILES
228
  src/objit/include/objit/common/ob_item_type.h
229
  deps/oblib/src/common/sql_mode/ob_sql_mode.h
230
  src/sql/parser/ob_sql_parser.h
231
  src/sql/parser/parse_malloc.h
232
  src/sql/parser/parser_proxy_func.h
233
  src/sql/parser/parse_node.h
234
  DESTINATION include
235
  COMPONENT sql-parser)
236

237
## oceanbsae-table
238
install(FILES
239
  deps/oblib/src/common/data_buffer.h
240
  deps/oblib/src/common/ob_accuracy.h
241
  deps/oblib/src/common/ob_action_flag.h
242
  deps/oblib/src/common/ob_common_utility.h
243
  deps/oblib/src/common/ob_range.h
244
  deps/oblib/src/common/ob_region.h
245
  deps/oblib/src/common/ob_role.h
246
  deps/oblib/src/common/ob_string_buf.h
247
  deps/oblib/src/common/ob_string_buf.ipp
248
  deps/oblib/src/common/ob_timeout_ctx.h
249
  deps/oblib/src/common/ob_zerofill_info.h
250
  deps/oblib/src/common/ob_zone.h
251
  deps/oblib/src/common/object/ob_obj_type.h
252
  deps/oblib/src/common/object/ob_object.h
253
  deps/oblib/src/common/rowkey/ob_rowkey.h
254
  deps/oblib/src/common/rowkey/ob_rowkey_info.h
255
  deps/oblib/src/lib/alloc/abit_set.h
256
  deps/oblib/src/lib/alloc/alloc_assist.h
257
  deps/oblib/src/lib/alloc/alloc_func.h
258
  deps/oblib/src/lib/alloc/alloc_struct.h
259
  deps/oblib/src/lib/alloc/block_set.h
260
  deps/oblib/src/lib/alloc/ob_malloc_allocator.h
261
  deps/oblib/src/lib/alloc/ob_tenant_ctx_allocator.h
262
  deps/oblib/src/lib/alloc/object_mgr.h
263
  deps/oblib/src/lib/alloc/object_set.h
264
  deps/oblib/src/lib/allocator/ob_allocator.h
265
  deps/oblib/src/lib/allocator/ob_cached_allocator.h
266
  deps/oblib/src/lib/allocator/ob_concurrent_fifo_allocator.h
267
  deps/oblib/src/lib/allocator/ob_fifo_allocator.h
268
  deps/oblib/src/lib/allocator/ob_lf_fifo_allocator.h
269
  deps/oblib/src/lib/allocator/ob_malloc.h
270
  deps/oblib/src/lib/allocator/ob_mod_define.h
271
  deps/oblib/src/lib/allocator/ob_pcounter.h
272
  deps/oblib/src/lib/allocator/ob_pooled_allocator.h
273
  deps/oblib/src/lib/allocator/ob_retire_station.h
274
  deps/oblib/src/lib/allocator/ob_small_allocator.h
275
  deps/oblib/src/lib/allocator/ob_tc_malloc.h
276
  deps/oblib/src/lib/allocator/page_arena.h
277
  deps/oblib/src/lib/atomic/ob_atomic.h
278
  deps/oblib/src/lib/atomic/ob_atomic_reference.h
279
  deps/oblib/src/lib/charset/ob_charset.h
280
  deps/oblib/src/lib/charset/ob_config.h
281
  deps/oblib/src/lib/charset/ob_ctype.h
282
  deps/oblib/src/lib/charset/ob_mysql_global.h
283
  deps/oblib/src/lib/checksum/ob_crc64.h
284
  deps/oblib/src/lib/container/ob_array.h
285
  deps/oblib/src/lib/container/ob_array_helper.h
286
  deps/oblib/src/lib/container/ob_array_iterator.h
287
  deps/oblib/src/lib/container/ob_array_serialization.h
288
  deps/oblib/src/lib/container/ob_array_wrap.h
289
  deps/oblib/src/lib/container/ob_bit_set.h
290
  deps/oblib/src/lib/container/ob_fixed_array.h
291
  deps/oblib/src/lib/container/ob_iarray.h
292
  deps/oblib/src/lib/container/ob_se_array.h
293
  deps/oblib/src/lib/container/ob_vector.h
294
  deps/oblib/src/lib/container/ob_vector.ipp
295
  deps/oblib/src/lib/core_local/ob_core_local_storage.h
296
  deps/oblib/src/lib/file/config.h
297
  deps/oblib/src/lib/file/ob_string_util.h
298
  deps/oblib/src/lib/hash/mprotect.h
299
  deps/oblib/src/lib/hash/ob_array_index_hash_set.h
300
  deps/oblib/src/lib/hash/ob_hashmap.h
301
  deps/oblib/src/lib/hash/ob_hashset.h
302
  deps/oblib/src/lib/hash/ob_hashtable.h
303
  deps/oblib/src/lib/hash/ob_hashutils.h
304
  deps/oblib/src/lib/hash/ob_iteratable_hashmap.h
305
  deps/oblib/src/lib/hash/ob_linear_hash_map.h
306
  deps/oblib/src/lib/hash/ob_placement_hashutils.h
307
  deps/oblib/src/lib/hash/ob_pointer_hashmap.h
308
  deps/oblib/src/lib/hash/ob_serialization.h
309
  deps/oblib/src/lib/hash_func/murmur_hash.h
310
  deps/oblib/src/lib/hash_func/ob_hash_func.h
311
  deps/oblib/src/lib/json/ob_yson.h
312
  deps/oblib/src/lib/json/ob_yson_encode.h
313
  deps/oblib/src/lib/list/ob_dlink_node.h
314
  deps/oblib/src/lib/list/ob_dlist.h
315
  deps/oblib/src/lib/list/ob_list.h
316
  deps/oblib/src/lib/lock/cond.h
317
  deps/oblib/src/lib/lock/ob_lock.h
318
  deps/oblib/src/lib/lock/ob_monitor.h
319
  deps/oblib/src/lib/lock/mutex.h
320
  deps/oblib/src/lib/lock/ob_bucket_lock.h
321
  deps/oblib/src/lib/lock/ob_drw_lock.h
322
  deps/oblib/src/lib/lock/ob_latch.h
323
  deps/oblib/src/lib/lock/ob_lock_guard.h
324
  deps/oblib/src/lib/lock/ob_mutex.h
325
  deps/oblib/src/lib/lock/ob_small_spin_lock.h
326
  deps/oblib/src/lib/lock/ob_spin_lock.h
327
  deps/oblib/src/lib/lock/ob_spin_rwlock.h
328
  deps/oblib/src/lib/lock/ob_thread_cond.h
329
  deps/oblib/src/lib/lock/ob_rwlock.h
330
  deps/oblib/src/lib/metrics/ob_counter.h
331
  deps/oblib/src/lib/net/ob_addr.h
332
  deps/oblib/src/lib/net/ob_net_util.h
333
  deps/oblib/src/lib/number/ob_number_v2.h
334
  deps/oblib/src/lib/ob_date_unit_type.h
335
  deps/oblib/src/lib/ob_define.h
336
  deps/oblib/src/lib/ob_errno.h
337
  deps/oblib/src/lib/ob_name_def.h
338
  deps/oblib/src/lib/ob_name_id_def.h
339
  deps/oblib/src/lib/oblog/ob_log.h
340
  deps/oblib/src/lib/oblog/ob_log_module.h
341
  deps/oblib/src/lib/oblog/ob_log_print_kv.h
342
  deps/oblib/src/lib/oblog/ob_trace_log.h
343
  deps/oblib/src/lib/profile/ob_atomic_event.h
344
  deps/oblib/src/lib/queue/ob_dedup_queue.h
345
  deps/oblib/src/lib/queue/ob_fixed_queue.h
346
  deps/oblib/src/lib/queue/ob_link.h
347
  deps/oblib/src/lib/random/ob_random.h
348
  deps/oblib/src/lib/resource/achunk_mgr.h
349
  deps/oblib/src/lib/resource/ob_cache_washer.h
350
  deps/oblib/src/lib/resource/ob_resource_mgr.h
351
  deps/oblib/src/lib/stat/ob_latch_define.h
352
  deps/oblib/src/lib/string/ob_fixed_length_string.h
353
  deps/oblib/src/lib/string/ob_string.h
354
  deps/oblib/src/lib/string/ob_strings.h
355
  deps/oblib/src/lib/thread_local/ob_tsi_factory.h
356
  deps/oblib/src/lib/thread_local/ob_tsi_utils.h
357
  deps/oblib/src/lib/time/Time.h
358
  deps/oblib/src/lib/time/ob_time_utility.h
359
  deps/oblib/src/lib/timezone/ob_time_convert.h
360
  deps/oblib/src/lib/timezone/ob_timezone_info.h
361
  deps/oblib/src/lib/trace/ob_seq_event_recorder.h
362
  deps/oblib/src/lib/trace/ob_trace_event.h
363
  deps/oblib/src/lib/utility/ob_hang_fatal_error.h
364
  deps/oblib/src/lib/utility/ob_macro_utils.h
365
  deps/oblib/src/lib/utility/ob_print_kv.h
366
  deps/oblib/src/lib/utility/ob_print_utils.h
367
  deps/oblib/src/lib/utility/ob_rate_limiter.h
368
  deps/oblib/src/lib/utility/ob_serialization_helper.h
369
  deps/oblib/src/lib/utility/ob_template_utils.h
370
  deps/oblib/src/lib/utility/ob_unify_serialize.h
371
  deps/oblib/src/lib/utility/serialization.h
372
  deps/oblib/src/lib/utility/utility.h
373
  deps/oblib/src/lib/wait_event/ob_wait_class.h
374
  deps/oblib/src/lib/wait_event/ob_wait_event.h
375
  src/share/config/ob_common_config.h
376
  src/share/config/ob_config.h
377
  src/share/config/ob_config_helper.h
378
  src/share/mysql_errno.h
379
  src/share/object/ob_obj_cast.h
380
  src/share/partition_table/ob_partition_location.h
381
  src/share/table/ob_table.h
382
  src/share/table/ob_table_rpc_proxy.h
383
  src/share/table/ob_table_rpc_struct.h
384
  src/libtable/src/libobtable.h
385
  src/libtable/src/ob_table.h
386
  src/libtable/src/ob_hkv_table.h
387
  src/libtable/src/ob_pstore.h
388
  src/libtable/src/ob_table_service_client.h
389
  src/libtable/src/ob_table_service_config.h
390
  src/libtable/src/ob_table_define.h
391
  DESTINATION include
392
  COMPONENT table)
393

394
install(FILES
395
  src/libtable/examples/ob_pstore_example.cpp
396
  src/libtable/examples/ob_kvtable_example.cpp
397
  src/libtable/examples/ob_table_example.cpp
398
  src/libtable/examples/example_makefile.mk
399
  DESTINATION examples
400
  COMPONENT table)
401

402
if (OB_BUILD_LIBOBTABLE)
403

404
  if (ENABLE_THIN_LTO)
405
    message(STATUS "add libobtable_static_to_elf")
406
    add_custom_command(
407
      OUTPUT libobtable_static_to_elf
408
      COMMAND ${CMAKE_SOURCE_DIR}/cmake/script/bitcode_to_elfobj --ld=${OB_LD_BIN} --input=${CMAKE_BINARY_DIR}/src/libtable/src/libobtable_static.a --output=${CMAKE_BINARY_DIR}/src/libtable/src/libobtable_static.a
409
      DEPENDS obtable_static
410
      COMMAND_EXPAND_LISTS)
411
      list(APPEND BITCODE_TO_ELF_LIST libobtable_static_to_elf)
412
  endif()
413

414
  install(PROGRAMS
415
    ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable.so
416
    ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable.so.1
417
    ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable.so.1.0.0
418
    ${CMAKE_BINARY_DIR}/src/libtable/src/libobtable_static.a
419
    DESTINATION lib
420
    COMPONENT table)
421
endif()
422

423
if(OB_BUILD_OPENSOURCE)
424
## oceanbase-libs
425
install(PROGRAMS
426
  deps/3rd/usr/local/oceanbase/deps/devel/lib/libaio.so.1
427
  deps/3rd/usr/local/oceanbase/deps/devel/lib/libaio.so.1.0.1
428
  deps/3rd/usr/local/oceanbase/deps/devel/lib/libaio.so
429
  deps/3rd/usr/local/oceanbase/deps/devel/lib/mariadb/libmariadb.so
430
  deps/3rd/usr/local/oceanbase/deps/devel/lib/mariadb/libmariadb.so.3
431
  DESTINATION lib
432
  COMPONENT libs
433
)
434
if(OB_BUILD_OBADMIN)
435
    ## oceanbase-utils
436
    install(PROGRAMS
437
      ${CMAKE_BINARY_DIR}/tools/ob_admin/ob_admin
438
      ${CMAKE_BINARY_DIR}/tools/ob_error/src/ob_error
439
      DESTINATION /usr/bin
440
      COMPONENT utils
441
    )
442
  endif()
443
endif()
444

445
# install cpack to make everything work
446
include(CPack)
447

448
#add rpm target to create RPMS
449
add_custom_target(rpm
450
  COMMAND +make package
451
  DEPENDS
452
  observer obcdc_tailf obtable obtable_static
453
  ob_admin ob_error ob_sql_proxy_parser_static
454
  ${BITCODE_TO_ELF_LIST}
455
  )
456

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.