%global srcname ufc %global majorver 2 %global minorver 0 %global pointver 5 Name: python-%{srcname} Version: %{majorver}.%{minorver}.%{pointver} Release: 0.3%{?dist} Summary: A unified framework for finite element assembly Group: Applications/Engineering # This code is public domain, however the file # src/utils/python/ufc_utils/build.py appears to be under GNU LGPL # Version 2.1. There is no license file included in the source. Bug # filed upstream to resolve these issues: # https://bugs.launchpad.net/bugs/994518 License: Public Domain and LGPLv2 URL: http://fenicsproject.org Source0: https://launchpad.net/%{srcname}/%{majorver}.%{minorver}.x/%{version}/+download/%{srcname}-%{version}.tar.gz # Allow building with CMake 2.6.x - needed for RHEL 6 # https://bugs.launchpad.net/bugs/994522 #Patch0: ufc-2.0.5-cmake26.patch # Fix location of installed Python modules # https://bugs.launchpad.net/ufc/+bug/994550 # Fixed: http://bazaar.launchpad.net/~ufc-core/ufc/2.0.x/revision/348 # Will be released in 2.0.6 and later Patch0: ufc-2.0.5-fix-python-module-install.patch # Except that patch doesn't quite fix it Patch1: ufc-2.0.5-really-fix-python-module-install.patch # Fix lib install path (required by pkg-config file) Patch2: ufc-2.0.5-fix-lib-path.patch BuildRoot: %{_tmppath}/%{srcname}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: swig %if (0%{?rhel} <= 6 && !0%{?fedora}) BuildRequires: cmake28 %else BuildRequires: cmake %endif BuildRequires: swig BuildRequires: boost-devel BuildRequires: python2-devel BuildRequires: ghostscript BuildRequires: tex(latex) %if (0%{?rhel} && 0%{?rhel} >= 7) || (0%{?fedora} && 0%{?fedora} >= 18) BuildRequires: texlive-collection-latexrecommended BuildRequires: texlive-collection-latexextra %endif %description UFC (Unified Form-assembly Code) is a unified framework for finite element assembly. More precisely, it defines a fixed interface for communicating low level routines (functions) for evaluating and assembling finite element variational forms. The UFC interface consists of a single header file ufc.h that specifies a C++ interface that must be implemented by code that complies with the UFC specification. %prep %setup -q -n %{srcname}-%{version} %patch2 -p0 -b .fix-lib-path %patch0 -p0 -b .fix-python-module-install %patch1 -p0 -b .really-fix-python-module-install %build %if (0%{?rhel} <= 6 && !0%{?fedora}) %cmake28 . %else %cmake . %endif make %{?_smp_mflags} # Build the documentation pushd doc/manual make final popd %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README AUTHORS TODO ChangeLog doc/manual/ufc-user-manual.pdf doc/sphinx %{_includedir}/ufc.h %{_libdir}/pkgconfig/ufc-1.pc %{python_sitelib}/ufc_utils %{python_sitearch}/ufc %{_datadir}/ufc %{_includedir}/swig/ufc.i %changelog * Thu Jan 24 2013 Jonathan G. Underwood - 2.0.5-0.3 - Fix texlive BuildRequires for Fedora >= 18 - Add needed BuildRequires for ghostscript (a2ps) - Fix BuildRequires for python2-devel * Mon Oct 1 2012 José Matos - 2.0.5-0.2 - Fix conditionals for Fedora - Fix path for pkgconfig file * Fri May 4 2012 Jonathan G. Underwood - 2.0.5-0.1 - Initial package