# Upstream source information. %global upstream_owner AdaCore %global upstream_name SPARKlib %global upstream_commit_date 20240110 %global upstream_commit b68d99beb8414e18abec224b8858477b5580b462 %global upstream_shortcommit %(c=%{upstream_commit}; echo ${c:0:7}) Name: sparklib Version: 15.0 Release: 1%{?dist} Summary: SPARKlib, a collection of useful libraries in SPARK 2014 License: Apache-2.0 WITH LLVM-Exception URL: https://github.com/%{upstream_owner}/%{upstream_name} Source0: %{url}/archive/%{upstream_commit}.tar.gz#/%{name}-%{upstream_shortcommit}.tar.gz # Project files to build a relocatable library. Source1: sparklib.gpr Source2: sparklib_light.gpr BuildRequires: gcc-gnat gprbuild # A fedora-gnat-project-common that contains the new GPRinstall macro. BuildRequires: fedora-gnat-project-common >= 3.21 # Requires a version of SPARK that supports the 'Predefined_Equality' annotation. Recommends: spark2014 >= 15.0 # Build only on architectures where GPRbuild is available. ExclusiveArch: %{GPRbuild_arches} %global common_description_en \ This package contains various libraries, such as a wide range of containers, \ as well as lemmas to use directly in user code. \ \ See also section 5.11.1 SPARK Library in the SPARK user's manual (part of \ package spark2014-doc) for details. %description %{common_description_en} ################# ## Subpackages ## ################# %package devel Summary: Development files for SPARKlib Requires: %{name}%{?_isa} = %{version}-%{release} Requires: fedora-gnat-project-common %description devel %{common_description_en} This package contains source code and linking information for developing applications that use SPARKlib. ############# ## Prepare ## ############# %prep %autosetup -n %{upstream_name}-%{upstream_commit} -p1 # Make the "interal" projects that abstract such that `sparklib.gpr' and # `sparklib_light_internal.gpr` can extend them. sed --regexp-extended --in-place \ --expression '/^project/ { s,project,abstract project, ; t; q1 }' \ sparklib_internal.gpr \ sparklib_light_internal.gpr \ # Copy project files into the root of the source tree. cp --preserve=timestamps %{SOURCE1} sparklib.gpr cp --preserve=timestamps %{SOURCE2} sparklib_light.gpr # Scenario variables for GRPbuild project. %global scn_vars %{shrink: -XVERSION=%{version}.0 \ -XSPARKLIB_INSTALLED=False \ -XSPARKLIB_BODY_MODE=Off } ########### ## Build ## ########### %build # Build the library. gprbuild %{GPRbuild_flags} %{scn_vars} -P sparklib.gpr ############# ## Install ## ############# %install # Install the library. %{GPRinstall} %{scn_vars} --no-build-var -P sparklib.gpr # Fix up the symbolic links to the shared libraries. ln --symbolic --force lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so ########### ## Files ## ########### %files %license LICENSE %doc README* %{_libdir}/lib%{name}.so.%{version}.0 %files devel %{_GNAT_project_dir}/%{name}*.gpr %{_includedir}/%{name} %dir %{_libdir}/%{name} %attr(444,-,-) %{_libdir}/%{name}/*.ali %{_libdir}/lib%{name}.so ############### ## Changelog ## ############### %changelog * Tue Jan 28 2025 Dennis van Raaij - 15.0-1 - Updated to FSF 15.0. * Tue Jan 28 2025 Dennis van Raaij - 14.0^20241122git3e25f06-1 - Updated to Git commit 3e25f06, 2024-11-22. * Tue Jan 28 2025 Dennis van Raaij - 14.0-1 - New package, initial version 14.0.