Name: FoX Version: 4.1.2 Release: 1%{?dist} Summary: A Fortran XML Library License: zlib and BSD URL: http://www1.gly.bris.ac.uk/~walker/FoX/ Source0: http://www1.gly.bris.ac.uk/~walker/FoX/source/%{name}-%{version}.tar.gz Patch0: FoX-4.1.2-DESTDIR.patch Patch1: FoX-4.1.2-system-paths.patch Patch2: FoX-4.1.2-sharedlibs.patch Patch3: FoX-4.1.2-dompp.patch BuildRequires: gcc-gfortran %description FoX is an XML library written in Fortran 95. It allows software developers to read, write and modify XML documents from Fortran applications without the complications of dealing with multiple language development. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Development files for FoX %description devel Development files for FoX. %package static Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Static libraries for FoX %description static Static libraries for FoX. %prep %setup -q %patch0 -p1 -b .DESTDIR %patch1 -p1 -b .system %patch2 -p1 -b .shared # We need a variant "pretty-print" version of the dom library for exciting cp -a dom dompp sed -i "s/ 27293398$/ ibset(27293398,22)/" dompp/m_dom_dom.F90 sed -i "s|libFoX_dom|libFoX_dompp|g" dompp/makefile %patch3 -p1 -b .dompp %build export FCFLAGS="%{optflags} %{?_fmoddir: -I%_fmoddir} -fPIC" %configure make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} pushd %{buildroot}%{_libdir} for i in libFoX_common libFoX_dom libFoX_dompp libFoX_fsys libFoX_sax libFoX_utils libFoX_wcml libFoX_wkml libFoX_wxml; do ln -s $i.so.0.0.0 $i.so.0 ln -s $i.so.0.0.0 $i.so done chmod -x %{buildroot}%{_libdir}/*.a %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc README.FoX.txt %{!?_licensedir:%global license %%doc} %license LICENSE %{_libdir}/*.so.* %files devel %{_bindir}/FoX-config %{_includedir}/FoX/ %{_libdir}/*.so %files static %{_libdir}/*.a %changelog * Thu May 29 2014 Tom Callaway - 4.1.2-1 - initial package