From c13c5d737d24c3577f51fd3cc0f4adc51c6f7e9e Mon Sep 17 00:00:00 2001
From: Miro Hrončok <miro@hroncok.cz>
Date: Mar 28 2025 11:05:53 +0000
Subject: [PATCH 1/3] RPM_Source_Dir: Semantic newlines, no other changes


---

diff --git a/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc b/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
index 07533e3..40b8a3a 100644
--- a/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
+++ b/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
@@ -1,8 +1,14 @@
 = $RPM_SOURCE_DIR or %\{_sourcedir}
 
-Packages which use files itemized as Source# files, must refer to those files by their Source# macro name, and must not use $RPM_SOURCE_DIR or %\{sourcedir} to refer to those files.
+Packages which use files itemized as Source# files,
+must refer to those files by their Source# macro name,
+and must not use $RPM_SOURCE_DIR or %\{sourcedir} to refer to those files.
 
-This is done to ensure that Fedora SRPMS are properly generated. If a Source# item is renamed, a spec which refers to its old name may succeed locally (because the file is still in %\{_sourcedir} along with the new file), but the proper file will not be included in the SRPM.
+This is done to ensure that Fedora SRPMS are properly generated.
+If a Source# item is renamed,
+a spec which refers to its old name may succeed locally
+(because the file is still in %\{_sourcedir} along with the new file),
+but the proper file will not be included in the SRPM.
 
 *Incorrect Use:*
 
@@ -34,7 +40,9 @@ sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/;s/@PHP_PDOVER@/%{p
 
 === Exceptions
 
-When there is an available list of supplementary source files, it is permissible to use this list in conjunction with %\{sourcedir} to simplify operations on those supplementary source files.
+When there is an available list of supplementary source files,
+it is permissible to use this list in conjunction with %\{sourcedir}
+to simplify operations on those supplementary source files.
 
 An example of this from the kde-l10n package:
 
@@ -45,4 +53,7 @@ for i in $(cat %{SOURCE1000}) ; do
 done
 ....
 
-where Source1000: subdirs-kde-l10n is a list provided by upstream of all the languages supported, and there are ~50 SourceN: tags, which can vary from version from version, but match the languages listed in Source1000, for the tarballs provided by upstream.
+where Source1000: subdirs-kde-l10n is a list provided by upstream of all the languages supported,
+and there are ~50 SourceN: tags, which can vary from version from version,
+but match the languages listed in Source1000,
+for the tarballs provided by upstream.

From 376306077df1f534d94090e6c37ab73a5e9f92b7 Mon Sep 17 00:00:00 2001
From: Miro Hrončok <miro@hroncok.cz>
Date: Mar 28 2025 11:07:10 +0000
Subject: [PATCH 2/3] RPM_Source_Dir: Fix macro name


---

diff --git a/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc b/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
index 40b8a3a..fe30f39 100644
--- a/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
+++ b/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
@@ -2,7 +2,7 @@
 
 Packages which use files itemized as Source# files,
 must refer to those files by their Source# macro name,
-and must not use $RPM_SOURCE_DIR or %\{sourcedir} to refer to those files.
+and must not use $RPM_SOURCE_DIR or %\{_sourcedir} to refer to those files.
 
 This is done to ensure that Fedora SRPMS are properly generated.
 If a Source# item is renamed,
@@ -41,7 +41,7 @@ sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/;s/@PHP_PDOVER@/%{p
 === Exceptions
 
 When there is an available list of supplementary source files,
-it is permissible to use this list in conjunction with %\{sourcedir}
+it is permissible to use this list in conjunction with %\{_sourcedir}
 to simplify operations on those supplementary source files.
 
 An example of this from the kde-l10n package:

From 80b5cd13a8d4d75fe8cc55924e758883f321b56f Mon Sep 17 00:00:00 2001
From: Miro Hrončok <miro@hroncok.cz>
Date: Mar 28 2025 11:11:41 +0000
Subject: [PATCH 3/3] RPM_Source_Dir: Formatting


---

diff --git a/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc b/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
index fe30f39..d8d28ea 100644
--- a/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
+++ b/guidelines/modules/ROOT/pages/RPM_Source_Dir.adoc
@@ -1,13 +1,13 @@
-= $RPM_SOURCE_DIR or %\{_sourcedir}
+= `+$RPM_SOURCE_DIR+` or `+%{_sourcedir}+`
 
-Packages which use files itemized as Source# files,
-must refer to those files by their Source# macro name,
-and must not use $RPM_SOURCE_DIR or %\{_sourcedir} to refer to those files.
+Packages which use files itemized as `+Source#+` files,
+must refer to those files by their `+%{SOURCE#}+` macro name,
+and must not use `+$RPM_SOURCE_DIR+` or `+%{_sourcedir}+` to refer to those files.
 
 This is done to ensure that Fedora SRPMS are properly generated.
-If a Source# item is renamed,
+If a `+Source#+` item is renamed,
 a spec which refers to its old name may succeed locally
-(because the file is still in %\{_sourcedir} along with the new file),
+(because the file is still in `+%{_sourcedir}+` along with the new file),
 but the proper file will not be included in the SRPM.
 
 *Incorrect Use:*
@@ -41,7 +41,7 @@ sed -e "s/@PHP_APIVER@/%{apiver}/;s/@PHP_ZENDVER@/%{zendver}/;s/@PHP_PDOVER@/%{p
 === Exceptions
 
 When there is an available list of supplementary source files,
-it is permissible to use this list in conjunction with %\{_sourcedir}
+it is permissible to use this list in conjunction with `+%{_sourcedir}+`
 to simplify operations on those supplementary source files.
 
 An example of this from the kde-l10n package:
@@ -53,7 +53,7 @@ for i in $(cat %{SOURCE1000}) ; do
 done
 ....
 
-where Source1000: subdirs-kde-l10n is a list provided by upstream of all the languages supported,
-and there are ~50 SourceN: tags, which can vary from version from version,
-but match the languages listed in Source1000,
+where `+Source1000: subdirs-kde-l10n+` is a list provided by upstream of all the languages supported,
+and there are ~50 `+SourceN:+` tags, which can vary from version from version,
+but match the languages listed in `+Source1000+`,
 for the tarballs provided by upstream.

