CPackRPM: avoid a spurious ; in the %pre and other sections with scripts

This was accidentally added by commit 34c8a23044 (CPackRPM: add
scriplets tags only if scripts exist, 2021-04-01, v3.21.0-rc1~387^2).

Fixes: #22501
This commit is contained in:
Artur Samarin
2021-07-30 19:38:56 +03:00
committed by Brad King
parent e9b8d6fdbc
commit 3cdf23985f

View File

@@ -11,9 +11,7 @@ function(set_spec_script_if_enabled TYPE PACKAGE_NAME VAR)
if(PACKAGE_NAME)
set(PACKAGE_NAME " -n ${PACKAGE_NAME}")
endif()
set(${TYPE}_
"%${TYPE}${PACKAGE_NAME}\n"
"${VAR}\n" PARENT_SCOPE)
set(${TYPE}_ "%${TYPE}${PACKAGE_NAME}\n${VAR}\n" PARENT_SCOPE)
else()
set(${TYPE} "" PARENT_SCOPE)
endif()