rpms/libsvm/F-7 libsvm-2.84-4.patch, NONE, 1.1 libsvm.spec, 1.1, 1.2 libsvm-2.84-2.patch, 1.1, NONE
Ding-Yi Chen (dchen)
fedora-extras-commits at redhat.com
Thu Aug 30 06:31:38 UTC 2007
- Previous message (by thread): rpms/scim-array/devel .cvsignore, 1.2, 1.3 scim-array.spec, 1.1, 1.2 sources, 1.3, 1.4
- Next message (by thread): rpms/jd/devel .cvsignore, 1.139, 1.140 jd.spec, 1.163, 1.164 sources, 1.140, 1.141
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dchen
Update of /cvs/pkgs/rpms/libsvm/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24793
Modified Files:
libsvm.spec
Added Files:
libsvm-2.84-4.patch
Removed Files:
libsvm-2.84-2.patch
Log Message:
Replace libsvm-2.84-2.patch to libsvm-2.84-4.patch
libsvm-2.84-4.patch:
--- NEW FILE libsvm-2.84-4.patch ---
diff -up ./Makefile.orig ./Makefile
--- ./Makefile.orig 2007-08-30 15:29:42.000000000 +1000
+++ ./Makefile 2007-08-30 15:30:25.000000000 +1000
@@ -1,7 +1,31 @@
CXXC = g++
CFLAGS = -Wall -O3
+MAKE = make
-all: svm-train svm-predict svm-scale
+ifndef DESTDIR
+INSTDIR=/usr
+else
+INSTDIR=${DESTDIR}/usr
+endif
+
+export INSTDIR
+
+PROCESSOR=$(shell /bin/uname -p)
+ifeq "${PROCESSOR}" "x86_64"
+X86_64=64
+else
+X86_64=
+endif
+
+ifndef LIBDIR
+LIB_INSTDIR=${INSTDIR}/lib${X86_64}
+else
+LIB_INSTDIR=${INSTDIR}/..${LIBDIR}
+endif
+
+export LIB_INSTDIR
+
+all: svm-train svm-predict svm-scale svm-python
svm-predict: svm-predict.c svm.o
$(CXXC) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm
@@ -11,5 +35,45 @@ svm-scale: svm-scale.c
$(CXXC) $(CFLAGS) svm-scale.c -o svm-scale
svm.o: svm.cpp svm.h
$(CXXC) $(CFLAGS) -c svm.cpp
+svm-python:
+ ${MAKE} -C python
+
+install: all
+ mkdir -p ${INSTDIR}/bin
+ install -m 755 svm-train ${INSTDIR}/bin
+ install -m 755 svm-predict ${INSTDIR}/bin
+ install -m 755 svm-scale ${INSTDIR}/bin
+ mkdir -p ${LIB_INSTDIR}/libsvm
+# install package libsvm-devel
+ install -m 644 svm.o ${LIB_INSTDIR}/libsvm
+ mkdir -p ${INSTDIR}/include/libsvm
+ install -m 644 svm.h ${INSTDIR}/include/libsvm
+ mkdir -p ${INSTDIR}/share/libsvm/src
+ install -m 644 *.h ${INSTDIR}/share/libsvm/src
+ install -m 644 *.c ${INSTDIR}/share/libsvm/src
+ install -m 644 *.cpp ${INSTDIR}/share/libsvm/src
+ install -m 644 Makefile ${INSTDIR}/share/libsvm/src
+ cp -R java ${INSTDIR}/share/libsvm/src
+ cp -R svm-toy ${INSTDIR}/share/libsvm/src
+# cp -R tools ${INSTDIR}/share/libsvm/src
+# cp -R windows ${INSTDIR}/share/libsvm/src
+ mkdir -p ${INSTDIR}/share/libsvm/examples
+ install -m 644 heart_scale ${INSTDIR}/share/libsvm/examples
+# install package libsvm-python
+ ${MAKE} -C python install
+
+uninstall:
+ rm -f ${INSTDIR}/bin/svm-train
+ rm -f ${INSTDIR}/bin/svm-predict
+ rm -f ${INSTDIR}/bin/svm-scale
+ rm -fr ${INSTDIR}/libsvm/examples
+ rm -f ${INSTDIR}/include/libsvm/svm.h
+ rm -f ${LIB_INSTDIR}/libsvm/svm.o
+ rm -fr ${INSTDIR}/libsvm/src
+ rm -fr ${INSTDIR}/libsvm
+ ${MAKE} -C python uninstall
+
clean:
rm -f *~ svm.o svm-train svm-predict svm-scale
+ ${MAKE} -C python clean
+
diff -up ./python/Makefile.orig ./python/Makefile
--- ./python/Makefile.orig 2007-08-30 15:29:49.000000000 +1000
+++ ./python/Makefile 2007-08-30 16:03:46.000000000 +1000
@@ -2,7 +2,14 @@ CC = g++
SWIG ?= swig
#Windows: see ../README ../Makefile.win
-PYTHON_INCLUDEDIR ?= /usr/include/python2.4
+PYTHON_TEMP:=${shell mktemp}
+PYTHON_VERSION:=${shell python -V 2> ${PYTHON_TEMP} ; cat ${PYTHON_TEMP} | awk 'BEGIN {FS= "[ .]"} {printf("%s.%s",$$2,$$3)}'; rm -f ${PYTHON_TEMP}}
+ifndef PYTHON_INCLUDEDIR
+
+PYTHON_INCLUDEDIR?= /usr/include/python${PYTHON_VERSION}
+
+endif
+PYTHON_TARGETDIR=${LIB_INSTDIR}/python${PYTHON_VERSION}/site-packages/libsvm
CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I..
LDFLAGS = -shared
@@ -28,3 +35,19 @@ clean:
moreclean: clean
rm -f svmc_wrap.c
+
+install: all
+ mkdir -p ${PYTHON_TARGETDIR}
+ install -m 755 cross_validation.py ${PYTHON_TARGETDIR}
+ install -m 644 svm.py ${PYTHON_TARGETDIR}
+ install -m 755 svm_test.py ${PYTHON_TARGETDIR}
+ install -m 755 test_cross_validation.py ${PYTHON_TARGETDIR}
+ install -m 644 *.i ${PYTHON_TARGETDIR}
+ install -m 755 *.so ${PYTHON_TARGETDIR}
+ install -m 755 ../tools/*.py ${PYTHON_TARGETDIR}
+
+uninstall:
+ rm -fr ${LIBDIR}/python${PYTHON_VERSION}/site-packages/libsvm
+
+
+
diff -up ./tools/grid.py.orig ./tools/grid.py
--- ./tools/grid.py.orig 2007-08-30 15:30:17.000000000 +1000
+++ ./tools/grid.py 2007-08-30 15:30:25.000000000 +1000
@@ -11,7 +11,7 @@ from string import find, split, join, at
is_win32 = (sys.platform == 'win32')
if not is_win32:
- svmtrain_exe = "../svm-train"
+ svmtrain_exe = "/usr/bin/svm-train"
gnuplot_exe = "/usr/bin/gnuplot"
else:
# example for windows
diff -up ./tools/easy.py.orig ./tools/easy.py
--- ./tools/easy.py.orig 2007-08-30 15:30:04.000000000 +1000
+++ ./tools/easy.py 2007-08-30 15:30:25.000000000 +1000
@@ -11,10 +11,10 @@ if len(sys.argv) <= 1:
is_win32 = (sys.platform == 'win32')
if not is_win32:
- svmscale_exe = "../svm-scale"
- svmtrain_exe = "../svm-train"
- svmpredict_exe = "../svm-predict"
- grid_py = "./grid.py"
+ svmscale_exe = "/usr/bin/svm-scale"
+ svmtrain_exe = "/usr/bin/svm-train"
+ svmpredict_exe = "/usr/bin/svm-predict"
+ grid_py = sys.argv[0].replace("easy.py","grid.py")
gnuplot_exe = "/usr/bin/gnuplot"
else:
# example for windows
Index: libsvm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libsvm/F-7/libsvm.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- libsvm.spec 29 Aug 2007 23:37:11 -0000 1.1
+++ libsvm.spec 30 Aug 2007 06:31:05 -0000 1.2
@@ -1,6 +1,6 @@
Name: libsvm
Version: 2.84
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A Library for Support Vector Machines
Group: Development/Libraries
@@ -10,7 +10,7 @@
#Source0: http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/%{name}+tar.gz
Source1: ChangeLog
#Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log
-Patch0: libsvm-2.84-2.patch
+Patch0: libsvm-2.84-4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glibc-devel dos2unix
@@ -23,27 +23,26 @@
estimation (one-class SVM ). It supports multi-class classification.
%package devel
-Summary: A Library for Support Vector Machines
+Summary: Header file, object file, and source files of libsvm in C and Java.
Group: Development/Libraries
BuildRequires: glibc-devel
Requires: glibc
Requires: %{name} = %{version}-%{release}
%description devel
-The libsvm-devel package includes the header file, object file, and
-soucre in C and Java.
+Header file, object file, and source files of libsvm in C and Java.
Install this package if you want to develop programs with libsvm.
%package python
-Summary: A Library for Support Vector Machines
+Summary: Python tools and interfaces for libsvm.
Group: Development/Libraries
BuildRequires: python >= 2.4 python-devel >= 2.4 gawk
Requires: python >= 2.4
Requires: %{name} = %{version}-%{release}
%description python
-The libsvm-python provides tools and interface written in python,
-as well as source code. Install this package if you want to develop
+Python tools and interfaces for libsvm.
+Install this package if you want to develop
programs with libsvm in Python.
%prep
@@ -89,6 +88,10 @@
%changelog
+* Thu Aug 30 2007 Ding-Yi Chen <dchen at redhat.com> - 2.84-4
+- Refined description.
+- Fix the /tmp/python.ver problem
+
* Mon Aug 27 2007 Ding-Yi Chen <dchen at redhat.com> - 2.84-3
- Fix dependency problem
--- libsvm-2.84-2.patch DELETED ---
- Previous message (by thread): rpms/scim-array/devel .cvsignore, 1.2, 1.3 scim-array.spec, 1.1, 1.2 sources, 1.3, 1.4
- Next message (by thread): rpms/jd/devel .cvsignore, 1.139, 1.140 jd.spec, 1.163, 1.164 sources, 1.140, 1.141
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list