Chapter 11. Building Packages: A Simple ExampleIn the previous chapter, we looked at RPM's build process from a conceptual level. In this chapter, we will be performing an actual build using RPM. In order to keep things understandable for this first pass, the build will be very simple. Once we've covered the basics, we'll present more real-world examples in later chapters. Creating the Build Directory StructureRPM requires a set of directories in which to perform the build. While the directories' locations and names can be changed, unless there's a reason to do so, it's best to use the default layout. Note that if you've installed RPM, the build directories are most likely in place already. The normal directory layout consists of a single top-level directory (The default name is /usr/src/redhat), with five subdirectories. The five subdirectories and their functions are:
In general, there are no special requirements that need to be met when creating these directories. In fact, the only important requirement is that the BUILD directory be part of a filesystem with sufficient free space to build the largest package expected. Here is a directory listing showing a typical build directory tree:
Now that we have the directories ready to go, it's time to prepare for the build. For the remainder of this chapter, we'll be building a fictional piece of software known as cdplayer. [1] Notes
|
|
© 2004 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Contact Red Hat |