I have got a macro in my spec file
%{!?myloc: %{expand: %%define myloc loc1}}
I am using this in my %install section
mkdir -p $RPM_BUILD_ROOT/scratch/%{myloc}
cp /scratch/tmp/readme.txt $RPM_BUILD_ROOT/scratch/%{myloc}/read_me.txt
chmod 777 $RPM_BUILD_ROOT/scratch/%{myloc}/read_me.txt
Now while buiding if I give
rpmbuild -ba myspec.spec --define 'myloc loc2'
it replaces the myloc correctly and the rpm is built with /scratch/loc2/read_me.txt entries, but when I want to do the same thing during install, it doesnt respond to the --define part at all. Will the --define not work with rpm -ivh ? because the rpm is already built with the myloc substituted with loc2 ?
Is there any workaround ?
Thanks
Lakshmi
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list