File iausofa-c.spec of Package iausofa-c
#
# spec file for package iausofa
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: iausofa-c
Version: 20231011
Release: 19%{?dist}
License: LGPL-3.0+
Summary: IAU SOFA C library
Url: http://www.iausofa.org/
Source: http://www.iausofa.org/2023_1011_C/sofa_c-%{version}.tar.gz
Group: Productivity/Scientific/Astronomy
BuildRequires: gcc
BuildRequires: tar
Obsoletes: iausofa-c <= 20210512
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
SOFA stands for "Standards Of Fundamental Astronomy". The SOFA
software libraries are a collection of subprograms, in source-
code form, which implement official IAU algorithms for fundamental-
astronomy computations. The subprograms at present comprise 185
"astronomy" routines supported by 55 "vector/matrix" routines,
available in both Fortran77 and C implementations.
# This is the subdirectory where the gunzip of the source bundle will expand
%define supdir sofa/%{version}/c/src
# apparently this is needed for Fedora ....
%define debug_package %{nil}
%prep
%setup -q -n %supdir
sed -i "s+INSTALL_DIR = \$(HOME)+INSTALL_DIR = \$(RPM_BUILD_ROOT)%{_prefix}+" makefile
sed -i "s+/lib/+/%{_lib}/+" makefile
%build
make %{?_smp_mflags} -j 1
%check
make test
%install
# override the default -j4 or -j3 to avoid "sofam.h already defined" errors
make %{?_smp_mflags} -j 1 install
%files
%defattr(-,root,root)
%license ../doc/copyr.lis
%doc ../doc/*.pdf
%{_libdir}/libsofa_c.a
%{_includedir}/sofa.h
%{_includedir}/sofam.h