d36c515
Summary:        A lightweight C++ utility library
d36c515
Name:           elements-alexandria
6de2b7f
Version:        2.16
c08810a
Release:        4%{?dist}
d36c515
License:        LGPLv3+
d36c515
URL:            https://github.com/astrorama/Alexandria.git
d36c515
Source0:        https://github.com/astrorama/Alexandria/archive/%{version}/%{name}-%{version}.tar.gz
d36c515
# This file is used to link the documentation to cppreference.com
d36c515
# It is downloaded from:
d36c515
# https://upload.cppreference.com/w/File:cppreference-doxygen-web.tag.xml
d36c515
Source1:        cppreference-doxygen-web.tag.xml
6de2b7f
# Fix a bad memory access when fixing an axis
6de2b7f
Patch0:         elements-alexandria_fixaxis.patch
08be912
# Fixes for failing tests on architectures other than x86_64
08be912
Patch1:         elements-alexandria_arch.patch
d36c515
6de2b7f
%global elements_version 5.10
d36c515
d36c515
BuildRequires: CCfits-devel
d36c515
BuildRequires: boost-devel >= 1.53
d36c515
BuildRequires: cfitsio-devel
d36c515
BuildRequires: cppunit-devel
d36c515
BuildRequires: elements-devel = %{elements_version}
d36c515
BuildRequires: log4cpp-devel
d36c515
# Required for the generation of the documentation
d36c515
BuildRequires: elements-doc = %{elements_version}
d36c515
BuildRequires: doxygen
d36c515
BuildRequires: graphviz
d36c515
BuildRequires: texlive-latex
d36c515
%if 0%{?fedora} >= 30
d36c515
BuildRequires: texlive-newunicodechar
d36c515
%endif
d36c515
BuildRequires: texlive-dvips
d36c515
d36c515
BuildRequires: gcc-c++ > 4.7
d36c515
BuildRequires: cmake >= 2.8.5
d36c515
%if 0%{?fedora} >= 30
d36c515
BuildRequires: python3
d36c515
BuildRequires: python3-pytest
d36c515
BuildRequires: python3-devel
d36c515
%else
d36c515
BuildRequires: python2
d36c515
BuildRequires: python2-pytest
d36c515
BuildRequires: python2-devel
d36c515
%endif
b982097
BuildRequires: make
d36c515
d36c515
%if 0%{?rhel} && 0%{?rhel} <= 7
d36c515
Requires: cmake%{?_isa}
d36c515
%else
d36c515
Requires: cmake-filesystem%{?_isa}
d36c515
%endif
d36c515
d36c515
%global cmakedir %{_libdir}/cmake/ElementsProject
d36c515
d36c515
%global makedir %{_datadir}/Elements/make
d36c515
%global confdir %{_datadir}/Elements
d36c515
%global auxdir %{_datadir}/auxdir
d36c515
%global docdir %{_docdir}/Alexandria
d36c515
d36c515
%if 0%{?fedora} >= 30
d36c515
%global python_sitearch %{python3_sitearch}
d36c515
%else
d36c515
%global python_sitearch %{python2_sitearch}
d36c515
%endif
d36c515
d36c515
%description
d36c515
A lightweight C++ utility library.
d36c515
d36c515
%package devel
d36c515
Summary: The development part of the %{name} package
d36c515
Requires: %{name}%{?_isa} = %{version}-%{release}
d36c515
Requires: elements-devel%{?_isa} = %{elements_version}
d36c515
d36c515
%description devel
d36c515
The development part of the %{name} package.
d36c515
d36c515
%package doc
d36c515
Summary: Documentation for package %{name}
d36c515
License: LGPLv3+ and CC-BY-SA
d36c515
BuildArch: noarch
d36c515
Requires: elements-doc = %{elements_version}
d36c515
d36c515
%description doc
d36c515
Documentation for package %{name}
d36c515
d36c515
%prep
d36c515
%autosetup -n Alexandria-%{version} -p1
d36c515
d36c515
%build
d36c515
export VERBOSE=1
d36c515
EXTRA_CMAKE_FLAGS="-DUSE_ENV_FLAGS=ON"
d36c515
%if 0%{?fedora} >= 30
d36c515
EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DPYTHON_EXPLICIT_VERSION=3"
d36c515
%else
d36c515
EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DPYTHON_EXPLICIT_VERSION=2"
d36c515
%endif
d36c515
# Build
08ee21d
%cmake -B "%{_vpath_builddir}" -DELEMENTS_BUILD_TESTS=ON -DELEMENTS_INSTALL_TESTS=OFF -DSQUEEZED_INSTALL:BOOL=ON -DINSTALL_DOC:BOOL=ON \
d36c515
    -DUSE_SPHINX=OFF --no-warn-unused-cli \
08ee21d
    -DCMAKE_LIB_INSTALL_SUFFIX=%{_lib} -DUSE_VERSIONED_LIBRARIES=ON ${EXTRA_CMAKE_FLAGS}
