From Mageia wiki
Jump to: navigation, search

This is a lingo for the RPM SPEC conventions in the various distributions. See the Interpreted languages Lingo / Hyperglot for the main inspiration.

SPEC data

Library package naming

  • In Mageia, libraries have a strict naming convention enforced by %mklibname macros. Structure is usually {lib,lib64}nameX (X representing soname major version).
  • In Fedora, there's a strong preference to name library packages as close to how upstream prefers. If multiple versions, the user-visible version is used instead of soname versions in package names.
  • In SUSE, libraries are named similarly to Mageia, though there's no {lib,lib64} prefix (the prefix is just "lib" if there is one, but it's not mandatory either).

Release

  • In Mageia: %mkrel @VALUE
  • In Fedora: @VALUE%{?dist} (some packages use %autorelease to have it computed by Git+build system using RPMAutoSpec)
  • In SUSE: None, though they usually write a single integer. They let Open Build Service write one. Distribution tags are not used in SUSE.

configure

  • In Mageia < 7: %configure2_5x for autoconf-2.5.x %configure for older autoconfs.
  • In Mageia 7+, Fedora, and SUSE: %configure for both types.

CMake

  • In SUSE and Mageia/Mandriva: %cmake @FLAGS and make sure to cd to build where appropriate
  • In Fedora: do %cmake @FLAGS and use %cmake_build and %cmake_install for building and installing as appropriate (RHEL 8.4+ too)

Parallel Make

  • In Mageia/Mandriva, it was %make, but it is now deprecated for %make_build (newer - mga5 or newer).
  • In Fedora it is make %{?_smp_mflags} (older SPEC or SPEC also targeting EL7.1 or older) or %make_build (newer SPEC - rpm 4.12 feature, present in EL7.2+, F21+)
  • In SUSE, it is make %{?_smp_mflags} (only SPEC or SPEC targeting SLE 12 or older) or %make_build (newer SPEC - rpm 4.12 feature, present in SLE 15+)

make install

  • In Fedora and SUSE, it is make install DESTDIR=$RPM_BUILD_ROOT (older SPEC or SPEC also targeting SLE11 or EL6 or older) or %make_install (newer SPEC - rpm 4.11 feature)
  • In Mageia/Mandriva, it was %makeinstall_std, but is deprecated for %make_install

File triggers

  • SUSE: Does not currently use file triggers, so their specs for libraries often have %post -p /sbin/ldconfig and %postun -p /sbin/ldconfig
  • Mageia: Uses file triggers, so the above is not required.
  • Fedora: Uses file triggers since F28, so the above is not required. For EL7 and older, it still works like SUSE.

Changelogs

  • In Mageia, package changelogs are automatically generated from the SVN log, thus the changelog section isn't defined in the SPEC itself.
  • In Fedora, package changelogs are part of the SPEC, and are edited in the file. This is to support processes that don't necessarily have a VCS/SCM to provide the changelog.
  • In SUSE, package changelogs are a separate file, called @NAME.changes. This changelog data is more Debian-style and Open Build Service reformats it to inject into an RPM spec at build. Thus, they have %changelog section in SPEC that is empty, because it is written in by another file.

Perl/CPAN Modules

  • For Mageia see cpan2pkg and the example spec.
  • Fedora does not appear to have all these macros.

Build.PL

Libraries

TODO: Fill in