diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-03-29 19:40:56 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-03-29 19:41:41 +0100 |
commit | 4e1d3f83b79cd5f3a920937b462e585fdfb5a35d (patch) | |
tree | 07e099b50109bd09ff8a5267c5cb5e0bf89597b4 /cmake/cpack_rpm.cmake | |
parent | a82cfe109cbc033253ddaba82f9c2de663601002 (diff) | |
parent | cc71e7501cb623b2d600c47dbe10a31dcf6e8fcf (diff) | |
download | mariadb-git-4e1d3f83b79cd5f3a920937b462e585fdfb5a35d.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'cmake/cpack_rpm.cmake')
-rw-r--r-- | cmake/cpack_rpm.cmake | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 36d426257ea..7f24232242c 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -83,6 +83,12 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE " %define _sysconfdir ${INSTALL_SYSCONFDIR} %define restart_flag_dir %{_localstatedir}/lib/rpm-state/mariadb %define restart_flag %{restart_flag_dir}/need-restart + +%{?filter_setup: +%filter_from_provides /perl(\\\\(mtr\\\\|My::\\\\)/d +%filter_from_requires /\\\\(lib\\\\(ft\\\\|lzma\\\\|tokuportability\\\\)\\\\)\\\\|\\\\(perl(\\\\(.*mtr\\\\|My::\\\\|.*HandlerSocket\\\\|Mysql\\\\)\\\\)/d +%filter_setup +} ") # this creative hack is described here: http://www.cmake.org/pipermail/cmake/2012-January/048416.html @@ -202,7 +208,7 @@ ALTERNATIVE_NAME("server" "mysql-server") ALTERNATIVE_NAME("test" "mysql-test") # Argh! Different distributions call packages differently, to be a drop-in -# replacement we have to fake distribution-specificic dependencies +# replacement we have to fake distribution-specific dependencies IF(RPM MATCHES "(rhel|centos)6") ALTERNATIVE_NAME("client" "mysql") @@ -218,36 +224,6 @@ ELSEIF(RPM MATCHES "(rhel|centos)8") SET(PYTHON_SHEBANG "/usr/bin/python3") ENDIF() -# workaround for lots of perl dependencies added by rpmbuild -SETA(CPACK_RPM_test_PACKAGE_PROVIDES - "perl(lib::mtr_gcov.pl)" - "perl(lib::mtr_gprof.pl)" - "perl(lib::mtr_io.pl)" - "perl(lib::mtr_misc.pl)" - "perl(lib::mtr_process.pl)" - "perl(lib::v1/mtr_cases.pl)" - "perl(lib::v1/mtr_gcov.pl)" - "perl(lib::v1/mtr_gprof.pl)" - "perl(lib::v1/mtr_im.pl)" - "perl(lib::v1/mtr_io.pl)" - "perl(lib::v1/mtr_match.pl)" - "perl(lib::v1/mtr_misc.pl)" - "perl(lib::v1/mtr_process.pl)" - "perl(lib::v1/mtr_report.pl)" - "perl(lib::v1/mtr_stress.pl)" - "perl(lib::v1/mtr_timer.pl)" - "perl(lib::v1/mtr_unique.pl)" - "perl(mtr_cases)" - "perl(mtr_io.pl)" - "perl(mtr_match)" - "perl(mtr_misc.pl)" - "perl(mtr_gcov.pl)" - "perl(mtr_gprof.pl)" - "perl(mtr_process.pl)" - "perl(mtr_report)" - "perl(mtr_results)" - "perl(mtr_unique)") - # If we want to build build MariaDB-shared-compat, # extract compat libraries from MariaDB-shared-5.3 rpm FILE(GLOB compat53 RELATIVE ${CMAKE_SOURCE_DIR} @@ -294,4 +270,24 @@ IF(compat53 AND compat101) ENDIF() ENDIF() +################ +IF(CMAKE_VERSION VERSION_GREATER "3.9.99") + +SET(CPACK_SOURCE_GENERATOR "RPM") +SETA(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS + "-DBUILD_CONFIG=mysql_release" + "-DRPM=${RPM}" + "-DCPACK_RPM_BUILD_SOURCE_DIRS_PREFIX=/usr/src/debug/${CPACK_RPM_PACKAGE_NAME}-${VERSION}" + ) + +MACRO(ADDIF var) + IF(DEFINED ${var}) + SETA(CPACK_RPM_SOURCE_PKG_BUILD_PARAMS "-D${var}=${${var}}") + ENDIF() +ENDMACRO() + +ADDIF(BUILD_CONFIG) +ADDIF(WITH_SSL) + +ENDIF() ENDIF(RPM) |