rpmbuild

Section: Misc. Reference Manual Pages (pj)
Updated: 4 July 2005
Index Return to Main Contents
 

NAME

rpmbuild Notes  

DESCRIPTION

So an RPM spec file starts with a source tarball, uncompresses it, builds from the source, installs the binaries, and then collects the resulting files into an -rpm file. There are two important directory structures:

1. The RPM directory structure, by default /usr/src/redhat. rpmbuild looks for the tarball under SOURCES and expends it under BUILD. "make" will happen in this directory. To change this, add the following line (or something like it) to ~/.rpmmacros:

%_topdir       /home/pjungwir/src/rpmbuild

2. The (poorly named) build root, usually %{_tmpdir}/%{name}-root, which is /var/tmp/integratis-root or /var/tmp/whatever-root. Once everything is compiled and installed, rpmbuild will look here to find the files you've listed under %files. That means your build process should install files like /var/tmp/whatever-root/bin/whatever and /var/tmp/whatever-root/man/man1/whatever.1. In other words, run configure like this:

./configure --prefix=%{_tmpdir}/%{name}-root

You can set the build root with the BuildRoot parameter of your spec file. You should use a place where you can easily identify all the installed files. That way, you can run "rpmbuild -bi whatever.spec," then check the install location to see everything you must include in the %files target.

Incidentally, %{_tmpdir} is also where rpmbuild creates various temporary scripts, with names like rpm-tmp.64172. Each "target" in the spec file corresponds to one of these scripts, although since they're all named the same for a given invocation of rpmbuild, only the last target's file remains.  

AUTHOR

Paul Jungwirth  

COPYRIGHT

Copyright © Paul Jungwirth 2005


 

Index

NAME
DESCRIPTION
AUTHOR
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 22:37:24 GMT, March 27, 2017