Group :: Development/Other
RPM: libsvm
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Name: libsvm
Version: 2.8.2
Release: alt1
Summary: A library for Support Vector Machines (pattern recognition etc.)
Group: Development/Other
License: BSD
Url: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
Source: libsvm-2.82.tar.bz2
# Added by buildreq2 on Mon May 15 2006
BuildRequires: gcc-c++ gtk+-devel
%package devel
Summary: A library for Support Vector Machines, header files
Group: Development/Other
Requires: %name = %version-%release
%package -n svm-toy
Summary: A library for Support Vector Machines, GTK+ demo
Group: Development/Other
Requires: %name = %version-%release
Provides: %name-toy = %version
Obsoletes: %name-toy < %version
%description
SVM (Support Vector Machines) is a powerful learning machine algorithm
for classification an regression problems.
Libsvm is a simple, easy-to-use, and efficient software for SVM
classification and regression. It can solve C-SVM classification,
nu-SVM classification, one-class-SVM, epsilon-SVM regression, and
nu-SVM regression. It also provides an automatic model selection
tool for C-SVM classification.
%description devel
SVM (Support Vector Machines) is a powerful learning machine algorithm
for classification an regression problems.
This package contains header files for development.
%description -n svm-toy
SVM (Support Vector Machines) is a powerful learning machine algorithm
for classification an regression problems.
This package contains a GTK+ demo.
%prep
%setup -q -n libsvm-2.82
%build
%define soname libsvm.so.1
echo '{ global: svm_*; local: *; };' >%name.map
g++ -shared %optflags %optflags_shared svm.cpp -lm \
-o %soname -Wl,-soname=%soname -Wl,--version-script=%name.map -Wl,-z,defs
ln -s %soname %name.so
for f in svm-predict svm-scale svm-train; do
gcc -o $f %optflags $f.c -L. -lsvm
done
cd svm-toy/gtk
gcc -o svm-toy %optflags `gtk-config --cflags` interface.c callbacks.cpp main.c \
-L../.. -lsvm `gtk-config --libs`
%install
mkdir -p %buildroot{%_bindir,%_libdir,%_includedir}
cp -av svm-predict svm-scale svm-train svm-toy/gtk/svm-toy %buildroot%_bindir/
cp -av libsvm.so* %buildroot%_libdir/
cp -av svm.h %buildroot%_includedir/
ln -s svm.h %buildroot%_includedir/libsvm.h
%files
%_libdir/*.so.*
%_bindir/svm-predict
%_bindir/svm-scale
%_bindir/svm-train
%doc FAQ.html README COPYRIGHT heart_scale
%files devel
%_libdir/*.so
%_includedir/*.h
%files -n svm-toy
%_bindir/svm-toy
%changelog
…
Full changelog you can see here
Version: 2.8.2
Release: alt1
Summary: A library for Support Vector Machines (pattern recognition etc.)
Group: Development/Other
License: BSD
Url: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
Source: libsvm-2.82.tar.bz2
# Added by buildreq2 on Mon May 15 2006
BuildRequires: gcc-c++ gtk+-devel
%package devel
Summary: A library for Support Vector Machines, header files
Group: Development/Other
Requires: %name = %version-%release
%package -n svm-toy
Summary: A library for Support Vector Machines, GTK+ demo
Group: Development/Other
Requires: %name = %version-%release
Provides: %name-toy = %version
Obsoletes: %name-toy < %version
%description
SVM (Support Vector Machines) is a powerful learning machine algorithm
for classification an regression problems.
Libsvm is a simple, easy-to-use, and efficient software for SVM
classification and regression. It can solve C-SVM classification,
nu-SVM classification, one-class-SVM, epsilon-SVM regression, and
nu-SVM regression. It also provides an automatic model selection
tool for C-SVM classification.
%description devel
SVM (Support Vector Machines) is a powerful learning machine algorithm
for classification an regression problems.
This package contains header files for development.
%description -n svm-toy
SVM (Support Vector Machines) is a powerful learning machine algorithm
for classification an regression problems.
This package contains a GTK+ demo.
%prep
%setup -q -n libsvm-2.82
%build
%define soname libsvm.so.1
echo '{ global: svm_*; local: *; };' >%name.map
g++ -shared %optflags %optflags_shared svm.cpp -lm \
-o %soname -Wl,-soname=%soname -Wl,--version-script=%name.map -Wl,-z,defs
ln -s %soname %name.so
for f in svm-predict svm-scale svm-train; do
gcc -o $f %optflags $f.c -L. -lsvm
done
cd svm-toy/gtk
gcc -o svm-toy %optflags `gtk-config --cflags` interface.c callbacks.cpp main.c \
-L../.. -lsvm `gtk-config --libs`
%install
mkdir -p %buildroot{%_bindir,%_libdir,%_includedir}
cp -av svm-predict svm-scale svm-train svm-toy/gtk/svm-toy %buildroot%_bindir/
cp -av libsvm.so* %buildroot%_libdir/
cp -av svm.h %buildroot%_includedir/
ln -s svm.h %buildroot%_includedir/libsvm.h
%files
%_libdir/*.so.*
%_bindir/svm-predict
%_bindir/svm-scale
%_bindir/svm-train
%doc FAQ.html README COPYRIGHT heart_scale
%files devel
%_libdir/*.so
%_includedir/*.h
%files -n svm-toy
%_bindir/svm-toy
%changelog
…
Full changelog you can see here