Blob Blame History Raw
# We have to call the package libASL instead of ASL, because a package asl
# exists. https://fedoraproject.org/wiki/Packaging:Conflicts#Conflicting_Package_Names
%global upstream ASL
%global _cmake_build_subdir build-%{?__isa}%{?dist}

Name:           lib%{upstream}
Version:        0.1.6
Release:        6%{?dist}
Summary:        Advanced Simulation Library

License:        AGPLv3 and BSD and MIT
# ===== License-breakdown =====
#
# AGPL (v3)
# ---------
# * except the files explicitly named below
#
# BSD (3 clause)
# --------------
# cmake/Modules/FindMATIO.cmake
# cmake/Modules/FindOpenCL.cmake
# cmake/Modules/FindPackageMessage.cmake
#
# MIT/X11 (BSD like)
# ------------------
# src/acl/cl.hpp
#

URL:            http://asl.org.il/
Source0:        https://github.com/AvtechScientific/%{upstream}/archive/v%{version}.tar.gz

# Added patch to fix compilation on rawhide: https://github.com/AvtechScientific/ASL/pull/18
Patch0:         libASL-fix-namespace-ifstream-ofstream.patch

BuildRequires:  boost-devel
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  graphviz
BuildRequires:  matio-devel
BuildRequires:  netcdf-cxx-devel
BuildRequires:  ocl-icd-devel
BuildRequires:  opencl-headers
BuildRequires:  vtk-devel

%description
Advanced Simulation Library is a free and open source multiphysics simulation
software package and a tool for solving Partial Differential Equations.
It has significant user base across many areas of engineering and science,
from both industrial and academic organizations. ASL utilizes only the methods
that allow efficient parallelization: Lattice Boltzmann Methods, Explicit
Finite Difference, Matrix Free Finite Elements, etc. and exploits all
available hardware resources, such as SIMD, local cache, etc.. Once written,
an ASL-based application can be deployed on a variety of architectures, such
as CPU, GPU, FPGA, DSP, clusters and supercomputers, sometimes even without
recompilation.

ASL has an extensive range of features to solve anything from complex fluid
flows involving chemical reactions, turbulence and heat transfer, to solid
mechanics and elasticity.

%package        bin 
Summary:        Binaries for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    bin
Binaries for %{name}

%package        devel
Summary:        Development files for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       boost-devel%{?_isa}
Requires:       matio-devel%{?_isa}
Requires:       netcdf-cxx-devel%{?_isa}
Requires:       ocl-icd-devel%{?_isa}
Requires:       opencl-headers
Requires:       vtk-devel%{?_isa}


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

%package        doc
# Not noarch here because otherwise koji fails 
# http://koji.fedoraproject.org/koji/taskinfo?taskID=11237671
#BuildArch:      noarch
Summary:        Documentation for %{name}

%description    doc
The %{name}-doc package contains documentation for %{name}

%package        examples
Summary:        Examples for %{name}
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    examples
The %{name}-examples package contains examples for %{name}

%prep
%setup -q -n %{upstream}-%{version}
%patch0 -p1
%{__mkdir_p} %{_cmake_build_subdir}

%build
pushd %{_cmake_build_subdir}
%cmake -DWITH_API_DOC:BOOL=ON \
	-DWITH_MATIO:BOOL=ON  \
	-DWITH_EXAMPLES=ON \
	-DWITH_TESTS=ON ..
make %{?_smp_mflags}
popd


%install
%make_install -C %{_cmake_build_subdir}
find %{buildroot} -name '*.la' -delete

# Move docs and examples to right places
%{__mkdir_p} %{buildroot}%{_docdir}/%{name}-doc
mv %{buildroot}%{_docdir}/%{upstream}/html %{buildroot}%{_docdir}/%{name}-doc
mv %{buildroot}%{_docdir}/%{upstream}/examples %{buildroot}%{_docdir}/%{name}-examples


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%license LICENSE
%doc README.md
%{_libdir}/*.so.*

%files bin
%license LICENSE
%{_bindir}/asl-hardware

%files devel
%license LICENSE
%dir %{_libdir}/cmake/%{upstream}
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/cmake/%{upstream}/*.cmake
%{_libdir}/pkgconfig/%{upstream}.pc

%files doc
%license LICENSE
%dir %{_docdir}/%{name}-doc
%{_docdir}/%{name}-doc/html

%files examples
%license LICENSE
%dir %{_docdir}/%{name}-examples
%{_docdir}/%{name}-examples/*
%{_bindir}/asl-acousticWaves
%{_bindir}/asl-bus_wind
%{_bindir}/asl-compressor
%{_bindir}/asl-cubeGravity
%{_bindir}/asl-cubeIncompressibleGravity
%{_bindir}/asl-cubePoroelasticGravity
%{_bindir}/asl-flow
%{_bindir}/asl-flow2
%{_bindir}/asl-flow3
%{_bindir}/asl-flowKDPGrowth
%{_bindir}/asl-flowRotatingCylinders
%{_bindir}/asl-jumpingBox
%{_bindir}/asl-levelSetBasic
%{_bindir}/asl-levelSetFacetedGrowth
%{_bindir}/asl-levelSetNormalGrowth
%{_bindir}/asl-locomotive
%{_bindir}/asl-locomotive_laminar
%{_bindir}/asl-locomotive_stability
%{_bindir}/asl-multicomponent_flow
%{_bindir}/asl-multiphase_flow
%{_bindir}/asl-pitot_tube_ice
%{_bindir}/asl-poroelastic
%{_bindir}/asl-surfaceFlux
%{_bindir}/asl-testSMDiff
%{_bindir}/asl-testSMDiff3C
%{_bindir}/asl-testSMPhi
%{_bindir}/asl-testSMPhiBV


%changelog
* Sun Jul 03 2016 Christian Dersch <lupinix@mailbox.org> - 0.1.6-6
- Rebuilt for matio 1.5.8

* Fri May 13 2016 Christian Dersch <lupinix@mailbox.org> - 0.1.6-5
- Rebuilt for gcc 6.1.1

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sat Jan 23 2016 Christian Dersch <lupinix@mailbox.org> - 0.1.6-3
- Rebuild for boost 1.60

* Fri Jan 22 2016 Orion Poplawski <orion@cora.nwra.com> - 0.1.6-2
- Rebuild for netcdf 4.4.0

* Mon Nov 09 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-1
- initial SCM import (RHBZ #1244797)

* Mon Nov 09 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.5
- more spec fixes for review
- added license breakdown
- adjusted requirements

* Sun Nov 08 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.4
- spec adjustments for review

* Sat Sep 26 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.3
- doc subpackage no longer noarch due to build failure

* Sat Sep 26 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.2
- Small spec fixes

* Tue Sep 22 2015 Christian Dersch <lupinix@fedoraproject.org> - 0.1.6-0.1
- initial spec