Specfile

This section is informative.

The OS redpesk is based on RPM Package Manager. In order to build a RPM package, you need to write a specfile. You can find further information about how to write a spec file here: How to write spec.

Specfile development

A spec file is composed of several sections:

  • Name: RPM package name
  • Summary: A short description of the package
  • Version: The package version
  • Release: This number has to be incremented every time the package is recreated
  • License: The package license, it is necessary to fill in the gaps
  • URL: Project URL
  • Source0 … SourceN: Tarball defining the project sources location
  • BuildRequires: Required dependencies for building
  • Requires: Required dependencies for the package at run time

The Documentation section

  • %description: longer description of the package
  • %changelog: describes changes to apply when release is incremented

Metadata section

  • %files: contains files of rpm

Build section

  • %prep: describes how to extract tarball defined in SOURCE0…SOURCEN
  • %build: this is where packages are compiled. In many cases, there is a macro %configure before a make in this section
  • %install: creates the final tarball as it will be in the RPM. Created files have to be in the %{buildroot}

Install section

The %install section is where we instruct rpmbuild how to install our previously built software into the BUILDROOT.