[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem: CVS RPM package relocation incomplete
From: |
Martin Roehrig |
Subject: |
Problem: CVS RPM package relocation incomplete |
Date: |
Tue, 17 Dec 2002 11:40:47 +0100 |
I tried to make a RPM package from the CVS 1.11.2 sources and was mostly
successfull without problems.
However playing around a bit I found that it is not fully relocatable, as the
paths used in the %post and %preun install time scripts are fixed to the
location where they where at *build* time (of the package), even if I use a
different --prefix option at *install* time.
Here is the part of the spec file I'm refering to:
%post
/sbin/install-info /%{_infodir}/cvs.info.gz /%{_infodir}/dir
/sbin/install-info /%{_infodir}/cvsclient.info.gz /%{_infodir}/dir
%preun
if [ $1 = 0 ]; then
# uninstall the info reference in the dir file
/sbin/install-info --delete /%{_infodir}/cvs.info.gz /%{_infodir}/dir
/sbin/install-info --delete /%{_infodir}/cvsclient.info.gz /%{_infodir}/dir
fi
Apparently the problem is that %{_infodir} is only a build time macro and
therefore these paths are fixed after the package is built and RPMs path
substitution works only on the %files section, not on the install scripts.
I read the whole Maximum RPM document (by RedHat) and some other material but
obviously I am not yet experienced enough in RPM package building to imagine a
solution to that problem.
Is there somebody who could give me a hint how to fix that?
Best regards
Martin
- Problem: CVS RPM package relocation incomplete,
Martin Roehrig <=