I am building an RPM package that packages the various files that includes properties files, config files, scripts, JARs etc. Now when writing the %pre, %post, %preun and %postun scritptlets, I need to make use of some of the scripts that I have in say scripts/ folder (which has been packaged in RPM). So, I want to be able to do something like this:
%pre export scripts/important.sh someFunctionFromImportant parameter %post . scripts/anotherScript.sh someFuncFromAnotherScript parameters
Now, since I want to be able to just copy paste this RPM on any system and just install it and the
%post scriptlests must run.
I have already gone through so many tutorials and still searching for a way to accomplish this.
Note: My requirements do not allow me to have those scripts already present on that system where the RPM is being installed. It is like from the RPM file itself, everything should happen cleanly, the install along with the pre and post install scripts.