%global lc_name colpack Name: ColPack Version: 1.0.9 Release: 3%{?dist} Summary: Algorithms for specialized vertex coloring problems %{?el5:Group: Applications/Engineering} License: LGPLv3+ URL: http://cscapes.cs.purdue.edu Source0: %{url}/download/%{name}/%{name}-%{version}.tar.gz # Patch has been emailed to upstream. Patch0: ColPack-1.0.9_fix_gcc49_omp.patch %{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} BuildRequires: chrpath Provides: %{lc_name} = %{version}-%{release} Provides: %{lc_name}%{?_isa} = %{version}-%{release} %description ColPack is a package comprising of implementation of algorithms for specialized vertex coloring problems that arise in sparse derivative computation. It is written in an object-oriented fashion heavily using the Standard Template Library (STL). It is designed to be simple, modular, extendable and efficient. %{?!el5:This build has openMP-support enabled.} %package cli Summary: CLI-tool for %{name} %{?el5:Group: Applications/Engineering} Requires: %{name}%{?_isa} = %{version}-%{release} Provides: %{lc_name}-cli = %{version}-%{release} Provides: %{lc_name}-cli%{?_isa} = %{version}-%{release} %description cli This package contains a cli-tool for %{name} %package devel Summary: Development files for %{name} %{?el5:Group: Development/Libraries} Requires: %{name}%{?_isa} = %{version}-%{release} Provides: %{lc_name}-devel = %{version}-%{release} Provides: %{lc_name}-devel%{?_isa} = %{version}-%{release} %description devel This package contains the development headers and library for %{name}. %package doc Summary: Documentation files for %{name} %{?el5:Group: Documentation} %{?!el5:BuildArch: noarch} Provides: %{lc_name}-doc = %{version}-%{release} %description doc This package contains the documentation files and some brief examples for %{name}. %prep %setup -q # Remove the pre-compiled binaries && backup-files. rm -rf progs find . -depth -type f -name '*~' -print0 | xargs -0 rm -f # Fix the permissions of the sources. find . -depth -type f -name '*' -print0 | xargs -0 chmod 0644 chmod 0755 configure # Apply patch. %patch0 -p1 -b.omp %build %configure \ %{?!el5:--enable-openmp} \ --disable-static make %{?_smp_mflags} %install %{?el5:rm -rf %{buildroot}} make install DESTDIR=%{buildroot} # We don't want those libtool dumplings and static libs. find %{buildroot} -depth -name '*.*a' -print0 | xargs -0 rm -rf # Move the cli-tool to %%{_bindir} mkdir -p %{buildroot}%{_bindir} mv -f `find %{buildroot} -depth -type f -name '%{name}'` %{buildroot}%{_bindir} # Kill rpath from binaries. chrpath --delete %{buildroot}%{_bindir}/%{name} %check make check %{?el5:%clean} %{?el5:rm -rf %{buildroot}} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc ChangeLog COPYING* README %{_libdir}/lib%{name}.so.* %files cli %{_bindir}/%{name} %files devel %{_includedir}/%{name} %{_libdir}/lib%{name}.so %files doc %doc AUTHORS ChangeLog COPYING* README SampleDrivers %changelog * Wed Jun 18 2014 Björn Esser <bjoern.esser@gmail.com> - 1.0.9-3 - added Patch0 to fix build with openMP on GCC >= 4.9 - restructured spec - preserve GPLv3-file * Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Sep 05 2013 Björn Esser <bjoern.esser@gmail.com> - 1.0.9-1 - Initial rpm release (#1004760)