@@ -4,6 +4,37 @@ title: rpm.org - Spec file format
4
4
---
5
5
# Spec file format
6
6
7
+ Spec files describe how software is build and packaged.
8
+
9
+ ### Contents and Links
10
+
11
+ * [ Generic syntax] ( #generic-syntax )
12
+ * [ → Macro syntax] ( macros.md )
13
+ * [ Comments] ( #comments )
14
+ * [ Conditionals] ( #conditionals )
15
+ * [ → Conditional Builds] ( conditionalbuilds.md )
16
+ * [ Sections] ( #sections )
17
+ * [ Preamble] ( #preamble )
18
+ * [ Dependencies] ( #dependencies )
19
+ * [ → Dependencies Basics] ( dependencies.md )
20
+ * [ → More on Dependencies] ( more_dependencies.md )
21
+ * [ → Boolean Dependencies] ( boolean_dependencies.md )
22
+ * [ → Architecture Dependencies] ( arch_dependencies.md )
23
+ * [ → Installation Order] ( tsort.md )
24
+ * [ → Automatic Dependency Generation] ( dependency_generators.md )
25
+ * [ → Declarative builds] ( buildsystem.md )
26
+ * [ → Relocatable Packages] ( relocatable.md )
27
+ * [ Sub-sections] ( #sub-sections )
28
+ * [ Build scriptlets] ( #build-scriptlets )
29
+ * [ → Autosetup] ( autosetup.md )
30
+ * [ Runtime scriptlets] ( #runtime-scriptlets )
31
+ * [ → Triggers] ( triggers.md )
32
+ * [ → File Triggers] ( file_triggers.md )
33
+ * [ → Scriptlet Expansion] ( scriptlet_expansion.md )
34
+ * [ %files section] ( #files-section )
35
+ * [ → Users and Groups] ( users_and_groups.md )
36
+ * [ %changelog section] ( changelog-section )
37
+
7
38
## Generic syntax
8
39
9
40
### Macros
@@ -82,6 +113,14 @@ other conditionals.
82
113
%if-conditionals are not macros, and are unlikely to yield expected results
83
114
if used in them.
84
115
116
+
117
+ ### Conditional Builds ###
118
+
119
+ Conditionals can be made available for users building the package.
120
+ [ Conditional Builds] ( conditionalbuilds.md ) add ` --with ` and ` --without `
121
+ command line options to ` rpmbuild ` that can be used inside the spec
122
+ file.
123
+
85
124
### Sections ###
86
125
87
126
The spec file is divided in several sections. Except of the preamble
@@ -453,7 +492,8 @@ unexpected results, in particular with `%global`.
453
492
#### Prefixes (or Prefix)
454
493
455
494
Specify prefixes this package may be installed into, used to make
456
- packages relocatable. Very few packages are.
495
+ packages relocatable. Very few packages are. See [ Relocatable Packages] ( relocatable.md ) for details.
496
+
457
497
458
498
#### DocDir
459
499
@@ -470,6 +510,14 @@ Used for creating sub-packages with conflicting files, such as different
470
510
variants of the same content (eg minimal and full versions of the same
471
511
software).
472
512
513
+ #### More Dependencies related Topics
514
+ * [ Dependencies Basics] ( dependencies.md )
515
+ * [ More on Dependencies] ( more_dependencies.md )
516
+ * [ Boolean Dependencies] ( boolean_dependencies.md )
517
+ * [ Architecture Dependencies] ( arch_dependencies.md )
518
+ * [ Installation Order] ( tsort.md )
519
+ * [ Automatic Dependency Generation] ( dependency_generators.md )
520
+
473
521
### Sub-sections
474
522
475
523
#### ` %package [-n]<name> `
0 commit comments