[lug] Building RPMs - alternate install directories

David L. Anselmi anselmi at anselmi.us
Tue Jul 14 15:46:03 MDT 2009


Kenneth D Weinert wrote:
> %files
> %defattr(-,root,root,-)
> /tools/lib/libconfig.so.*
> %doc /tools/share/doc/%{name}-%{version}/AUTHORS
> %doc /tools/share/doc/%{name}-%{version}/ChangeLog
> %doc /tools/share/doc/%{name}-%{version}/COPYING
> %doc /tools/share/doc/%{name}-%{version}/NEWS
> %doc /tools/share/doc/%{name}-%{version}/README

I think you don't want %doc in this case.

> - From rpmbuild -ba config.spec:
> Processing files: config-1.0.0-7
> error: File not found:
> /var/tmp/config-1.0.0-7-root-kenw/tools/share/doc/config-
> 1.0.0/AUTHORS
> error: File not found:

So your build root is /var/tmp/config-1.0.0-7-root-kenw.  You need to 
fix the install part of your make file so it puts the docs in 
/var/tmp/config-1.0.0-7-root-kenw/tools/share/doc/config-1.0.0/

> error: Installed (but unpackaged) file(s) found:
>    /tools/lib/libconfig.so

Your %files says to get libconfig.so.* but not libconfig.so.  You either 
need to leave out libconfig.so or add it to %files.

%doc has some definition somewhere that you can override.  rpmbuild 
--showrc will dump out all the rpm settings.  So if %doc gets something 
you need other than the default location you can change the location it 
points to (probably in your .rpmmacros file).

Dave



More information about the LUG mailing list