| |
@@ -11,20 +11,20 @@
|
| |
== Compilation
|
| |
|
| |
* Ada code in Fedora *MUST* be compiled using GNAT, the default Ada compiler in Fedora.
|
| |
- All packages that contain Ada code *MUST* have “`+BuildRequires: gcc-gnat+`”
|
| |
- to ensure that the compiler is available.
|
| |
+ All packages that contain Ada code *MUST* have “`+BuildRequires: gcc-gnat+`”
|
| |
+ to ensure that the compiler is available.
|
| |
* There are a number of RPM macros that contain Fedora’s standard compiler and linker flags adapted for GNAT.
|
| |
- The appropriate macro *MUST* be used in the build stage. The right macro to use depends on what build tools the package uses.
|
| |
+ The appropriate macro *MUST* be used in the build stage. The right macro to use depends on what build tools the package uses.
|
| |
** For packages that are built with Gnatmake or GPRbuild but without Comfignat
|
| |
- there are the macros +++<var>Gnatmake_optflags</var>+++ and +++<var>GPRbuild_optflags</var>+++,
|
| |
- which contain builder, compiler and linker flags.
|
| |
+ there are the macros +++<var>Gnatmake_optflags</var>+++ and +++<var>GPRbuild_optflags</var>+++,
|
| |
+ which contain builder, compiler and linker flags.
|
| |
** In case a package’s build system invokes the underlying GNAT tools without using Gnatmake or GPRbuild,
|
| |
- then the appropriate macro for each tool *MUST* be used.
|
| |
- If for example Gnatlink is invoked directly, then the expansion of +++<var>Gnatlink_flags</var>+++ shall be passed to it.
|
| |
+ then the appropriate macro for each tool *MUST* be used.
|
| |
+ If for example Gnatlink is invoked directly, then the expansion of +++<var>Gnatlink_flags</var>+++ shall be passed to it.
|
| |
** For packages whose build systems use Comfignat there is the macro +++<var>Comfignat_make</var>+++.
|
| |
- It expands to a Make command with appropriate values for Comfignat’s configuration variables,
|
| |
- including builder, compiler and linker flags, directory variables and the directories project.
|
| |
- Use it alone to build the default target:
|
| |
+ It expands to a Make command with appropriate values for Comfignat’s configuration variables,
|
| |
+ including builder, compiler and linker flags, directory variables and the directories project.
|
| |
+ Use it alone to build the default target:
|
| |
+
|
| |
....
|
| |
%build
|
| |
@@ -39,13 +39,13 @@
|
| |
+
|
| |
For the installation stage of Comfignat-using packages, the macro +++<var>make_install</var>+++ (*not* +++<var>makeinstall</var>+++) is recommended.
|
| |
* The macro +++<var>GNAT_arches</var>+++ expands to a list of architectures where GNAT packages are available in Fedora.
|
| |
- Starting with Fedora 18, when there is a need to prevent attempts to build an Ada package on secondary architectures where GNAT has not been bootstrapped,
|
| |
- this *MUST* be done with “`+ExclusiveArch: %{GNAT_arches}+`”.
|
| |
+ Starting with Fedora 18, when there is a need to prevent attempts to build an Ada package on secondary architectures where GNAT has not been bootstrapped,
|
| |
+ this *MUST* be done with “`+ExclusiveArch: %{GNAT_arches}+`”.
|
| |
* All packages that contain Ada code *MUST* have “`+BuildRequires: fedora-gnat-project-common+`” to ensure that the necessary RPM macros are defined.
|
| |
* If the upstream source package comes with a build system,
|
| |
- for example a GNAT project file or makefiles and a configuration script,
|
| |
- then it’s probably best to use that if possible.
|
| |
- If not, it is recommended that the packager write a GNAT project file to control the compilation.
|
| |
+ for example a GNAT project file or makefiles and a configuration script,
|
| |
+ then it’s probably best to use that if possible.
|
| |
+ If not, it is recommended that the packager write a GNAT project file to control the compilation.
|
| |
|
| |
== Runpaths
|
| |
|
| |
@@ -66,12 +66,12 @@
|
| |
== Devel packages
|
| |
|
| |
* Ada library packages *MUST* have a -devel subpackage containing all the files that are necessary for compilation of code that uses the library.
|
| |
- This includes +Ada specification files (*.ads),
|
| |
- Ada body files (*.adb),
|
| |
- Ada library information files (*.ali)
|
| |
- and GNAT project files (*.gpr).+
|
| |
- (There is no requirement to include all body files.
|
| |
- Typically only some body files are needed.)
|
| |
+ This includes +Ada specification files (*.ads),
|
| |
+ Ada body files (*.adb),
|
| |
+ Ada library information files (*.ali)
|
| |
+ and GNAT project files (*.gpr).+
|
| |
+ (There is no requirement to include all body files.
|
| |
+ Typically only some body files are needed.)
|
| |
* The -devel package *MUST NOT* contain any makefiles or other files that are only used for recompiling the library.
|
| |
* The -devel package *MUST NOT* contain any +*.o+ files.
|
| |
|
| |
@@ -79,16 +79,16 @@
|
| |
|
| |
* The -devel package *MUST* contain one or more GNAT project files to be imported by other projects that use the library.
|
| |
* Project files *MUST* be architecture-independent.
|
| |
- This means that the same project file must point to libraries in /usr/lib or /usr/lib64 depending on what target architecture the compiler is currently compiling for.
|
| |
- This *SHOULD* be done by importing the “directories” project
|
| |
- (that is, the project file directories.gpr)
|
| |
- and using the variable +++<var>Directories.Libdir</var>+++ which is defined there.
|
| |
- The value of +++<var>Directories.Libdir</var>+++ is set to either “/usr/lib” or “/usr/lib64” depending on the hardware platform.
|
| |
+ This means that the same project file must point to libraries in /usr/lib or /usr/lib64 depending on what target architecture the compiler is currently compiling for.
|
| |
+ This *SHOULD* be done by importing the “directories” project
|
| |
+ (that is, the project file directories.gpr)
|
| |
+ and using the variable +++<var>Directories.Libdir</var>+++ which is defined there.
|
| |
+ The value of +++<var>Directories.Libdir</var>+++ is set to either “/usr/lib” or “/usr/lib64” depending on the hardware platform.
|
| |
* Project files *MUST NOT* contain hard-coded directory names, neither absolute nor relative; they should get them from some source.
|
| |
- The source may be an Autoconf-generated configuration script or other build system.
|
| |
- Project files that aren’t pre-processed by such a build system *SHOULD* use the variable +++<var>Directories.Includedir</var>+++ rather than a hard-coded “/usr/include”.
|
| |
+ The source may be an Autoconf-generated configuration script or other build system.
|
| |
+ Project files that aren’t pre-processed by such a build system *SHOULD* use the variable +++<var>Directories.Includedir</var>+++ rather than a hard-coded “/usr/include”.
|
| |
* If the “directories” project is used,
|
| |
- then the -devel package *MUST* have an explicit “`+Requires: fedora-gnat-project-common+`”.
|
| |
+ then the -devel package *MUST* have an explicit “`+Requires: fedora-gnat-project-common+`”.
|
| |
* Project files *MUST* have an +++<var>Externally_Built</var>+++ attribute equal to “true”.
|
| |
|
| |
Here’s an example of what a project file installed with a library may look like:
|
| |
@@ -107,16 +107,16 @@
|
| |
== File placement
|
| |
|
| |
* Ada source files in -devel packages (+*.ads and *.adb+)
|
| |
- *MUST* be placed in the `+%{_includedir}+` directory or a subdirectory thereof.
|
| |
- Placing them directly in `+%{_includedir}+` may be appropriate if there are very few of them in the package and their names include the name of the library.
|
| |
- Otherwise they should usually be placed in a subdirectory, for example `+%{_includedir}/%{name}+`.
|
| |
+ *MUST* be placed in the `+%{_includedir}+` directory or a subdirectory thereof.
|
| |
+ Placing them directly in `+%{_includedir}+` may be appropriate if there are very few of them in the package and their names include the name of the library.
|
| |
+ Otherwise they should usually be placed in a subdirectory, for example `+%{_includedir}/%{name}+`.
|
| |
* Ada library information files (+*.ali+)
|
| |
- *MUST* be placed in a subdirectory of `+%{_libdir}+`, for example `+%{_libdir}/%{name}+`.
|
| |
+ *MUST* be placed in a subdirectory of `+%{_libdir}+`, for example `+%{_libdir}/%{name}+`.
|
| |
* GNAT projects files (+*.gpr+)
|
| |
- *MUST* be placed in the `+%{_GNAT_project_dir}+` directory or a subdirectory thereof.
|
| |
- A subdirectory, for example `+%{_GNAT_project_dir}/%{name}+`, may be a good idea if there are lots of project files in the same package or if they have generic names.
|
| |
- Otherwise they should usually be placed directly in `+%{_GNAT_project_dir}+`.
|
| |
- The name of the library *MUST* be included either in the name of each project file or in the name of the subdirectory where the project files are placed.
|
| |
+ *MUST* be placed in the `+%{_GNAT_project_dir}+` directory or a subdirectory thereof.
|
| |
+ A subdirectory, for example `+%{_GNAT_project_dir}/%{name}+`, may be a good idea if there are lots of project files in the same package or if they have generic names.
|
| |
+ Otherwise they should usually be placed directly in `+%{_GNAT_project_dir}+`.
|
| |
+ The name of the library *MUST* be included either in the name of each project file or in the name of the subdirectory where the project files are placed.
|
| |
|
| |
== Rpmlint and Ada packages
|
| |
|
| |
in the internationalization system of our docs, the tool po4a we use to convert asciidoc files into pot displays three lines of warning for each missing indentation.
most of the time it is cosmetic issues in adoc (like here), but sometimes it's po4a bugs that I want to see
this PR has no impact on your rendering, it is fully cosmetic