[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Insert a %post into existing rpm?
- From: Daniel Grimwood <reaper ivec org>
- To: RPM Package Manager <rpm-list redhat com>
- Subject: Re: Insert a %post into existing rpm?
- Date: Mon, 9 Oct 2006 13:56:08 +0800
Hi all,
I used rpmrebuild and it turned out to be very easy; can do it
non-interactively on one line.
sudo rpmrebuild -p --change-spec-post="cat /home/daniel/post"
intel-ifort91037-9.1.037-1.i386.rpm
And the contents of /home/daniel/post:
%post
for FILE in $(find $RPM_INSTALL_PREFIX/bin/ -regex '.*[ei](cc|fort|fc|
cpc)$\|.*cfg$\|.*pcl$\|.*vars[^/]*.c?sh$' 2> /dev/null) ; do
sed s \<INSTALLDIR\>@$RPM_INSTALL_PREFIX g $FILE > ${FILE}.abs
mv ${FILE}.abs $FILE
chmod 755 $FILE
done
<snip other similar for loops>
Seems to work whether installing with the default prefix or overwriting with
rpm --prefix=/bla. Thanks Valery!
I submitted a support request to Intel in 2003 about this and got nowhere.
Hopefully by giving them the working spec file and a blurb about simplifying
their management I'll get somewhere this time around ;).
Mats the install script does ask some questions up front. In the Fortran
installation it gets us to accept a licence agreement before letting us
override the default installation directory. The change to the rpm file is
compatible with that. The C++ compiler is just as easy as well, but I'm not
sure about the IDE that goes with the C++ compiler, as I don't use it.
BTW I didn't want to use triggers because I also intend to convert the rpms to
deb format as we have a mix of Fedora and Debian machines. Alien converts it
fine, except it doesn't do anything with RPM_INSTALL_PREFIX. Something else
to work on....
Thanks all.
Daniel.
---------------------------------------------------------------------
Dr. Daniel Grimwood Room : 303.201
Nanochemistry Research Institute Email: reaper ivec org
Curtin University of Technology Phone: +61 8 9266 3780
P.O. Box U 1987, Perth Phone: +61 8 6436 8920
Western Australia, 6845 Australia Fax : +61 8 9266 4699
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]