0273-0274.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 107 行

HTML
107
字号




<HTML>

<HEAD>

<TITLE>Maximum RPM (RPM):Building Packages for Multiple Architectures and Operating Systems: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=19 //-->

<!-- PAGES=0263-0274 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->









<P><CENTER>

<a href="0270-0272.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch20/0275-0278.html">Next</A>

</CENTER></P>



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





<P>In this case, the block following the conditional would be included only if the build

architecture were not i386 or alpha.

</P>



<P>Here's another example:

</P>



<!-- CODE SNIP //-->

<PRE>

%ifnos Linux

</PRE>

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



<P>This example would include the block following the conditional only if the operating

system were not Linux.

</P>



<H3><A NAME="ch19_ 27">

19.7. Hints and Kinks

</A></H3>



<P>There isn't much in the way of hard-and-fast rules when it comes to multiplatform

package building. But in general, the following uses of RPM's multiplatform capabilities seem to

work the best:

</P>



<UL>

<LI>          The

excludexxx and exclusivexxx tags are best used when it's known that there's

no reason for the package to be built on specific architectures.

<LI>          The

%ifxxx and %ifnxxx conditionals are most likely to be used in the following areas:



<UL>

<LI>          Controlling the inclusion of

%patch macros for platform-specific patches.

<LI>          Setting up platform-specific initialization prior to building the software.

<LI>          Tailoring the

%files list when the software creates platform-specific files.

</UL>

</UL>



<P>Given that some software is more easily ported to different platforms than others, this list is

far from complete. If there's one thing to remember about multiplatform package building, it's

to not be afraid to experiment!

</P>



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







<P><CENTER>

<a href="0270-0272.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="../ch20/0275-0278.html">Next</A>

</CENTER></P>











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

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

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