📄 appendix-e.html
字号:
<HTML>
<HEAD>
<TITLE>Maximum RPM (RPM):appendix-e:EarthWeb Inc.-</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311054 //-->
<!-- TITLE=Maximum RPM (RPM)//-->
<!-- AUTHOR=Edward Bailey//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=appendix-e //-->
<!-- PAGES=0387-0402 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="appendix-d.html">Previous</a> | <a href="ewtoc.html">Table of Contents</a> | <a href="appendix-f.html">Next</a></CENTER></P>
<A NAME="PAGENUM-387"><P>Page 387</P></A>
<H3><A NAME="1054_ 5">
Appendix E</a></H3>
<H2>
Concise Spec File <BR>Reference
</H2>
<A NAME="PAGENUM-388"><P>Page 388</P></A>
<H3>
E.1. Comments
</H3>
<P>Comments are a way to make RPM ignore a line in the spec file. To create a comment,
enter a pound sign (#) at the start of the line. Any text following the comment character will be
ignored by RPM:
</P>
<!-- CODE SNIP //-->
<PRE>
# This is the spec file for playmidi 2.3...
</PRE>
<!-- END CODE SNIP //-->
<P>Comments can be placed in any section of the spec file.
</P>
<P>For more information, see section 13.1 in Chapter 13, "Inside the Spec File."
</P>
<H3>
E.2. The Preamble
</H3>
<P>The preamble contains information that will be displayed when users request information
about the package.
</P>
<H4>
E.2.1. Package-Naming Tags
</H4>
<P>Package-naming tags are used to define the parts of the package's label. For more
information about these tags, see section 13.2.1.
</P>
<H4>
E.2.1.1. The name Tag
</H4>
<P>The name tag is used to define the name of the software being packaged:
</P>
<!-- CODE SNIP //-->
<PRE>
Name: cdplayer
</PRE>
<!-- END CODE SNIP //-->
<H5>
E.2.1.2. The version Tag
</H5>
<P>The version tag defines the version of the software being packaged:
</P>
<!-- CODE SNIP //-->
<PRE>
Version: 1.2
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.1.3. The release Tag
</H4>
<P>The release tag can be thought of as the package's version:
</P>
<!-- CODE SNIP //-->
<PRE>
Release: 5
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.2. Descriptive Tags
</H4>
<P>Descriptive tags are used to define various types of information about the package. For
more information about these tags, see section 13.2.2.
</P>
<A NAME="PAGENUM-389"><P>Page 389</P></A>
<H4>
E.2.2.1. The %description Tag
</H4>
<P>The %description tag is used to define an in-depth description of the packaged software.
In the descriptive text, a space in the first column indicates that that line of text should be
presented to users as is, with no formatting done by RPM. Blank lines in the descriptive text
denote paragraphs:
</P>
<!-- CODE //-->
<PRE>
%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...
</PRE>
<!-- END CODE //-->
<P>You can make the %description tag specific to a particular subpackage by adding the
subpackage name and, optionally, the -n option:
</P>
<!-- CODE SNIP //-->
<PRE>
%description bar
%description -n bar
</PRE>
<!-- END CODE SNIP //-->
<P>The subpackage name and the usage of the -n option must match those defined with the
%package directive.
</P>
<H4>
E.2.2.2. The summary Tag
</H4>
<P>The summary tag is used to define a one-line description of the packaged software:
</P>
<!-- CODE SNIP //-->
<PRE>
Summary: A CD player app that rocks!
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.2.3. The copyright Tag
</H4>
<P>The copyright tag is used to define the copyright terms applicable to the software being
packaged:
</P>
<!-- CODE SNIP //-->
<PRE>
Copyright: GPL
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.2.4. The distribution Tag
</H4>
<P>The distribution tag is used to define a group of packages of which this package is a part:
</P>
<!-- CODE SNIP //-->
<PRE>
Distribution: Doors '95
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.2.5. The icon Tag
</H4>
<P>The icon tag is used to name a file containing an icon representing the packaged software:
</P>
<!-- CODE SNIP //-->
<PRE>
Icon: foo.xpm
</PRE>
<!-- END CODE SNIP //-->
<P>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.
</P>
<A NAME="PAGENUM-390"><P>Page 390</P></A>
<H4>
E.2.2.6. The vendor Tag
</H4>
<P>The vendor tag is used to define the name of the entity that is responsible for packaging
the software:
</P>
<!-- CODE SNIP //-->
<PRE>
Vendor: White Socks Software, Inc.
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.2.7. The url Tag
</H4>
<P>The url tag is used to define a uniform resource locator that can be used to obtain
additional information about the packaged software:
</P>
<!-- CODE SNIP //-->
<PRE>
URL: <A HREF="http://www.gnomovision.com/cdplayer.html">
http://www.gnomovision.com/cdplayer.html</A>
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.2.8. The group Tag
</H4>
<P>The group tag is used to group packages together by the types of functionality they provide:
</P>
<!-- CODE SNIP //-->
<PRE>
Group: Applications/Editors
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.2.9. The packager Tag
</H4>
<P>The packager tag is used to hold the name and contact information for the person or
persons who built the package:
</P>
<!-- CODE SNIP //-->
<PRE>
Packager: Fred Foonly <fred@gnomovision.com>
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.3. Dependency Tags
</H4>
<P>Dependency tags are used to define a package's dependency-related requirements. For
more information about these tags, see section 13.2.3.
</P>
<H4>
E.2.3.1. The provides Tag
</H4>
<P>The provides tag is used to specify a "virtual package" that the packaged software makes
available when it is installed:
</P>
<!-- CODE SNIP //-->
<PRE>
Provides: module-info
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.3.2. The requires Tag
</H4>
<P>The requires tag is used to make RPM aware that the package needs to have certain
capabilities available in order to operate properly:
</P>
<!-- CODE SNIP //-->
<PRE>
Requires: playmidi
</PRE>
<!-- END CODE SNIP //-->
<P>A version may be specified, following the package specification. The following comparison operators may be placed between the package and version:
<, >, =, >=, and <=. Here's an example:
</P>
<!-- CODE SNIP //-->
<PRE>
Requires: playmidi >= 2.3
</PRE>
<!-- END CODE SNIP //-->
<A NAME="PAGENUM-391"><P>Page 391</P></A>
<P>If the requires tag needs to perform a comparison against a serial number defined with
the serial tag, the proper format would be
</P>
<!-- CODE SNIP //-->
<PRE>
Requires: playmidi =S 4
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.3.3. The serial Tag
</H4>
<P>The serial tag is used to define a serial number for a package:
</P>
<!-- CODE SNIP //-->
<PRE>
Serial: 4
</PRE>
<!-- END CODE SNIP //-->
<P>This is only necessary if RPM is unable to determine the ordering of a package's version
numbers.
</P>
<H4>
E.2.3.4. The conflicts Tag
</H4>
<P>The conflicts tag is used to make RPM aware that the package is not compatible with
other packages:
</P>
<!-- CODE SNIP //-->
<PRE>
Conflicts: playmidi
</PRE>
<!-- END CODE SNIP //-->
<P>A version may be specified, following the package specification. The following comparison operators may be placed between the package and version:
<, >, =, >=, and <=. Here's an example:
</P>
<!-- CODE SNIP //-->
<PRE>
Conflicts: playmidi >= 2.3
</PRE>
<!-- END CODE SNIP //-->
<P>If the conflicts tag needs to perform a comparison against a serial number defined with
the serial tag, the proper format would be
</P>
<!-- CODE SNIP //-->
<PRE>
Conflicts: playmidi =S 4
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.3.5. The autoreqprov Tag
</H4>
<P>The autoreqprov tag is used to control the automatic dependency processing performed
when the package is being built. To disable automatic dependency processing, add the following line:
</P>
<!-- CODE SNIP //-->
<PRE>
AutoReqProv: no
</PRE>
<!-- END CODE SNIP //-->
<P>(The number 0 may be used instead of no.) Although RPM defaults to performing
automatic dependency processing, the effect of the
autoreqprov tag can be reversed by changing no to
yes. (The number 1 may be used instead of yes.)
</P>
<H4>
E.2.4. Architecture- and Operating System_Specific Tags
</H4>
<P>These tags are used to control RPM's behavior when the package is built on different
platforms. For more information about these tags, see section 13.2.4.
</P>
<A NAME="PAGENUM-392"><P>Page 392</P></A>
<H4>
E.2.4.1. The excludearch Tag
</H4>
<P>The excludearch tag is used to direct RPM to ensure that the package does not attempt
to build on the excluded architecture(s):
</P>
<!-- CODE SNIP //-->
<PRE>
ExcludeArch: sparc alpha
</PRE>
<!-- END CODE SNIP //-->
<H4>
E.2.4.2. The exclusivearch Tag
</H4>
<P>The exclusivearch tag is used to direct RPM to ensure the package is only built on the
specified architecture(s):
</P>
<!-- CODE SNIP //-->
<PRE>
ExclusiveArch: sparc alpha
</PRE>
<!-- END CODE SNIP //-->
<H4>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -