File libsvm.spec of Package libsvm

Name: libsvm
Version: 2.91
Release: 1

Summary: A Library for Support Vector Machines
License: LGPL
Group: Productivity/Scientific/Math
Url: http://www.csie.ntu.edu.tw/~cjlin/libsvm

Source: %{name}-%{version}.tar.bz2
Prefix: %_prefix
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++

%description
LIBSVM is an integrated software for support vector classification,
(C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution
estimation (one-class SVM). It supports multi-class classification.

%prep
%setup

%build
make clean
make

%install

mkdir -p $RPM_BUILD_ROOT%{prefix}/bin
cp svm-scale $RPM_BUILD_ROOT%{prefix}/bin/svm-scale
cp svm-predict $RPM_BUILD_ROOT%{prefix}/bin/svm-predict
cp svm-train $RPM_BUILD_ROOT%{prefix}/bin/svm-train

# files
cd $RPM_BUILD_ROOT
find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' > $RPM_BUILD_DIR/file.list


%clean
rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
rm $RPM_BUILD_DIR/file.list

%files -f ../file.list