RPM Spec File Reference

RPM Spec File Reference

Spec File Reference

Tags

  • Name: is used to define the name of the software being packaged.
  • Version: defines the version of the software being packaged.
  • Release: can be thought of as the package’s version.
  • %description describe the packages intended use.
  • Summary: is used to define a one-line description of the packaged software.
  • Copyright: is used to define the copyright terms applicable to the software being packaged.
  • Distribution: is used to define a group of packages, of which this package is a part.
  • Icon: is used to name a file containing an icon representing the packaged software.
  • Vendor: is used to define the name of the entity that is responsible for packaging the software.
  • URL: is used to define a URL that can be used to obtain additional information about the packaged software.
  • Group: is used to group packages together by the types of functionality they provide.
  • Packager: is used to hold the name and contact information for the person or persons who built the package.
  • Requires: is used to alert RPM to the fact that the package needs to have certain capabilities available in order to operate properly.
  • Serial: is used to define a serial number for a package. This is only necessary if RPM is unable to determine the ordering of a package’s version numbers.
  • Conflicts: is used to alert RPM to the fact that the package is not compatible with other packages.
  • AutoReqProv: is used to control the automatic dependency processing performed when the package is being built.
    • To disable automatic dependency processing, add the following line: AutoReqProv: no
  • ExcludeArch: is used to direct RPM to ensure that the package does not attempt to build on the excluded architecture(s).
  • ExclusiveArch: is used to direct RPM to ensure the package is only built on the specified architecture(s).
  • ExcludeOs: is used to direct RPM to ensure that the package does not attempt to build on the excluded operating system(s).
  • ExclusiveOs: is used to denote which operating system(s) should only be be permitted to build the package.
  • Prefix: is used to define part of the path RPM will use when installing the package’s files.
  • BuildArch: is used to define the architecture of the intended install target.
  • BuildRoot: is used to define an alternate build root, where the software will be installed during the build process.
  • Source: is used to define the filename of the sources to be packaged.
  • NoSource: is used to alert RPM to the fact that one or more source files should be excluded from the source package file.
  • Patch: is used to define the name of a patch file to be applied to the package’s sources.
  • NoPatch: is used to alert RPM to the fact that one or more patch files should be excluded from the source package file.
  • %files list indicates to RPM which files on the build system are to be packaged.

Scripts

  • %prep is executed first during an rpm build (creating an rpm).
  • %build is the second scriptlet executed during an rpm build.
  • %install does whatever is necessary to actually install the newly built software.
  • %clean as the name implies, is used to clean up the software’s build directory tree.
  • %pre executes just before the package is to be installed.
  • %post executes after the package has been installed.
  • %preun executes just before the package is to be erased.
  • %postun executes after the package has been erased.
  • %verifyscript executes whenever the installed package is verified by RPM’s verification command.

Macros

  • %setup is used to unpack the original sources, in preparation for the build.
  • %patch as its name implies, is used to apply patches to the unpacked sources.

File-related Directives

  • %doc flags the filename(s) that follow, as being documentation.
  • %config is used to flag the specified file as being a configuration file.
  • %attr permits finer control over three key file attributes: mode, uid, gid
  • %verify can control which of 9 file attributes are to be checked when an RPM verification is done.
  • %docdir is used to add a directory to the list of directories that will contain documentation.
  • %dir RPM will package only the directory itself.
  • %package is used to permit the creation of more than one package per spec file and can appear at any point in the spec file.

Conditionals

  • %ifarch is used to begin a section of the spec file that is architecture-specific.
  • %ifnarch is used in a similar fashion to %ifarch, except that the logic is reversed.
  • %ifos is used to control RPM’s spec file processing based on the build system’s operating system.
  • %ifnos is the logical complement to %ifos
  • %else is placed between a %if conditional of some persuasion, and a %endif.
  • %endif is used to end a conditional block of spec file statements.

转载于:https://my.oschina.net/u/158589/blog/76553

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/110329.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • visio安装教程2013_visio2018安装教程

    visio安装教程2013_visio2018安装教程下载地址:https://download.csdn.net/download/qq_33705529/11082285说到办公绘图软件,最强大的莫过于微软新推出的visio2013简体中文版,该软件可以帮助用户快速绘制工作中常用的业务流程图、组织结构图、项目管理图、网络…

    2022年9月28日
    0
  • 孙鑫Java视频教程下载

    孙鑫Java视频教程下载刚刚学习Java。还没有入门。 孙鑫老师的这套教程还没有看完。把下载地址发上来,有兴趣的可以下来看看。 一共12集,每集大约2个半小时。讲得很详细,适合入门。 请用迅雷下载。 thunder://QUFodHRwOi8vdmlwLmlib29rOC5jb20vdmlkZW8vy+/2zkpBVkHO3sTRysIxMkNELzAxLnJhclpa|http://ww

    2022年5月13日
    43
  • 安卓监听屏幕触摸事件_android设置按钮点击事件

    安卓监听屏幕触摸事件_android设置按钮点击事件AndroidOnTouchListener触屏事件接口在修改后的工厂测试程序中,用到了关于触摸事件的获取,顺便学习关于触摸事件和触摸位置的知识,其方法如下:publicbooleanonTouchEvent(MotionEventevent){//获得触摸的坐标floatx=event.getX();floaty=event.getY();switch(event.ge…

    2022年9月3日
    10
  • C# winform美化窗体

    C# winform美化窗体记录一下winform美化工具CSkin一个.Net的UI库。参考链接:https://blog.csdn.net/yyl7727/article/details/78904125?spm=1001.2014.3001.5502

    2022年5月24日
    34
  • django常用命令_我的世界好玩指令大全

    django常用命令_我的世界好玩指令大全前言我们掌握了如何在命令提示符或PyCharm下创建Django项目和项目应用,无论是创建项目还是创建项目应用,都需要输入相关的指令才能得以实现,这些都是Django内置的操作指令。在PyChar

    2022年7月29日
    4
  • 计算机一级ip地址分类,IP地址分类和子网划分[通俗易懂]

    计算机一级ip地址分类,IP地址分类和子网划分[通俗易懂]一、IP地址1、IP地址概述§在一个IP网络中每一个设备的唯一标识符,有32位二进制数组成,这些位通常被分割成四组,每组包含一个字节(8位)。然后转换成十进制表示,这叫点分十进制表示法。§每一个主机(计算机,网络设备,外围设备)必须有一个唯一的地址。§IP地址由网络ID和主机ID组成,网络ID:标识某个网段,在同一个网段的计算机,它们的网络ID是一样的,不同网段的计算机,它们的网络ID…

    2022年6月5日
    36

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号