All the information I can find about building RPMs seems to pre-date CentOS 6, and as a complete package-building novice running CentOS 6.5, I'm rather stuck.
All the tutorials I've read mention one
BUILD directory and state that during the
%install the files are copied from from their native location (
/usr/bin/whatever) and packaged up.
However, in the CentOS 6.5 image I'm building on, a new
BUILDROOT directory appears which I think is designed to avoid you having to install the binaries at their native locations, and hence also avoid the use of
However, it seems this isn't optional. When trying to package various sources written by other people
rpmbuild completes the
make install successfully, but then dies when it doesn't find the binaries under the
BUILDROOT, because they weren't installed there.
After some digging, it seems that some Makefiles can take a
DESTDIR argument, but only if the author supported it, and if they haven't I'm stuck. I've also read it's a bad idea to use
So, my question is:
How can I build and install any third-party sources into the BUILDROOT location? Is there something rpmbuild can do for me that doesn't requiring patching someone else's code I don't understand?