%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} Summary: A library of high performance preconditioners Name: hypre Version: 2.4.0b Release: 1%{?dist} License: LGPLv2 Group: Development/Libraries URL: http://www.llnl.gov/casc/hypre/ Source: https://computation.llnl.gov/casc/hypre/download/hypre-2.4.0b.tar.gz Patch0: hypre-rpmbuild.patch Patch1: hypre-babel_numarray.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: mpich2-devel python-numarray python-devel libxml2-devel Requires: environment-modules %description Hypre is a library of high performance preconditioners that features parallel multigrid methods for both structured and unstructured grid problems. %package devel Summary: Development files for hypre Group: Development/Libraries Provides: %{name}-devel-static = %{version}-%{release} Requires: %{name} = %{version}-%{release} %description devel Contains development headers and libraries for hypre %prep %setup -q %patch0 -p0 -b .build %patch1 -p0 -b .num cd src %configure --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name} \ --enable-shared --enable-python=python \ --enable-java --with-LDFLAGS="" \ --with-fei --with-babel --with-superlu --with-mli \ JNI_INCLUDES="-I%{_sysconfdir}/alternatives/java_sdk/include" \ FCFLAGS="%{optflags}" cd ../ %build cd src make PYTHON_SITEARCH=%{python_sitearch} DESTDIR=%{buildroot} %{?_smp_mflags} %install rm -rf %{buildroot} cd src make PYTHON_SITEARCH=%{python_sitearch} DESTDIR=%{buildroot} install mkdir -p %{buildroot}/etc/ld.so.conf.d echo "%{_libdir}/hypre" > %{buildroot}/etc/ld.so.conf.d/hypre-%{_arch}.conf chmod -x %{buildroot}/%{_includedir}/hypre/LLNL_FEI*.h find %{buildroot} -type f -name "*.la*" -exec rm -f {} ';' %clean rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) %doc CHANGELOG COPYING.LESSER COPYRIGHT README %{_libdir}/%{name}/*.so %dir %{python_sitearch}/bHYPRE %{python_sitearch}/bHYPRE/* %{python_sitearch}/babel* %doc docs/HYPRE_usr_manual.pdf %config(noreplace) /etc/ld.so.conf.d/hypre-%{_arch}.conf %files devel %defattr(-,root,root,-) %doc docs/*HYPRE_ref_manual.pdf %{_includedir}/hypre/ %{_includedir}/python2.6/babel/ %{_libdir}/%{name}/*.a %changelog * Tue Aug 11 2009 Deji Akingunola - 2.4.0b-1 - Initial rpm package