Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > e2984e171120fb3d621895569b6ea3cd > files > 2

ColPack-1.0.9-1.fc18.src.rpm

%global lc_name colpack

Name:		ColPack
Version:	1.0.9
Release:	1%{?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

%{?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

# This package is LGPL, only.  So let's get rid of the cluttering GPL-file.
mv -f COPYING.LESSER COPYING


%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


%clean
%{?el5:rm -rf %{buildroot}}


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%doc ChangeLog COPYING
%{_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
* Thu Sep 05 2013 Björn Esser <bjoern.esser@gmail.com> - 1.0.9-1
- Initial rpm release (#1004760)