b70d9c5
# We have to call the package libASL instead of ASL, because a package asl
b70d9c5
# exists. https://fedoraproject.org/wiki/Packaging:Conflicts#Conflicting_Package_Names
b70d9c5
%global upstream ASL
b70d9c5
%global _cmake_build_subdir build-%{?__isa}%{?dist}
b70d9c5
b70d9c5
Name:           lib%{upstream}
89564d6
Version:        0.1.7
Orion Poplawski e1aeaf1
Release:        3%{?dist}
Orion Poplawski afc62e6
Summary:        Advanced Simulation Library hardware accelerated multiphysics simulation platform
b70d9c5
b70d9c5
License:        AGPLv3 and BSD and MIT
b70d9c5
# ===== License-breakdown =====
b70d9c5
#
b70d9c5
# AGPL (v3)
b70d9c5
# ---------
b70d9c5
# * except the files explicitly named below
b70d9c5
#
b70d9c5
# BSD (3 clause)
b70d9c5
# --------------
b70d9c5
# cmake/Modules/FindMATIO.cmake
b70d9c5
# cmake/Modules/FindOpenCL.cmake
b70d9c5
# cmake/Modules/FindPackageMessage.cmake
b70d9c5
#
b70d9c5
# MIT/X11 (BSD like)
b70d9c5
# ------------------
b70d9c5
# src/acl/cl.hpp
b70d9c5
#
b70d9c5
b70d9c5
URL:            http://asl.org.il/
Orion Poplawski afc62e6
Source0:        https://github.com/AvtechScientific/%{upstream}/archive/v%{version}/%{upstream}-%{version}.tar.gz
d9238c2
b70d9c5
BuildRequires:  boost-devel
Orion Poplawski afc62e6
BuildRequires:  cmake3
b70d9c5
BuildRequires:  doxygen
b70d9c5
BuildRequires:  graphviz
b70d9c5
BuildRequires:  matio-devel
b70d9c5
BuildRequires:  netcdf-cxx-devel
b70d9c5
BuildRequires:  ocl-icd-devel
b70d9c5
BuildRequires:  opencl-headers
b70d9c5
BuildRequires:  vtk-devel
Orion Poplawski afc62e6
# For tests, pocl not available on EPEL
Orion Poplawski afc62e6
%if 0%{?fedora}
Orion Poplawski afc62e6
%ifnarch aarch64 ppc64 ppc64le s390 s390x
Orion Poplawski afc62e6
BuildRequires:  pocl-devel
Orion Poplawski afc62e6
%endif
Orion Poplawski afc62e6
%endif
b70d9c5
b70d9c5
%description
89564d6
Advanced Simulation Library (ASL) is a free and open source hardware
89564d6
accelerated multiphysics simulation platform (and an extensible general
89564d6
purpose tool for solving Partial Differential Equations). Its
89564d6
computational engine is written in OpenCL and utilizes matrix-free
89564d6
solution techniques which enable extraordinarily high performance,
89564d6
memory efficiency and deployability on a variety of massively parallel
89564d6
architectures, ranging from inexpensive FPGAs, DSPs and GPUs up to
89564d6
heterogeneous clusters and supercomputers. The engine is hidden entirely
89564d6
behind simple C++ classes, so that no OpenCL knowledge is required from
89564d6
application programmers. Mesh-free, immersed boundary approach allows to
89564d6
move from CAD directly to simulation drastically reducing pre-processing
89564d6
efforts and amount of potential errors. ASL can be used to model various
89564d6
coupled physical and chemical phenomena and employed in a multitude of
89564d6
fields: computational fluid dynamics, virtual sensing, industrial
89564d6
process data validation and reconciliation, image-guided surgery,
89564d6
computer-aided engineering, design space exploration, crystallography,
89564d6
etc..
89564d6
b70d9c5
b70d9c5
%package        bin 
b70d9c5
Summary:        Binaries for %{name}
b70d9c5
Requires:       %{name}%{?_isa} = %{version}-%{release}
b70d9c5
b70d9c5
%description    bin
b70d9c5
Binaries for %{name}
b70d9c5
b70d9c5
%package        devel
b70d9c5
Summary:        Development files for %{name}
b70d9c5
Requires:       %{name}%{?_isa} = %{version}-%{release}
b70d9c5
Requires:       boost-devel%{?_isa}
b70d9c5
Requires:       matio-devel%{?_isa}
b70d9c5
Requires:       netcdf-cxx-devel%{?_isa}
b70d9c5
Requires:       ocl-icd-devel%{?_isa}
b70d9c5
Requires:       opencl-headers
b70d9c5
Requires:       vtk-devel%{?_isa}
b70d9c5
b70d9c5
b70d9c5
%description    devel
b70d9c5
The %{name}-devel package contains libraries and header files for
b70d9c5
developing applications that use %{name}.
b70d9c5
b70d9c5
%package        doc
b70d9c5
# Not noarch here because otherwise koji fails 
b70d9c5
# http://koji.fedoraproject.org/koji/taskinfo?taskID=11237671
b70d9c5
#BuildArch:      noarch
b70d9c5
Summary:        Documentation for %{name}
b70d9c5
b70d9c5
%description    doc
b70d9c5
The %{name}-doc package contains documentation for %{name}
b70d9c5
b70d9c5
%package        examples
b70d9c5
Summary:        Examples for %{name}
b70d9c5
Requires:       %{name}%{?_isa} = %{version}-%{release}
b70d9c5
b70d9c5
%description    examples
b70d9c5
The %{name}-examples package contains examples for %{name}
b70d9c5
b70d9c5
%prep
b70d9c5
%setup -q -n %{upstream}-%{version}
b70d9c5
%{__mkdir_p} %{_cmake_build_subdir}
b70d9c5
b70d9c5
%build
b70d9c5
pushd %{_cmake_build_subdir}
Orion Poplawski afc62e6
%cmake3 -DWITH_API_DOC:BOOL=ON \
Orion Poplawski afc62e6
        -DWITH_MATIO:BOOL=ON  \
