# How to add post install script to source rpm?

**URL:** <https://discourse.cmake.org/t/how-to-add-post-install-script-to-source-rpm/7409>\
**Category:** Code\
**Tags:** cpack:rpm\
**Created:** [February 6, 2023, 2:23pm UTC](https://discourse.cmake.org/t/how-to-add-post-install-script-to-source-rpm/7409 "2023-02-06T14:23:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bthomasz](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ecc23a/32.png) [@bthomasz](https://discourse.cmake.org/u/bthomasz)\
**Post date:** [February 6, 2023, 2:23pm UTC](https://discourse.cmake.org/t/how-to-add-post-install-script-to-source-rpm/7409/1 "2023-02-06T14:23:23Z")

</div>

Dear CMakers/CPackers, there is an internal legacy software at work that I am distributing via RPM-s. My problem is that both the binary and source RPMs need to do some configurations at install time.  
The binary one is easy with setting CPACK\_RPM\_POST\_INSTALL\_SCRIPT\_FILE, but could not find a way to do the same for the source. Can somebody please give me some ideas?
