File LORENE.spec of Package LORENE

#
# spec file for package LORENE
#
# Copyright (c) 2023 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           LORENE
Version:        0.0.1
Release:        0
Summary:        Set of C++ classes to solve problems arising in numerical relativity
License:        GPL-2.0-only
URL:            https://lorene.obspm.fr/index.html
#cvs -d :pserver:anonymous@octane.obspm.fr:/cvsroot login
#password: anonymous
#cvs -z5 -d :pserver:anonymous@octane.obspm.fr:/cvsroot checkout LORENE
#tar -Jcvf LORENE.tar.xz LORENE
Source:         LORENE.tar.xz
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  lapack-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(gsl)
# Section For docs
BuildRequires:  doxygen
BuildRequires:  texlive-latex-bin
# /Section

%description
LORENE is a set of C++ classes to solve various problems arising in numerical
relativity, and more generally in computational astrophysics. It provides tools
to solve partial differential equations by means of multi-domain spectral
methods. Its classes implement basic structures such as arrays and matrices,
but also abstract mathematical objects, such as tensors, and astrophysical
objects, such as stars and black holes.

%package devel-static
Summary:        Static libraries and headers for %{name}
Requires:       lapack-devel
Requires:       pkgconfig(fftw3)
Requires:       pkgconfig(gsl)

%description devel-static
LORENE is a set of C++ classes to solve various problems arising in numerical
relativity, and more generally in computational astrophysics.

This package provides the static libraries and headers for %{name}.

%package doc
Summary:        Documentation for %{name}
Requires:       %{name}-devel-static
BuildArch:      noarch

%description doc
This package provides documentation for %{name}.

%prep
%autosetup -n %{name}
cp Local_settings_examples/local_settings_linux_gcc-4_fPIC ./local_settings

%build
export HOME_LORENE=$PWD
export CFLAGS="%optflags"
export CXXFLAGS="%optflags"
%make_build -j1

%install
#No install target for make
mkdir -p %{buildroot}%{_bindir}
cp -p bin/* %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_libdir}
cp -p Lib/* %{buildroot}%{_libdir}/
mkdir -p %{buildroot}%{_includedir}/%{name}/
rm %{buildroot}%{_libdir}/date_mark
rm -fr C++/Include/CVS C++/Include/Template/CVS
cp -pr C++/Include/* %{buildroot}%{_includedir}/%{name}/

%files devel-static
%license COPYING
%doc README
%{_bindir}/*
%{_libdir}/*
%{_includedir}/%{name}/

%files doc
%doc Doc/refguide/

%changelog
openSUSE Build Service is sponsored by