RPM spec File Contents

From CDOT Wiki
Revision as of 09:25, 13 January 2011 by Chris Tyler (talk | contribs) (Created page with 'Category:SBR600Category:RPM These are the basic sections of a spec file: * Basic Sections # preamble - basic metadata # %prep - commands to prepare the package for build…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These are the basic sections of a spec file:

  • Basic Sections
  1. preamble - basic metadata
  2.  %prep - commands to prepare the package for building
  3.  %build - commands to build the package
  4.  %install - commands to install the built files
  5.  %check - commands to check/test the built files (optional, often not included)
  6.  %clean - commands to clean up the disk space
  7.  %files - list of files to be included in the pacakge
  8.  %changelog - record of the package's change-history
  • Scriptlets
    •  %pre -- run before installation
    •  %post -- run after installation
    •  %preun -- run before uninstallation
    •  %postun -- run after uninstallation
      • Note that during upgrade, the installation of the new package is considered to happen before the removal of the old package.
  • Macros
    •  %{_tmppath}
    •  %{buildroot}
    •  %{_bindir}
    •  %{_datadir}
    •  %{_mandir}
    •  %{_smp_flags}
    •  %setup
    •  %configure
    •  %makeinstall