diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-03-16 19:33:07 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-03-27 22:51:37 +0100 |
commit | ecc2711328e2e6e77758b9fe6c2a9892a2fe9192 (patch) | |
tree | b555a2ba6c2cb85120cd260b8277ff06b1326363 /cmake | |
parent | 86e80f944fede44afc1c236a841d5417eebe04cb (diff) | |
download | mariadb-git-ecc2711328e2e6e77758b9fe6c2a9892a2fe9192.tar.gz |
MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)
create source RPM cpack-way
when building binary packages, this source rpm will use
same BUILD_CONFIG and WITH_SSL values that were used when
creating the source RPM.
Only do it for a reasonably new cmake, where
source rpms are known to work (3.10.2 is ok, 3.5.2 is not).
And force a shorter CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX so that
a source rpm could be built from a standard location in /usr/src
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/cpack_rpm.cmake | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index 6321b125f84..bfc06d52efe 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -260,5 +260,24 @@ ENDIF(compat_rpm) SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1 SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5") -ENDIF(RPM) +################ +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) |