Packaging of Ada programs
Introdution
This document describes all there is to know about Ada in Fedora.
Compilation
Ada programs in Fedora MUST be compiled using the default Ada compiler in Fedora gcc-gnat. As usual, standard Fedora optimization flags %{optflags}
MUST be used in the compilation.
If possible project SHOULD have makefile and configure script
Files placing
- All Ada include files '*.adb' and '*.ads' MUST be placed in the standard include directory: either directly in
%{_includedir}
, or if headers have general names or upstream recommends having an own directory, in e.g.%{_includedir}/%{name}
. - Ada projects files MUST be placed in
%{_datadir}/gpr/
directory of if project have several '*.gpr' files in e.g.%{_gnatdir}/ada/%{name}
.
- Ada Library Information '*.ali' files SHOULD reside in %{libdir}/%{name}/*.ali.
Rpmlint and Ada packages
Rpmlint is a program that checks packages for common problems. For ada packages, some of the rpmlint messages, such as "executable-stack", can be disregarded. bugzilla
Devel packages
- Ada packages MUST package Ada specification files (*.ads), Ada body files (*.adb), Ada Library information (*.ali) and GNAT project (*.gpr) files in -devel package.
- The -devel package MUST depend on fedora-gnat-common package
- The -devel package MUST provide all source files (specs and bodies) necessary for compilation of code that uses the library. The -devel package MUST depends on fedora-gnat-project-common package
- The directory with all Ada source files MUST NOT contain any Makefiles or any other files that might be necessary to recompile the library.
- The -devel package SHOULD NOT provide any *.o files.
- Ada Library information
- The -devel package SHOULD provide Ada Library Information (*.ali) files that gcc-gnat creates when compiling the shared (relocatable, not static) library.
- GNAT project file
- The -devel package for each library SHOULD provide a GNAT project file named
%{_datadir}/ada/%{name}.gpr
.