Commit ecc27113 authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent 86e80f94
...@@ -260,5 +260,24 @@ ENDIF(compat_rpm) ...@@ -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_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") 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment