I have a spec file which unpacks a library which is deployed at location which is exported in the shell.ie %file${AXIS2_C}/bin/services/services.xmlThis fails with : error: File not found: root/rpmbuild/BUILDROOT/i386/${AXIS2_C}/bin/services/services.xmlI.e the shell variable does not get expanded. Is there any way around this ?Thanks!
SPEC %files attribute and Shell variables
linux;fedora;rhel;rpm
Unfortunately, anything defined in the shell started by the %prep, %build or %install sections isn't preserved in the build environment.  You'd need to define %{AXIS2_C}, a MACRO variable (not a shell variable):%define AXIS2_C /usr/local/somethingand then refer to it in both your shells asmake whatever FOO=%{AXIS2_C} # or however you used the env variableand then in the %files section, use%file%{AXIS2_C}/bin/services/services.xmlUsually, the initial %define is at the top of the spec file, with some documentation about what it is for.  If you need to dynamically set the macro, you'll have to use more complex RPM spec macro commands like %() to do shell expansions. 