-->
Page 167
This example contains no explicit formatting. RPM will format the text as a single paragraph, breaking lines as needed. In the next example, we use a leading space to control the description's formatting:
%description It slices! It dices! It's a CD player app that can't be beat. By using the resonant frequency of the CD itself, it is able to simulate 20X oversampling. This leads to sound quality that cannot be equaled with more mundane software...
In this example, the first three lines will be displayed verbatim by RPM. The remainder of the text will be formatted by RPM. The text will be formatted as one paragraph. In the next example, we've added an additional wrinkle to %description formatting:
%description It slices! It dices! It's a CD player app that can't be beat. By using the resonant frequency of the CD itself, it is able to simulate 20X oversampling. This leads to sound quality that cannot be equaled with more mundane software...
Here, we have a situation similar to the previous example, in that part of the text is formatted and part is not. However, the blank line separates the text into two paragraphs.
13.2.2.2. The summary TagThe summary tag is used to define a one-line description of the packaged software. Unlike %description, summary is restricted to one line. RPM uses it when a succinct description of the package is needed. Here is an example of a summary line:
Summary: A CD player app that rocks!13.2.2.3. The copyright Tag
The copyright tag is used to define the copyright terms applicable to the software being packaged. In many cases, this might be nothing more than GPL, for software distributed under the terms of the GNU General Public License, or something similar. Here's an example:
Copyright: GPL13.2.2.4. The distribution Tag
The distribution tag is used to define a group of packages, of which this package is a part. Since Red Hat Software is in the business of producing a group of packages known as a Linux distribution, the name stuck. For example, if a suite of applications known as Doors '95 were produced, each package that is part of the suite would define its distribution line like this:
Distribution: Doors `95
Page 168
13.2.2.5. The icon TagThe icon tag is used to name a file containing an icon representing the packaged software. The file may be in either GIF or XPM format, although XPM is preferred. In either case, the background of the icon should be transparent. The file should be placed in RPM's SOURCES directory prior to performing a build, so no path is needed.
The icon is normally used by graphically oriented front ends to RPM. RPM itself doesn't use the icon, but it's stored in the package file and retained in RPM's database after the package is installed. A sample icon tag might look like this:
Icon: foo.xpm13.2.2.6. The vendor Tag
The vendor tag is used to define the name of the entity that is responsible for packaging the software. Normally, this would be the name of an organization. Here's an example:
Vendor: White Socks Software, Inc.13.2.2.7. The url Tag
The url tag is used to define a uniform resource locator (URL) that can be used to obtain additional information about the packaged software. At present, RPM doesn't actively make use of this tag. The data is stored in the package, however, and will be written into RPM's database when the package is installed. It's only a matter of time before some Web-based RPM adjunct makes use of this information, so make sure you include URLs! Something like this is all you'll need:
URL: http://www.gnomovision.com/cdplayer.html13.2.2.8. The group Tag
The group tag is used to group packages together by the types of functionality they provide. The group specification looks like a path and is similar in function, in that it specifies more general groupings before more detailed ones. For example, a package containing a text editor might have the following group:
Group: Applications/Editors
In this example, the package is part of the Editors group, which is a part of the Applications group. Likewise, a spreadsheet package might have this group:
Group: Applications/Spreadsheets
This group tag indicates that under the Applications group are Editors and Spreadsheets, and probably some other subgroups as well.
Page 169
How is this information used? It's primarily meant to permit graphical front ends to RPM to display packages in a hierarchical fashion. Of course, in order for groups to be as effective as possible, it's necessary for all package builders to be consistent in their groupings. In the case of packages for Linux, Red Hat Software has the definitive list. Therefore, Linux package builders should give serious consideration to using Red Hat Software's groups. The current group hierarchy is installed with every copy of RPM and is available in the RPM sources as well. Check out the file groups in RPM's documentation directory (normally /usr/doc/rpm-<version>), or in the top-level source directory.
13.2.2.9. The packager TagThe packager tag is used to hold the name and contact information for the person or persons who built the package. Normally, this would be the person who actually built the package, or in a larger organization, a public relations contact. In either case, contact information such as an e-mail address or a phone number should be included so customers can send either money or hate mail, depending on their satisfaction with the packaged software. Here's an example of a packager tag:
Packager: Fred Foonly <fred@gnomovision.com>
One RPM feature that's been recently implemented is a means of ensuring that if a package is installed, the system environment has everything the package requires in order to operate properly. Likewise, when an installed package is erased, RPM can make sure no other package relies on the package being erased. This dependency capability can be very helpful when end users install and erase packages on their own. It makes it more difficult for them to paint themselves into a corner, package-wise.
However, in order for RPM to be able to take more than basic dependency information into account, the package builder must add the appropriate dependency information to the package. This is done by using the tags described in the following sections. Note, however, that adding dependency information to a package requires some forethought. For additional information on RPM's dependency processing, review Chapter 14, "Adding Dependency Information to a Package."
13.2.3.1. The provides TagThe provides tag is used to specify a virtual package that the packaged software makes available when it is installed. Normally, this tag would be used when different packages provide equivalent services. For example, any package that allows a user to read mail might provide the mail-reader virtual package. Another package that depends on a mail reader of some sort could