Packaging:Ada

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Packaging of Ada programs)
(Packaging of Ada programs)
Line 17: Line 17:
 
=== Files placing ===
 
=== Files placing ===
  
All Ada include files '*.adb'  and '*.ads' '''MUST''' be placed in the standard include directory: either directly in <code>%{_includedir} </code>, or if headers have general names or upstream recommends having an own directory, in e.g. <code>%{_includedir}/%{name}</code>.
+
All Ada include files '*.adb'  and '*.ads' '''MUST''' be placed in the standard include directory: either directly in <code>%{_includedir}</code>, or if headers have general names or upstream recommends having an own directory, in e.g. <code>%{_includedir}/%{name}</code>.  
 
+
Ada projects files '''MUST''' be placed in <code>%{_libdir}/gnat/</code> directory  of if project have several '*.gpr' files in e.g. <code>  %{_libdir}/gnat/%{name}</code>.
+
  
 +
Ada projects files '''MUST''' be placed in <code>%{_datadir}/gnat/</code> directory  of if project have several '*.gpr' files in e.g. <code>  %{_gnatdir}/gnat/%{name}</code>.
 +
<!-- Currently in Fedora uses /lib/gnat for project files but I think Debian way (/usr/share/ada) is a better way -->
 
Ada Library Information '*.ali' files SHOULD reside in %{libdir}/%{name}/*.ali.
 
Ada Library Information '*.ali' files SHOULD reside in %{libdir}/%{name}/*.ali.
 +
<!-- Probably, %{_libdir}/adalib/%{name} is a better way ? -->
  
 
=== Rpmlint and Ada packages ===
 
=== Rpmlint and Ada packages ===
Line 33: Line 34:
 
The '''-devel''' package '''SHALL NOT''' provide any *.o files.  
 
The '''-devel''' package '''SHALL NOT''' provide any *.o files.  
 
* Ada Library information
 
* Ada Library information
:The -devel package '''SHALL''' provide Ada Library Information (*.ali) files that gcc-gnat creates when compiling the shared (relocatable, not static) library. The '*.ali' files '''SHOULD''' reside in <code>%{libdir}/%{name}/*.ali</code>.  
+
:The -devel package '''SHALL''' provide Ada Library Information (*.ali) files that gcc-gnat creates when compiling the shared (relocatable, not static) library.  
<!-- Probably, %{_libdir}/adalib/%{name} is a better way ? -->
+
 
 
* GNAT project file
 
* GNAT project file
 
: The -devel package for each library '''SHALL''' provide a GNAT project file named <code>%{_libdir}/gnat/%{name}.gpr </code>. You '''SHOULD''' point ADA_PROJECT_PATH="%{_libdir}/gnat" to build in packages depends on %{name}
 
: The -devel package for each library '''SHALL''' provide a GNAT project file named <code>%{_libdir}/gnat/%{name}.gpr </code>. You '''SHOULD''' point ADA_PROJECT_PATH="%{_libdir}/gnat" to build in packages depends on %{name}

Revision as of 17:45, 8 February 2011

Contents

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, if possible, 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

Ada libraries

The Policy for Ada libraries is mostly interesting if you want to package libraries. If you only want to use libraries, see Package Libraries

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}/gnat/ directory of if project have several '*.gpr' files in e.g.  %{_gnatdir}/gnat/%{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.

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 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 SHALL NOT provide any *.o files.

  • Ada Library information
The -devel package SHALL 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 SHALL provide a GNAT project file named %{_libdir}/gnat/%{name}.gpr . You SHOULD point ADA_PROJECT_PATH="%{_libdir}/gnat" to build in packages depends on %{name}