I am pulling my hair out over an issue I am having with building rpms through LTIB. I am trying to write my own spec file and for some reason It seems as though simple macros I have defined will not expand within the %Files section.
For example, at the top of my spec file I have the following:
%define myfilepath %{pfx}/lib/python%{pyver}/site-packages/wx-2.8-gtk2-unicode/
and my %Files section looks like this:
%Files
%defattr(-,root,root)
%{myfilepath}
Yet when I run ./ltib -m scdeploy -p I get the following error
RPM build errors: File must begin with "/": %{myfilepath} Build time for wxPython: 0 seconds
Is there something I'm missing? Nowhere in the documentation do I see that macros are dissallowed in the %Files section. predefined macros seem to expand fine within the %files section but any macro I have defined with %define in the header of my spec file acts as though its undefined when I am running ltib with the scdeploy option. Macros all work as expected when executing ltib withprep, scbuild and scinstall modes.
Edit: Using ltib version 9.1.1, rpmbuild version 4.0.4