[Mageia-discuss] Trying to learn a little about packaging

Remy CLOUARD shikamaru at mandriva.org
Thu Jan 13 22:57:11 CET 2011


On Thu, Jan 13, 2011 at 09:41:46AM +0200, P. Christeas wrote:
> On Thursday 13 January 2011, Hoyt Duff wrote:
> > ... 
> > I contacted the author, who says the rpm will build on Fedora. He
> > says: "Path error. The .spec file "%define _prefix /usr/local"
> > (compare with a "./configure --prefix=/usr/local") and in the %files
> > section "%{_libdir}/%{name}" should pick up "%_prefix". For some
> > reason it doesn't but then again I never built RPM's on Mandriva...
> > 
> > ... and gave me a hack to try that fails also with an error he has
> > never seen before,
> > error: Package already exists: %package __restore__
> > 
> > Can someone point me to where in the Mandriva docs I can find info on
> > what might be going wrong? Thanks.
> 
> (by just looking at your mail, no deeper look at rkhunter or else)
> 
> The prefix should be "/usr", and not explicitly defined in the project's spec. 
> Reason: all software that is installed through distro packages goes to /usr. 
> All other that installs through "./install.sh" or custom hacks goes to 
> "/usr/local"
> So, make sure that "/usr/local" is _not_ the path passed to ./configure and 
> used to install files onto.
> 
That’s true.

I would add that we also have preconfigured macro that ensures standard
directories are respected (among other things).

Could you try using %configure2_5x instead of ./configure ? the prefix
part should be dropped.

If you are curious about what it does, you could try rpm --eval
%configure2_5x :-)

Regards,
-- 
Rémy CLOUARD
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
URL: </pipermail/mageia-discuss/attachments/20110113/e9f7b72a/attachment.asc>


More information about the Mageia-discuss mailing list