Name:     libaaflib
Version:  0.1
Release:  alt1
Summary:  aaflib is an implementation of the mathematical construct of affine arithmetics in C++.
Group:    Sciences/Mathematics
License:  LGPL-2.1-or-later
URL:      https://aaflib.sourceforge.net
Source0:  %name-%version.tar
Packager: Alexander Lubyagin <dfpl@altlinux.ru>

BuildRequires(pre): rpm-macros-cmake
BuildRequires: cmake gcc-c++ gcc-c++-common

%description
The aaflib is an implementation of the mathematical construct of affine
arithmetics in C++. This construct has been introduced by Stolfi et. al.
The aaflib is based on the libaffa, a reimplemention of the original library,
but has been developed further. It has been used as main calculation library
for a spice-like nonlinear circuit simulator.
Currently the library and the simulator are developed at the Institute
of Microelectronic Systems in Hannover, Germany.

%package devel
Summary: Development environment for aaflib
Group: Development/C++
Requires: %name = %version-%release

%description devel
The aaflib is an implementation of the mathematical construct of affine
arithmetics in C++.
This package contains development files you can use to develop
applications using arbitrary-precision computations.

%package devel-static
Summary: Static aaflib library
Group: Development/C
Requires: %name-devel = %version-%release

%description devel-static
The aaflib is an implementation of the mathematical construct of affine
arithmetics in C++.
This package contains development files you can use to develop
statically linked applications using arbitrary-precision computations.

%prep
%setup

%build
mkdir -p build
cd build
cmake ..
make all

%install
mkdir -p %buildroot%_libdir/
cp -a build/libaaf.lin64.* %buildroot%_libdir/
mkdir -p %buildroot%_includedir/
cp -a aa*.h %buildroot%_includedir/

%files
%_libdir/*.so.*

%files devel
%_libdir/*.so
%_includedir/aa.h
%_includedir/aa_*.h

%files devel-static
%_libdir/*.a

%changelog
* Thu Jul 25 2024 Alexander Lubyagin <dfpl@altlinux.org> 0.1-alt1
- First release
