File gnatcoll-core.spec of Package gnatcoll-core
%define VERSION_MAJOR 26
%define VERSION_MINOR .0
%define VERSION_PATCH .0
%define _pkg_ver_ 26.0.0
%define _src_ver_ 26.0.0
Name: gnatcoll-core
Version: %{_pkg_ver_}
Release: 7.1
Summary: The GNAT Components Collection (GNATcoll) - Core packages
License: GPL-3.0-or-later WITH GCC-exception-3.1
Group: Development/Libraries/Ada
Source0: %{name}-%{_src_ver_}.tar.gz
Patch0: docs_python.patch
Patch1: docs_install.patch
URL: https://github.com/AdaCore/gnatcoll-core
BuildRequires: gcc-ada
BuildRequires: gprbuild
BuildRequires: libgpr-devel >= %{version}
BuildRequires: %{python_module base >= 3.9}
BuildRequires: python3-Sphinx
BuildRequires: python3-sphinx_rtd_theme
%description
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
%define _minimal_gpr_ gnatcoll_minimal
%define _core_gpr_ gnatcoll_core
%define _projects_gpr_ gnatcoll_projects
%prep
%setup -q -n %{name}-%{_src_ver_}
%patch -P 0
%patch -P 1
%build
unset GPR_PROJECT_PATH_FILE
export GPR_PROJECT_PATH=minimal:core:projects
# build libraries
for prj in minimal core projects; do
python3 $prj/gnatcoll_$prj.gpr.py build --configure-only --enable-constant-update
for kind in static static-pic relocatable; do
gprbuild -R -p -m \
-XLIBRARY_TYPE=$kind \
$prj/gnatcoll_$prj.gpr
done
done
# build docs
%__make html -C docs
%install
unset GPR_PROJECT_PATH_FILE
export GPR_PROJECT_PATH=minimal:core:projects
#install libraries
for prj in minimal core projects; do
for kind in static static-pic relocatable; do
gprinstall -p \
--prefix=%{buildroot}%{_prefix} \
-XLIBRARY_TYPE=$kind \
--build-name=$kind \
--build-var=LIBRARY_TYPE \
--lib-subdir=%{_lib}/gnatcoll_$prj.$kind \
--link-lib-subdir=%{_lib} \
--sources-subdir=include/gnatcoll_$prj \
--no-manifest \
$prj/gnatcoll_$prj.gpr
done
done
%__cp gnatcoll.gpr %{buildroot}%{_datadir}/gpr
# install docs
%__rm docs/_build/html/.buildinfo
%__mkdir -p %{buildroot}%{_datadir}/doc/%{name}
%__cp -r docs/_build/html %{buildroot}%{_datadir}/doc/%{name}
# install examples
%__mkdir -p %{buildroot}%{_datadir}/examples/%{name}
%__cp -r examples/* %{buildroot}%{_datadir}/examples/%{name}
### libgnatcoll_minimal
%package -n lib%{_minimal_gpr_}
Summary: The GNAT Components Collection (GNATcoll) - Core packages
Group: System/Libraries
%description -n lib%{_minimal_gpr_}
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
%{_minimal_gpr_}: features that may work in cross-environment context.
%post -n lib%{_minimal_gpr_}
%run_ldconfig
%postun -n lib%{_minimal_gpr_}
%run_ldconfig
%files -n lib%{_minimal_gpr_}
%license COPYING*
%dir %{_libdir}/%{_minimal_gpr_}.relocatable
%{_libdir}/%{_minimal_gpr_}.relocatable/lib%{_minimal_gpr_}.so.*
%{_libdir}/lib%{_minimal_gpr_}.so.*
### gnatcoll_minimal-devel
%package -n %{_minimal_gpr_}-devel
Summary: The GNAT Components Collection (GNATcoll) - Core packages
Requires: lib%{_minimal_gpr_} = %{version}
Requires: gcc-ada
Requires: gprbuild
%description -n %{_minimal_gpr_}-devel
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
This package contains the development files for %{_minimal_gpr_} package.
%post -n %{_minimal_gpr_}-devel
%run_ldconfig
%postun -n %{_minimal_gpr_}-devel
%run_ldconfig
%files -n %{_minimal_gpr_}-devel
%defattr(-, root, root)
%dir %{_includedir}/%{_minimal_gpr_}
%{_includedir}/%{_minimal_gpr_}/*
%dir %{_libdir}/%{_minimal_gpr_}.*
%{_libdir}/%{_minimal_gpr_}.static/*.ali
%{_libdir}/%{_minimal_gpr_}.static/lib%{_minimal_gpr_}.a
%{_libdir}/%{_minimal_gpr_}.static-pic/*.ali
%{_libdir}/%{_minimal_gpr_}.static-pic/lib%{_minimal_gpr_}.a
%{_libdir}/%{_minimal_gpr_}.relocatable/*.ali
%{_libdir}/%{_minimal_gpr_}.relocatable/lib%{_minimal_gpr_}.so
%{_libdir}/lib%{_minimal_gpr_}.so
%{_datadir}/gpr/%{_minimal_gpr_}.gpr
### libgnatcoll_core
%package -n lib%{_core_gpr_}
Summary: The GNAT Components Collection (GNATcoll) - Core packages
Group: System/Libraries
%description -n lib%{_core_gpr_}
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
%{_core_gpr_}: mainly native features such as process handling, JSON parsing, ...
%post -n lib%{_core_gpr_}
%run_ldconfig
%postun -n lib%{_core_gpr_}
%run_ldconfig
%files -n lib%{_core_gpr_}
%license COPYING*
%dir %{_libdir}/%{_core_gpr_}.relocatable
%{_libdir}/%{_core_gpr_}.relocatable/lib%{_core_gpr_}.so.*
%{_libdir}/lib%{_core_gpr_}.so.*
### gnatcoll_core-devel
%package -n %{_core_gpr_}-devel
Summary: The GNAT Components Collection (GNATcoll) - Core packages
Requires: lib%{_core_gpr_} = %{version}
Requires: gcc-ada
Requires: gprbuild
Requires: %{_minimal_gpr_}-devel = %{version}
Conflicts: gnatcoll-core-devel
%description -n %{_core_gpr_}-devel
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
This package contains the development files for %{_core_gpr_} package.
%post -n %{_core_gpr_}-devel
%run_ldconfig
%postun -n %{_core_gpr_}-devel
%run_ldconfig
%files -n %{_core_gpr_}-devel
%defattr(-, root, root)
%doc README.md CONTRIBUTING.md
%dir %{_includedir}/%{_core_gpr_}
%{_includedir}/%{_core_gpr_}/*
%dir %{_libdir}/%{_core_gpr_}.*
%{_libdir}/%{_core_gpr_}.static/*.ali
%{_libdir}/%{_core_gpr_}.static/lib%{_core_gpr_}.a
%{_libdir}/%{_core_gpr_}.static-pic/*.ali
%{_libdir}/%{_core_gpr_}.static-pic/lib%{_core_gpr_}.a
%{_libdir}/%{_core_gpr_}.relocatable/*.ali
%{_libdir}/%{_core_gpr_}.relocatable/lib%{_core_gpr_}.so
%{_libdir}/lib%{_core_gpr_}.so
%{_datadir}/gpr/%{_core_gpr_}.gpr
### libgnatcoll_projects
%package -n lib%{_projects_gpr_}
Summary: The GNAT Components Collection (GNATcoll) - Core packages
Group: System/Libraries
%description -n lib%{_projects_gpr_}
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
%{_projects_gpr_}: high level binding to libgpr project.
%post -n lib%{_projects_gpr_}
%run_ldconfig
%postun -n lib%{_projects_gpr_}
%run_ldconfig
%files -n lib%{_projects_gpr_}
%license COPYING*
%dir %{_libdir}/%{_projects_gpr_}.relocatable
%{_libdir}/%{_projects_gpr_}.relocatable/lib%{_projects_gpr_}.so.*
%{_libdir}/lib%{_projects_gpr_}.so.*
### gnatcoll_projects-devel
%package -n %{_projects_gpr_}-devel
Summary: The GNAT Components Collection (GNATcoll) - Core packages
Requires: gcc-ada
Requires: gprbuild
Requires: xmlada-devel
Requires: libgpr-devel
Requires: lib%{_projects_gpr_} = %{version}
Requires: %{_core_gpr_}-devel = %{version}
%description -n %{_projects_gpr_}-devel
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
This package contains the development files for %{_projects_gpr_} package.
%post -n %{_projects_gpr_}-devel
%run_ldconfig
%postun -n %{_projects_gpr_}-devel
%run_ldconfig
%files -n %{_projects_gpr_}-devel
%defattr(-, root, root)
%dir %{_includedir}/%{_projects_gpr_}
%{_includedir}/%{_projects_gpr_}/*
%dir %{_libdir}/%{_projects_gpr_}.*
%{_libdir}/%{_projects_gpr_}.static/*.ali
%{_libdir}/%{_projects_gpr_}.static/lib%{_projects_gpr_}.a
%{_libdir}/%{_projects_gpr_}.static-pic/*.ali
%{_libdir}/%{_projects_gpr_}.static-pic/lib%{_projects_gpr_}.a
%{_libdir}/%{_projects_gpr_}.relocatable/*.ali
%{_libdir}/%{_projects_gpr_}.relocatable/lib%{_projects_gpr_}.so
%{_libdir}/lib%{_projects_gpr_}.so
%{_datadir}/gpr/%{_projects_gpr_}.gpr
%{_datadir}/gpr/gnatcoll.gpr
### gnatcoll-doc
%package doc
Summary: Documentation for GNATcoll Core packages
Group: Documentation/HTML
BuildArch: noarch
%description doc
The GNATColl components complement the predefined Ada and GNAT libraries and
deal with a range of common programming issues including string and text
processing, memory management, and file handling. Several of the components are
especially useful in enterprise applications.
This package provides the documentation for GNATcoll in HTML.
%files doc
%defattr(-, root, root)
%{_datadir}/doc/%{name}
%dir %{_datadir}/examples
%dir %{_datadir}/examples/%{name}
%{_datadir}/examples/%{name}/*
%changelog