diff options
author | Brad King <brad.king@kitware.com> | 2020-02-26 13:52:02 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-02-26 13:52:09 (GMT) |
commit | ab2d170c746d7cb68c39e9577cdaabc66668c0aa (patch) | |
tree | 329ca621d81139f7397a0d9105cdc753d96d9115 /Modules | |
parent | db3cfac375cdc3d51335c216b09168bd60f765d8 (diff) | |
parent | c0534c4a68ed421abbda357d98d7f687009751dd (diff) | |
download | CMake-ab2d170c746d7cb68c39e9577cdaabc66668c0aa.zip CMake-ab2d170c746d7cb68c39e9577cdaabc66668c0aa.tar.gz CMake-ab2d170c746d7cb68c39e9577cdaabc66668c0aa.tar.bz2 |
Merge topic 'CPackRPM-trans-scripts'
c0534c4a68 CPackRPM: Add PRE_/POST_TRANS scripts
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4387
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Internal/CPack/CPackRPM.cmake | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 3485e7d..08bbc68 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -1099,16 +1099,18 @@ function(cpack_rpm_generate_package) # CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE) # CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE) - # May be used to embed a post (un)installation script in the spec file. + # CPACK_RPM_POST_TRANS_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_TRANS_SCRIPT_FILE) + # May be used to embed a post installation/uninstallation/transaction script in the spec file. # The referred script file(s) will be read and directly - # put after the %post or %postun section + # put after the %post or %postun or %posttrans section # ---------------------------------------------------------------- # CPACK_RPM_PRE_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_INSTALL_SCRIPT_FILE) # CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_UNINSTALL_SCRIPT_FILE) - # May be used to embed a pre (un)installation script in the spec file. + # CPACK_RPM_PRE_TRANS_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_PRE_TRANS_SCRIPT_FILE) + # May be used to embed a pre installation/uninstallation/transaction script in the spec file. # The referred script file(s) will be read and directly - # put after the %pre or %preun section - foreach(RPM_SCRIPT_FILE_TYPE_ "INSTALL" "UNINSTALL") + # put after the %pre or %preun or %pretrans section + foreach(RPM_SCRIPT_FILE_TYPE_ "INSTALL" "UNINSTALL" "TRANS") foreach(RPM_SCRIPT_FILE_TIME_ "PRE" "POST") set("CPACK_RPM_${RPM_SCRIPT_FILE_TIME_}_${RPM_SCRIPT_FILE_TYPE_}_READ_FILE" "${CPACK_RPM_${RPM_SCRIPT_FILE_TIME_}_${RPM_SCRIPT_FILE_TYPE_}_SCRIPT_FILE}") @@ -1727,12 +1729,18 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT \@RPM_SYMLINK_POSTINSTALL\@ \@CPACK_RPM_SPEC_POSTINSTALL\@ +%posttrans +\@CPACK_RPM_SPEC_POSTTRANS\@ + %postun \@CPACK_RPM_SPEC_POSTUNINSTALL\@ %pre \@CPACK_RPM_SPEC_PREINSTALL\@ +%pretrans +\@CPACK_RPM_SPEC_PRETRANS\@ + %preun \@CPACK_RPM_SPEC_PREUNINSTALL\@ |