Skip to content

Instantly share code, notes, and snippets.

@lebedov
Created January 3, 2012 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lebedov/1556606 to your computer and use it in GitHub Desktop.
Save lebedov/1556606 to your computer and use it in GitHub Desktop.
RPM SPEC file for packaging CULA Dense
# RPM SPEC file for packaging CULA Dense for Mandriva Linux.
%bcond_with full
%if %{with full}
%define name cula_dense
%else
%define name cula_dense_free
%endif
%define version R14
%define release %mkrel 1
%define old_major 1
%define old_libname %mklibname %{name} %{old_major}
%define major 4
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d
%define nvidia_driver_ver 285.05.32
%define cuda_ver 4.0.17
Summary: GPU-accelerated LAPACK for dense linear algebra
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}_%{version}-linux32.run
Source1: %{name}_%{version}-linux64.run
License: Restricted
Group: Sciences/Mathematics
Url: http://www.culatools.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
CULA is a set of GPU-accelerated linear algebra libraries utilizing
the NVIDIA CUDA parallel computing architecture to dramatically
improve the computation speed of sophisticated mathematics.
CULA Dense provides accelerated implementations of the most popular
and essential routines for dense linear algebra in a prepackaged
library. If you are already using LAPACK or BLAS in your existing
codes, you can even use the library to get acceleration with
absolutely no changes to your source code.
%package -n %{libname}
Summary: GPU-accelerated LAPACK libraries for dense linear algebra
Group: System/Libraries
Requires: nvidia-cuda-toolkit
Requires: nvidia >= %{nvidia_driver_ver}
Obsoletes: %{old_libname}
Obsoletes: %{libname} <= 2.1
%define _requires_exceptions libcublas.so.%{major}
%define _requires_exceptions libcudart.so.%{major}
%description -n %{libname}
CULA is a set of GPU-accelerated linear algebra libraries utilizing
the NVIDIA CUDA parallel computing architecture to dramatically
improve the computation speed of sophisticated mathematics.
CULA Dense provides accelerated implementations of the most popular
and essential routines for dense linear algebra in a prepackaged
library. If you are already using LAPACK or BLAS in your existing
codes, you can even use the library to get acceleration with
absolutely no changes to your source code.
This package contains the shared libraries needed to run programs
written to use CULA Dense.
%package -n %{develname}
Summary: GPU-accelerated LAPACK development files for dense linear algebra
Group: System/C
Provides: %{name}-devel = %{version}-%{release}
Requires: %{libname} = %{version}-%{release}
Requires: nvidia-cuda-toolkit-devel
Obsoletes: %{develname} <= 2.1
%description -n %{develname}
CULA is a set of GPU-accelerated linear algebra libraries utilizing
the NVIDIA CUDA parallel computing architecture to dramatically
improve the computation speed of sophisticated mathematics.
CULA Dense provides accelerated implementations of the most popular
and essential routines for dense linear algebra in a prepackaged
library. If you are already using LAPACK or BLAS in your existing
codes, you can even use the library to get acceleration with
absolutely no changes to your source code.
This package contains the header files needed to develop programs that
use CULA Dense.
%prep
%setup -q -T -c %{name}-%{version}
%install
%__rm -rf %{buildroot}
%__install -d -m 755 %{buildroot}%{_usr}
%ifarch %ix86
bash %SOURCE0 --tar xf -C %{buildroot}%{_usr}
%else
bash %SOURCE1 --tar xf -C %{buildroot}%{_usr}
%__rm -rf %{buildroot}%{_usr}/lib
%endif
%__rm -f %{buildroot}%{_usr}/installcula.sh
%__rm -rf %{buildroot}%{_usr}/interfaces/
%__mv %{buildroot}%{_usr}/doc %{buildroot}%{_usr}/examples .
%__mkdir -p %{buildroot}%{_libdir}/%{name}
%__mv -f %{buildroot}%{_libdir}/*.* %{buildroot}%{_libdir}/%{name}
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
/bin/echo "%{_libdir}/%{name}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%clean
%__rm -rf %{buildroot}
%files -n %{libname}
%defattr(-,root,root)
%config(noreplace) %_sysconfdir/ld.so.conf.d/%{name}-%{_arch}.conf
%_libdir/%{name}/l*.so*
%files -n %{develname}
%doc doc/* examples
%_includedir/*
%_usr/src/interfaces/fortran/cula.F90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment