From 437b0326dcdbce2a3d0a9d7946cc34b8a034fbdf Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 8 Jan 2025 15:25:29 +0100 Subject: [PATCH 1/3] Downgrade headings of examples Make them fit in the overall structure. --- docs/manual/autosetup.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/manual/autosetup.md b/docs/manual/autosetup.md index 64b5db4495..86e1265eba 100644 --- a/docs/manual/autosetup.md +++ b/docs/manual/autosetup.md @@ -86,13 +86,13 @@ options are Some examples: -# Apply patches with number >= 100 +### Apply patches with number >= 100 `%autopatch -m 100` -# Apply patches with number <= 400 +### Apply patches with number <= 400 `%autopatch -M 400` -# Apply patches 80 to 99, inclusive +### Apply patches 80 to 99, inclusive `%autopatch -m 80 -M 99` -# Apply patches 1, 4 and 6 +### Apply patches 1, 4 and 6 `%autopatch 1 4 6` ## Automating patch (and source) declarations From c9d777d3a1b9d779b3f2cb2bf2901192c6ff8a48 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Wed, 8 Jan 2025 15:23:30 +0100 Subject: [PATCH 2/3] Add table of contents to Spec page in manual Include links to the sub topics there. Add links to Dependency sub topics to the Dependency section. Resolves: #3359 --- docs/manual/index.md | 2 +- docs/manual/spec.md | 50 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/docs/manual/index.md b/docs/manual/index.md index 0cba180498..2d793ecab8 100644 --- a/docs/manual/index.md +++ b/docs/manual/index.md @@ -21,8 +21,8 @@ title: rpm.org - RPM Reference Manual ## Package Building * [Build Process](buildprocess.md) * [Spec Syntax](spec.md) - * [Declarative builds](buildsystem.md) * [Autosetup](autosetup.md) + * [Declarative builds](buildsystem.md) * Dependencies * [Dependencies Basics](dependencies.md) * [More on Dependencies](more_dependencies.md) diff --git a/docs/manual/spec.md b/docs/manual/spec.md index 8be520c46c..f09c425742 100644 --- a/docs/manual/spec.md +++ b/docs/manual/spec.md @@ -4,6 +4,37 @@ title: rpm.org - Spec file format --- # Spec file format +Spec files describe how software is build and packaged. + +### Contents and Links + +* [Generic syntax](#generic-syntax) + * [→ Macro syntax](macros.md) + * [Comments](#comments) + * [Conditionals](#conditionals) + * [→ Conditional Builds](conditionalbuilds.md) + * [Sections](#sections) +* [Preamble](#preamble) + * [Dependencies](#dependencies) + * [→ Dependencies Basics](dependencies.md) + * [→ More on Dependencies](more_dependencies.md) + * [→ Boolean Dependencies](boolean_dependencies.md) + * [→ Architecture Dependencies](arch_dependencies.md) + * [→ Installation Order](tsort.md) + * [→ Automatic Dependency Generation](dependency_generators.md) + * [→ Declarative builds](buildsystem.md) + * [→ Relocatable Packages](relocatable.md) + * [Sub-sections](#sub-sections) +* [Build scriptlets](#build-scriptlets) + * [→ Autosetup](autosetup.md) +* [Runtime scriptlets](#runtime-scriptlets) + * [→ Triggers](triggers.md) + * [→ File Triggers](file_triggers.md) + * [→ Scriptlet Expansion](scriptlet_expansion.md) +* [%files section](#files-section) + * [→ Users and Groups](users_and_groups.md) +* [%changelog section](changelog-section) + ## Generic syntax ### Macros @@ -82,6 +113,14 @@ other conditionals. %if-conditionals are not macros, and are unlikely to yield expected results if used in them. + +### Conditional Builds ### + +Conditionals can be made available for users building the package. +[Conditional Builds](conditionalbuilds.md) add `--with` and `--without` +command line options to `rpmbuild` that can be used inside the spec +file. + ### Sections ### The spec file is divided in several sections. Except of the preamble @@ -453,7 +492,8 @@ unexpected results, in particular with `%global`. #### Prefixes (or Prefix) Specify prefixes this package may be installed into, used to make -packages relocatable. Very few packages are. +packages relocatable. Very few packages are. See [Relocatable Packages](relocatable.md) for details. + #### DocDir @@ -470,6 +510,14 @@ Used for creating sub-packages with conflicting files, such as different variants of the same content (eg minimal and full versions of the same software). +#### More Dependencies related Topics + * [Dependencies Basics](dependencies.md) + * [More on Dependencies](more_dependencies.md) + * [Boolean Dependencies](boolean_dependencies.md) + * [Architecture Dependencies](arch_dependencies.md) + * [Installation Order](tsort.md) + * [Automatic Dependency Generation](dependency_generators.md) + ### Sub-sections #### `%package [-n]` From 332a11036ff0b2dcdac95cf4cda072541365b8d3 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 13 Jan 2025 15:13:56 +0100 Subject: [PATCH 3/3] Drop Spec syntax related pages from index Now everything is linked from the Spec Syntax page itself. No need to litter the may index page. --- docs/manual/index.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/manual/index.md b/docs/manual/index.md index 2d793ecab8..e852dcc89d 100644 --- a/docs/manual/index.md +++ b/docs/manual/index.md @@ -21,22 +21,6 @@ title: rpm.org - RPM Reference Manual ## Package Building * [Build Process](buildprocess.md) * [Spec Syntax](spec.md) - * [Autosetup](autosetup.md) - * [Declarative builds](buildsystem.md) - * Dependencies - * [Dependencies Basics](dependencies.md) - * [More on Dependencies](more_dependencies.md) - * [Boolean Dependencies](boolean_dependencies.md) - * [Architecture Dependencies](arch_dependencies.md) - * [Installation Order](tsort.md) - * [Automatic Dependency Generation](dependency_generators.md) - * Install scriptlets - * [Triggers](triggers.md) - * [File Triggers](file_triggers.md) - * [Scriptlet Expansion](scriptlet_expansion.md) - * [Users and Groups](users_and_groups.md) - * [Conditional Builds](conditionalbuilds.md) - * [Relocatable Packages](relocatable.md) * [Dynamic Spec Generation](dynamic_specs.md) ## Developer Information