[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Expanding a Macro during install ???
- From: Lakshmi V <lakshmi granger gmail com>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Expanding a Macro during install ???
- Date: Wed, 15 Feb 2006 16:46:55 +0530
Hi all
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]