File erfa.spec of Package erfa

#
# spec file for package erfa
#
# Copyright (c) 2016 SUSE LINUX Products 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:           erfa
%define lname	liberfa1
Version:        1.2.0
Release:        0
Summary:        Essential Routines for Fundamental Astronomy
License:        BSD-3-Clause
Group:          Productivity/Scientific/Other
Url:            https://github.com/liberfa/erfa
Source:         https://github.com/liberfa/erfa/releases/download/v%{version}/erfa-%{version}.tar.gz
BuildRequires:  autoconf >= 2.68
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
ERFA is a C library containing key algorithms for astronomy, and is based on
the SOFA library published by the International Astronomical Union (IAU).

%package -n %{lname}
Summary:        Essential Routines for Fundamental Astronomy
Group:          System/Libraries

%description -n %{lname}
ERFA is a C library containing key algorithms for astronomy, and is based on
the SOFA library published by the International Astronomical Union (IAU).

ERFA is intended to replicate the functionality of SOFA (aside from possible
bugfixes in ERFA that have not yet been included in SOFA), but is licensed
under a three-clause BSD license to enable its compatibility with a wide
range of open source licenses. Permission for this release has been obtained
from the SOFA board, and is avilable in the LICENSE file included in this
source distribution.

%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{lname} = %{version}

%description    devel
This package contains libraries and header files for developing
applications that use %{name}.

%package        devel-static
Summary:        Static development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{name}-devel = %{version}

%description    devel-static
This package contains libraries and header files for developing
applications that link statically to %{name}.

%prep
%setup -q

%build
./bootstrap.sh
%configure
make %{?_smp_mflags}

%install
%makeinstall
# *.la should not be packaged (see packaging guidelines: static Libraries)
rm %{buildroot}%{_libdir}/liberfa.la

%post   -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig

%files -n %{lname}
%defattr(-,root,root)
%doc INFO LICENSE README.rst
%{_libdir}/liberfa.so.1
%{_libdir}/liberfa.so.1.*

%files devel
%defattr(-,root,root)
%{_includedir}/erfa.h
%{_includedir}/erfam.h
%{_libdir}/liberfa.so
%{_libdir}/pkgconfig/erfa.pc

%files devel-static
%defattr(-,root,root)
%{_libdir}/liberfa.a

%changelog