b3e18c4
# Copy cppreference-doxygen-web.tag.xml into the build directory
b3e18c4
mkdir -p "%{_vpath_builddir}/doc/doxygen"
b3e18c4
cp -v "%{SOURCE1}" "%{_vpath_builddir}/doc/doxygen"
b3e18c4
08ee21d
%make_build -C "%{_vpath_builddir}"
d36c515
d36c515
%install
d36c515
export VERBOSE=1
08ee21d
%make_install -C "%{_vpath_builddir}"
d36c515
6de2b7f
%check
08ee21d
make test -C "%{_vpath_builddir}"
6de2b7f
d36c515
%files
d36c515
%license LICENSE
d36c515
%{cmakedir}/AlexandriaEnvironment.xml
d36c515
d36c515
%{_libdir}/libAlexandriaKernel.so.%{version}
d36c515
%{_libdir}/libConfiguration.so.%{version}
d36c515
%{_libdir}/libGridContainer.so.%{version}
6de2b7f
%{_libdir}/libHistogram.so.%{version}
d36c515
%{_libdir}/libNdArray.so.%{version}
d36c515
%{_libdir}/libMathUtils.so.%{version}
d36c515
%{_libdir}/libPhysicsUtils.so.%{version}
d36c515
%{_libdir}/libSOM.so.%{version}
d36c515
%{_libdir}/libSourceCatalog.so.%{version}
d36c515
%{_libdir}/libTable.so.%{version}
d36c515
%{_libdir}/libXYDataset.so.%{version}
d36c515
d36c515
%{python_sitearch}/ALEXANDRIA_VERSION.py*
d36c515
%{python_sitearch}/ALEXANDRIA_INSTALL.py*
d36c515
%if 0%{?fedora} >= 30
d36c515
%{python_sitearch}/__pycache__/ALEXANDRIA*.pyc
d36c515
%endif
d36c515
d36c515
%files devel
d36c515
%{_libdir}/libAlexandriaKernel.so
d36c515
%{_libdir}/libConfiguration.so
d36c515
%{_libdir}/libGridContainer.so
6de2b7f
%{_libdir}/libHistogram.so
d36c515
%{_libdir}/libNdArray.so
d36c515
%{_libdir}/libMathUtils.so
d36c515
%{_libdir}/libPhysicsUtils.so
d36c515
%{_libdir}/libSOM.so
d36c515
%{_libdir}/libSourceCatalog.so
d36c515
%{_libdir}/libTable.so
d36c515
%{_libdir}/libXYDataset.so
d36c515
d36c515
%{_includedir}/ALEXANDRIA_VERSION.h
d36c515
%{_includedir}/ALEXANDRIA_INSTALL.h
d36c515
%{_includedir}/AlexandriaKernel/
d36c515
%{_includedir}/Table/
d36c515
%{_includedir}/XYDataset/
d36c515
%{_includedir}/GridContainer/
6de2b7f
%{_includedir}/Histogram/
d36c515
%{_includedir}/NdArray/
d36c515
%{_includedir}/SourceCatalog/
d36c515
%{_includedir}/Configuration/
d36c515
%{_includedir}/MathUtils/
d36c515
%{_includedir}/PhysicsUtils/
d36c515
%{_includedir}/SOM/
d36c515
d36c515
%{cmakedir}/AlexandriaBuildEnvironment.xml
d36c515
%{cmakedir}/AlexandriaExports.cmake
d36c515
%{cmakedir}/AlexandriaExports-relwithdebinfo.cmake
d36c515
%{cmakedir}/AlexandriaPlatformConfig.cmake
d36c515
%{cmakedir}/AlexandriaKernelExport.cmake
d36c515
%{cmakedir}/TableExport.cmake
d36c515
%{cmakedir}/XYDatasetExport.cmake
d36c515
%{cmakedir}/GridContainerExport.cmake
6de2b7f
%{cmakedir}/HistogramExport.cmake
d36c515
%{cmakedir}/NdArrayExport.cmake
d36c515
%{cmakedir}/SourceCatalogExport.cmake
d36c515
%{cmakedir}/ConfigurationExport.cmake
d36c515
%{cmakedir}/MathUtilsExport.cmake
d36c515
%{cmakedir}/PhysicsUtilsExport.cmake
d36c515
%{cmakedir}/SOMExport.cmake
d36c515
%{cmakedir}/AlexandriaConfigVersion.cmake
d36c515
%{cmakedir}/AlexandriaConfig.cmake
d36c515
d36c515
%files doc
d36c515
%license LICENSE
d36c515
%{docdir}
d36c515
8d64b25
%changelog
c08810a
* Mon Dec 07 2020 Alejandro Alvarez Ayllon <alejandro.alvarezayllon@unige.ch> 2.16-4
c08810a
- Rebuilt for Fedora 34
c08810a
efba655
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.16-3
efba655
- Second attempt - Rebuilt for
efba655
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
efba655
3ab3d3d
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.16-2
3ab3d3d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3ab3d3d
6de2b7f
* Fri Jul 17 2020 Alejandro Alvarez Ayllon <alejandro.alvarezayllon@unige.ch> 2.16-1
6de2b7f
- New upstream release 2.16
6de2b7f
de1bbf3
* Thu May 28 2020 Jonathan Wakely <jwakely@redhat.com> - 2.14.1-7
de1bbf3
- Rebuilt for Boost 1.73
de1bbf3
788fa8f
* Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 2.14.1-6
788fa8f
- Rebuilt for Python 3.9
788fa8f
f65f87d
* Wed Feb 26 2020 Alejandro Alvarez Ayllon <a.alvarezayllon@gmail.com> - 2.14.1-5
f65f87d
- Rebuild for Fedora 33
f65f87d
4ad755b
* Mon Feb 03 2020 Alejandro Alvarez Ayllon <a.alvarezayllon@gmail.com> - 2.14.1-4
4ad755b
- Rebuild for elements 5.8-6
4ad755b
ee9aa97
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.1-3
ee9aa97
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ee9aa97
d36c515
* Mon Jan 13 2020 Alejandro Alvarez Ayllon <alejandro.alvarezayllon@unige.ch> 2.14.1-2
d36c515
- Fix conditional dependency on cmake-filesystem
d36c515
- Add LICENSE file to the main package
d36c515
d36c515
* Fri Jan 10 2020 Alejandro Alvarez Ayllon <alejandro.alvarezayllon@unige.ch> 2.14.1-1
d36c515
- Initial RPM