Writing spec files: reusable code...

Alice Wonder alicewonder at shastaherps.org
Tue May 14 10:08:36 UTC 2013


On Tue, 2013-05-14 at 12:58 +0300, Panu Matilainen wrote:
> On 05/14/2013 12:31 PM, Alice Wonder wrote:
> > On Tue, 2013-05-14 at 10:59 +0200, Thomas Lehmann wrote:
> >> Hi,
> >>
> >> thinking of some shell scripting being reusable...
> >> Is it somehow possible to write some shell scripting
> >> code once and to reuse it in different scriptlet sections?
> >
> > Yes, define it as a macro.
> 
> ...or use %include, or if you want to reuse the entire script for 
> different sections you can do eg
> 
> %pre -f <script file>
> 
> %post -f <script file>
> 
> 	- Panu -

When doing that, does RPM automatically include it in the src.rpm or
does it have to be declared as a source file?



More information about the Rpm-list mailing list