File meep.spec of Package meep
#
# spec file for package meep
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: meep
Version: 1.2.1
Release: 0
%define somajor 7
Summary: FDTD finite-difference time-domain solver
License: GPL-2.0+
Group: Productivity/Scientific/Electronics
Url: http://ab-initio.mit.edu/wiki/index.php/Meep
Source0: http://ab-initio.mit.edu/meep/meep-%{version}.tar.gz
# PATCH-FIX-UPSTREAM meep_change_protos_with_harminv_complex.patch -- https://github.com/stevengj/meep/issues/13
Patch1: meep_change_protos_with_harminv_complex.patch
BuildRequires: binutils
BuildRequires: blas-devel
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: gmp-devel
BuildRequires: gsl-devel
BuildRequires: guile-devel
BuildRequires: harminv-devel
BuildRequires: hdf5-devel
BuildRequires: lapack-devel
BuildRequires: latex2html
BuildRequires: libctl-devel
BuildRequires: pkgconfig
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Meep (or MEEP) is a free finite-difference time-domain (FDTD)
simulation software package developed at MIT to model electromagnetic
systems.
%package -n lib%{name}%{somajor}
Summary: FDTD finite-difference time-domain solver library
Group: System/Libraries
# Avoid unresolvable errors from multiple providers
Requires: libhdf5
%description -n lib%{name}%{somajor}
Meep (or MEEP) is a free finite-difference time-domain (FDTD)
simulation software package developed at MIT to model electromagnetic
systems.
%package devel
Summary: Libraries and header files for meep library
Group: Development/Libraries/Other
Requires: lib%{name}%{somajor} = %{version}
%description devel
Meep (or MEEP) is a free finite-difference time-domain (FDTD)
simulation software package developed at MIT to model electromagnetic
systems.
This package contains libraries and header files for developing
applications that use meep.
%prep
%setup -q
%patch1 -p1
%build
export CFLAGS="%{optflags} -fPIC"
export CXXFLAGS="%{optflags} -fPIC"
export FFLAGS="%{optflags} -fPIC"
%configure --enable-shared --disable-static --enable-portable-binary
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%check
make check
%post -n lib%{name}%{somajor} -p /sbin/ldconfig
%postun -n lib%{name}%{somajor} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS
%{_bindir}/*
%{_datadir}/meep/
%files -n lib%{name}%{somajor}
%defattr(-,root,root)
%{_libdir}/libmeep.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/libmeep.so
%{_libdir}/pkgconfig/*
%{_includedir}/*
%changelog