CPack/RPM fix - custom binary spec file handling

Fixes #16507
This commit is contained in:
Domen Vrankar 2017-01-10 08:37:14 +01:00
parent 12bea47fa4
commit 574c81e28c

View File

@ -2269,8 +2269,8 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@
# We should generate a USER spec file template:
# - either because the user asked for it : CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
# - or the user did not provide one : NOT CPACK_RPM_USER_BINARY_SPECFILE
set(RPMBUILD_FLAGS "-bb")
if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE)
set(RPMBUILD_FLAGS "-bb")
file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in
"# -*- rpm-spec -*-