mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-23 01:50:35 +00:00
before this change, the filename in path of reloc package looks like: tools-scylla-5.4.0~dev-0.20230816.2eb6dc57297e.noarch.tar.gz but it should have been: scylla-tools-5.4.0~dev-0.20230816.2eb6dc57297e.noarch.tar.gz so, when repackaging the reloc tarball to rpm / deb, the scripts just fails to find the reloc tarball and fail. after this change, the filename is corrected to match with the one generated using `build_reloc.sh`. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
27 lines
1.1 KiB
CMake
27 lines
1.1 KiB
CMake
function(build_submodule name dir)
|
|
string(REPLACE "-" "~" scylla_version_tilde ${Scylla_VERSION})
|
|
set(version "${scylla_version_tilde}-${Scylla_RELEASE}")
|
|
set(scylla_version
|
|
"${Scylla_PRODUCT}-${scylla_version_tilde}-${Scylla_RELEASE}")
|
|
set(working_dir ${CMAKE_CURRENT_SOURCE_DIR}/${dir})
|
|
set(reloc_pkg "${working_dir}/build/${Scylla_PRODUCT}-${name}-${version}.noarch.tar.gz")
|
|
add_custom_command(
|
|
OUTPUT ${reloc_pkg}
|
|
COMMAND reloc/build_reloc.sh --version ${scylla_version} --nodeps ${ARGN}
|
|
WORKING_DIRECTORY "${working_dir}"
|
|
COMMENT "Generating submodule ${name} in ${dir}"
|
|
JOB_POOL submodule_pool)
|
|
add_custom_target(dist-${name}-tar
|
|
DEPENDS ${reloc_pkg})
|
|
add_custom_target(dist-${name}-rpm
|
|
COMMAND reloc/build_rpm.sh --reloc-pkg ${reloc_pkg}
|
|
DEPENDS ${reloc_pkg}
|
|
WORKING_DIRECTORY "${working_dir}")
|
|
add_custom_target(dist-${name}-deb
|
|
COMMAND reloc/build_deb.sh --reloc-pkg ${reloc_pkg}
|
|
DEPENDS ${reloc_pkg}
|
|
WORKING_DIRECTORY "${working_dir}")
|
|
add_custom_target(dist-${name}
|
|
DEPENDS dist-${name}-tar dist-${name}-rpm dist-${name}-deb)
|
|
endfunction()
|