Orion Poplawski afc62e6
        -DWITH_EXAMPLES=ON \
Orion Poplawski afc62e6
        -DWITH_TESTS=ON ..
b70d9c5
make %{?_smp_mflags}
b70d9c5
popd
b70d9c5
b70d9c5
b70d9c5
%install
b70d9c5
%make_install -C %{_cmake_build_subdir}
b70d9c5
find %{buildroot} -name '*.la' -delete
b70d9c5
b70d9c5
# Move docs and examples to right places
b70d9c5
%{__mkdir_p} %{buildroot}%{_docdir}/%{name}-doc
b70d9c5
mv %{buildroot}%{_docdir}/%{upstream}/html %{buildroot}%{_docdir}/%{name}-doc
b70d9c5
mv %{buildroot}%{_docdir}/%{upstream}/examples %{buildroot}%{_docdir}/%{name}-examples
Orion Poplawski afc62e6
# Move input data for examples
Orion Poplawski afc62e6
# https://github.com/AvtechScientific/ASL/commit/0246d6adb1ebded5b2ef1d0e82433f86d90ea4ba
89564d6
mv %{buildroot}%{_datadir}/%{upstream}/input %{buildroot}%{_docdir}/%{name}-examples
b70d9c5
Orion Poplawski afc62e6
Orion Poplawski afc62e6
%if 0%{?fedora}
Orion Poplawski 54265a6
%ifnarch aarch64 ppc64 ppc64le s390 s390x
Orion Poplawski afc62e6
%check
Orion Poplawski afc62e6
pushd %{_cmake_build_subdir}
Orion Poplawski afc62e6
# Test failures
Orion Poplawski afc62e6
# https://github.com/AvtechScientific/ASL/issues/16
Orion Poplawski ff87bd6
ctest3 -V -E 'testPrivateVar|testReductionFunction'
Orion Poplawski ff87bd6
ctest3 -V -R 'testPrivateVar|testReductionFunction' || :
Orion Poplawski afc62e6
%endif
Orion Poplawski 54265a6
%endif
Orion Poplawski afc62e6
Orion Poplawski afc62e6
b70d9c5
%post -p /sbin/ldconfig
b70d9c5
b70d9c5
%postun -p /sbin/ldconfig
b70d9c5
b70d9c5
b70d9c5
%files
89564d6
%license COPYRIGHT.org LICENSE
89564d6
%doc NEWS.org README.org
b70d9c5
%{_libdir}/*.so.*
b70d9c5
b70d9c5
%files bin
89564d6
%license COPYRIGHT.org LICENSE
b70d9c5
%{_bindir}/asl-hardware
b70d9c5
b70d9c5
%files devel
89564d6
%license COPYRIGHT.org LICENSE
b70d9c5
%dir %{_libdir}/cmake/%{upstream}
b70d9c5
%{_includedir}/*
b70d9c5
%{_libdir}/*.so
b70d9c5
%{_libdir}/cmake/%{upstream}/*.cmake
b70d9c5
%{_libdir}/pkgconfig/%{upstream}.pc
b70d9c5
b70d9c5
%files doc
89564d6
%license COPYRIGHT.org LICENSE
b70d9c5
%dir %{_docdir}/%{name}-doc
b70d9c5
%{_docdir}/%{name}-doc/html
b70d9c5
b70d9c5
%files examples
89564d6
%license COPYRIGHT.org LICENSE
b70d9c5
%dir %{_docdir}/%{name}-examples
b70d9c5
%{_docdir}/%{name}-examples/*
b70d9c5
%{_bindir}/asl-acousticWaves
b70d9c5
%{_bindir}/asl-bus_wind
b70d9c5
%{_bindir}/asl-compressor
b70d9c5
%{_bindir}/asl-cubeGravity
b70d9c5
%{_bindir}/asl-cubeIncompressibleGravity
b70d9c5
%{_bindir}/asl-cubePoroelasticGravity
b70d9c5
%{_bindir}/asl-flow
b70d9c5
%{_bindir}/asl-flow2
b70d9c5
%{_bindir}/asl-flow3
b70d9c5
%{_bindir}/asl-flowKDPGrowth
b70d9c5
%{_bindir}/asl-flowRotatingCylinders
b70d9c5
%{_bindir}/asl-jumpingBox
b70d9c5
%{_bindir}/asl-levelSetBasic
b70d9c5
%{_bindir}/asl-levelSetFacetedGrowth
b70d9c5
%{_bindir}/asl-levelSetNormalGrowth
b70d9c5
%{_bindir}/asl-locomotive
b70d9c5
%{_bindir}/asl-locomotive_laminar
b70d9c5
%{_bindir}/asl-locomotive_stability
b70d9c5
%{_bindir}/asl-multicomponent_flow
b70d9c5
%{_bindir}/asl-multiphase_flow
b70d9c5
%{_bindir}/asl-pitot_tube_ice
b70d9c5
%{_bindir}/asl-poroelastic
b70d9c5
%{_bindir}/asl-surfaceFlux
b70d9c5
%{_bindir}/asl-testSMDiff
b70d9c5
%{_bindir}/asl-testSMDiff3C
b70d9c5
%{_bindir}/asl-testSMPhi
b70d9c5
%{_bindir}/asl-testSMPhiBV
b70d9c5
b70d9c5
b70d9c5
%changelog
Orion Poplawski e1aeaf1
* Wed Dec 7 2016 Orion Poplawski <orion@cora.nwra.com> - 0.1.7-3
Orion Poplawski e1aeaf1
- Rebuild for vtk 7.1
Orion Poplawski e1aeaf1
Orion Poplawski afc62e6
* Wed Nov 09 2016 Orion Poplawski <orion@cora.nwra.com> - 0.1.7-2
Orion Poplawski afc62e6
- Updated summary
Orion Poplawski afc62e6
- Use cmake3 for EPEL7 compatibility
Orion Poplawski afc62e6
- Run tests on supported pocl arches
Orion Poplawski afc62e6
89564d6
* Wed Nov 09 2016 Christian Dersch <lupinix@mailbox.org> - 0.1.7-1
89564d6
- new version
89564d6
e837de3
* Sun Jul 03 2016 Christian Dersch <lupinix@mailbox.org> - 0.1.6-6
e837de3
- Rebuilt for matio 1.5.8
e837de3
a7df76b
* Fri May 13 2016 Christian Dersch <lupinix@mailbox.org> - 0.1.6-5
a7df76b
- Rebuilt for gcc 6.1.1
a7df76b
f8a0cce
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.6-4
f8a0cce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f8a0cce
efab608
* Sat Jan 23 2016 Christian Dersch <lupinix@mailbox.org> - 0.1.6-3
efab608
- Rebuild for boost 1.60
efab608
Orion Poplawski d522b80
* Fri Jan 22 2016 Orion Poplawski <orion@cora.nwra.com> - 0.1.6-2
Orion Poplawski d522b80
- Rebuild for netcdf 4.4.0
Orion Poplawski d522b80
b70d9c5
* Mon Nov 09 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-1
b70d9c5
- initial SCM import (RHBZ #1244797)
b70d9c5
b70d9c5
* Mon Nov 09 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.5
b70d9c5
- more spec fixes for review
b70d9c5
- added license breakdown
b70d9c5
- adjusted requirements
b70d9c5
b70d9c5
* Sun Nov 08 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.4
b70d9c5
- spec adjustments for review
b70d9c5
b70d9c5
* Sat Sep 26 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.3
b70d9c5
- doc subpackage no longer noarch due to build failure
b70d9c5
b70d9c5
* Sat Sep 26 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.2
b70d9c5
- Small spec fixes
b70d9c5
b70d9c5
* Tue Sep 22 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.1
b70d9c5
- initial spec