⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0167-0169.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:




<HTML>

<HEAD>

<TITLE>Maximum RPM (RPM):Inside the Spec File: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=13 //-->

<!-- PAGES=0163-0204 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->









<P><CENTER>

<a href="0163-0166.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0170-0172.html">Next</A>

</CENTER></P>



<A NAME="PAGENUM-167"><P>Page 167</P></A>



<P>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:

</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>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:

</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>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.

</P>



<B>

13.2.2.2. The summary Tag

</B>



<P>The 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:

</P>



<!-- CODE SNIP //-->

<PRE>

Summary: A CD player app that rocks!

</PRE>

<!-- END CODE SNIP //-->



<B>

13.2.2.3. The copyright Tag

</B>



<P>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:

</P>



<!-- CODE SNIP //-->

<PRE>

Copyright: GPL

</PRE>

<!-- END CODE SNIP //-->



<B>

13.2.2.4. The distribution Tag

</B>



<P>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:

</P>



<!-- CODE SNIP //-->

<PRE>

Distribution: Doors `95

</PRE>

<!-- END CODE SNIP //-->



<A NAME="PAGENUM-168"><P>Page 168</P></A>



<B>

13.2.2.5. The icon Tag

</B>



<P>The 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.

</P>



<P>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:

</P>

<!-- CODE SNIP //-->

<PRE>

Icon: foo.xpm

</PRE>

<!-- END CODE SNIP //-->



<B>

13.2.2.6. The vendor Tag

</B>



<P>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:

</P>

<!-- CODE SNIP //-->

<PRE>

Vendor: White Socks Software, Inc.

</PRE>

<!-- END CODE SNIP //-->



<B>

13.2.2.7. The url Tag

</B>



<P>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:

</P>

<!-- CODE SNIP //-->

<PRE>

URL: <a href="http://www.gnomovision.com/cdplayer.html">

http://www.gnomovision.com/cdplayer.html</A>

</PRE>

<!-- END CODE SNIP //-->



<B>

13.2.2.8. The group Tag

</B>



<P>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:

</P>

<!-- CODE SNIP //-->

<PRE>

Group: Applications/Editors

</PRE>

<!-- END CODE SNIP //-->



<P>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:

</P>

<!-- CODE SNIP //-->

<PRE>

Group: Applications/Spreadsheets

</PRE>

<!-- END CODE SNIP //-->



<P>This group tag indicates that under the

Applications group are Editors and Spreadsheets,

and probably some other subgroups as well.

</P>



<A NAME="PAGENUM-169"><P>Page 169</P></A>







<P>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-&lt;version&gt;), or in the top-level source directory.

</P>



<B>

13.2.2.9. The packager Tag

</B>



<P>The 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:

</P>

<!-- CODE SNIP //-->

<PRE>

Packager: Fred Foonly &lt;fred@gnomovision.com&gt;

</PRE>

<!-- END CODE SNIP //-->



<H4>

13.2.3. Dependency Tags

</H4>



<P>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.

</P>



<P>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, &quot;Adding Dependency

Information to a Package.&quot;

</P>



<B>

13.2.3.1. The provides Tag

</B>



<P>The 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

</P>



<P><CENTER>

<a href="0163-0166.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0170-0172.html">Next</A>

</CENTER></P>











</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -