From e0682851cf01d6ecde79284211fbbe3b36f9823d Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Tue, 8 Nov 2011 16:53:53 +1000 Subject: [PATCH 01/16] Upstream update:3.11 --- .gitignore | 1 + libsvm-2.91.patch | 379 ------------------ ...javaDir.patch => libsvm-3.11.javaDir.patch | 0 ...ain.patch => libsvm-3.11.packageMain.patch | 13 +- ...onDir.patch => libsvm-3.11.pythonDir.patch | 12 +- ...svm-toy.patch => libsvm-3.11.svm-toy.patch | 53 +-- ...olsDir.patch => libsvm-3.11.toolsDir.patch | 0 libsvm.spec | 12 +- log | 15 +- sources | 2 +- 10 files changed, 61 insertions(+), 426 deletions(-) delete mode 100644 libsvm-2.91.patch rename libsvm-3.1.javaDir.patch => libsvm-3.11.javaDir.patch (100%) rename libsvm-3.1.packageMain.patch => libsvm-3.11.packageMain.patch (93%) rename libsvm-3.1.pythonDir.patch => libsvm-3.11.pythonDir.patch (78%) rename libsvm-3.1.svm-toy.patch => libsvm-3.11.svm-toy.patch (50%) rename libsvm-3.1.toolsDir.patch => libsvm-3.11.toolsDir.patch (100%) diff --git a/.gitignore b/.gitignore index 2068ba3..4373f69 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ libsvm-2.91.tar.gz /guide.pdf /libsvm-3.0.tar.gz /libsvm-3.1.tar.gz +/libsvm-3.11.tar.gz diff --git a/libsvm-2.91.patch b/libsvm-2.91.patch deleted file mode 100644 index 9867ae9..0000000 --- a/libsvm-2.91.patch +++ /dev/null @@ -1,379 +0,0 @@ -diff -up ./java/Makefile.orig ./java/Makefile ---- ./java/Makefile.orig 2009-02-18 10:41:04.000000000 +1000 -+++ ./java/Makefile 2010-04-07 11:28:04.000000000 +1000 -@@ -4,13 +4,21 @@ FILES = libsvm/svm.class libsvm/svm_mode - libsvm/svm_print_interface.class \ - svm_train.class svm_predict.class svm_toy.class svm_scale.class - -+JAVA_DOC_DIR=${INSTDIR}/share/javadoc/libsvm-${LIBSVM_VER} -+CLASSPATH = . - #JAVAC = jikes --JAVAC_FLAGS = -target 1.5 -source 1.5 -+JAVAC_FLAGS = -target 1.5 -source 1.5 -classpath ${CLASSPATH} -+ifndef JAVAC - JAVAC = javac -+endif - # JAVAC_FLAGS = - -+ifndef JAR -+JAR=jar -+endif -+ - all: $(FILES) -- jar cvf libsvm.jar *.class libsvm/*.class -+ ${JAR} cvf libsvm.jar *.class libsvm/*.class - - .java.class: - $(JAVAC) $(JAVAC_FLAGS) $< -@@ -18,8 +26,23 @@ all: $(FILES) - libsvm/svm.java: libsvm/svm.m4 - m4 libsvm/svm.m4 > libsvm/svm.java - -+javadoc: docs/index.html -+ -+docs/index.html: $(FILES) -+ javadoc -d docs *.java libsvm/*.java -+ -+install: -+ mkdir -p ${JAVA_TARGET_DIR} -+ install -m 644 libsvm.jar ${JAVA_TARGET_DIR} -+# mkdir -p ${JAVA_DOC_DIR} -+# cd docs; cp -R * ${JAVA_DOC_DIR} -+uninstall: -+ rm -fr ${JAVA_TARGETDIR} -+# rm -fr ${JAVA_DOC_DIR} -+ - clean: - rm -f libsvm/*.class *.class *.jar libsvm/*~ *~ libsvm/svm.java -+ rm -rf docs - - dist: clean all - rm *.class libsvm/*.class -diff -up ./java/test_applet.html.orig ./java/test_applet.html ---- ./java/test_applet.html.orig 2003-07-12 14:07:32.000000000 +1000 -+++ ./java/test_applet.html 2010-04-07 11:28:04.000000000 +1000 -@@ -1 +1,3 @@ -- -+ -+ -+ -diff -up ./Makefile.orig ./Makefile ---- ./Makefile.orig 2010-03-19 00:54:02.000000000 +1000 -+++ ./Makefile 2010-04-07 11:28:04.000000000 +1000 -@@ -1,11 +1,39 @@ - CXX ?= g++ --CFLAGS = -Wall -Wconversion -O3 -fPIC -+CFLAGS = ${RPM_CFLAGS} -Wall -Wconversion -O3 -fPIC - SHVER = 1 -+MAKE = make -+DOT_LIBS=.libs -+LIBS= -L${DOT_LIBS} -lsvm -+export LIBSVM_VER -+ -+ifndef DESTDIR -+INSTDIR=/usr -+else -+INSTDIR=${DESTDIR}/usr -+endif - --all: svm-train svm-predict svm-scale -+export INSTDIR -+ -+IS_64=$(shell /bin/uname -i | awk '/64/ {print 64}') -+ -+ifndef LIBDIR -+LIB_INSTDIR=${INSTDIR}/lib${IS_64} -+else -+LIB_INSTDIR=${INSTDIR}/..${LIBDIR} -+endif -+ -+ifndef LIBDIR -+LIBDIR=/usr/lib${IS_64} -+endif -+ -+export LIBDIR -+export LIB_INSTDIR -+ -+all: lib svm-train svm-predict svm-scale svm-python svm-java svm-toy-gtk svm-toy-qt - - lib: svm.o -- $(CXX) -shared -dynamiclib svm.o -o libsvm.so.$(SHVER) -+ $(CXX) -shared -Wl,-soname,libsvm.so.$(SHVER) svm.o -o libsvm.so.$(SHVER) -+ ln -sf libsvm.so.$(SHVER) libsvm.so - - svm-predict: svm-predict.c svm.o - $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm -@@ -16,4 +44,65 @@ svm-scale: svm-scale.c - svm.o: svm.cpp svm.h - $(CXX) $(CFLAGS) -c svm.cpp - clean: -- rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER) -+ rm -f *~ svm.o svm-train svm-predict svm-scale svm-toy/gtk/svm-toy-gtk svm-toy/qt/svm-toy-qt -+ ${MAKE} -C python clean -+ ${MAKE} -C java clean -+svm-python: -+ ${MAKE} -C python -+ -+svm-java: -+ifneq ("${NO_JAVA}","NO_JAVA") -+ ${MAKE} -C java -+endif -+svm-toy-gtk: -+ ${MAKE} -C svm-toy/gtk -+ -+svm-toy-qt: -+ ${MAKE} -C svm-toy/qt -+ -+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} -+ install -m 755 libsvm.so.$(SHVER) ${LIB_INSTDIR} -+# install package libsvm-devel -+ mkdir -p ${INSTDIR}/include/libsvm -+ install -m 644 svm.h ${INSTDIR}/include/libsvm -+ mkdir -p ${INSTDIR}/share/libsvm/src/java/libsvm -+ 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 -+ifneq ("${NO_JAVA}","NO_JAVA") -+ install -m 644 java/*.java ${INSTDIR}/share/libsvm/src/java -+ install -m 644 java/Makefile ${INSTDIR}/share/libsvm/src/java -+ install -m 644 java/libsvm/*.java ${INSTDIR}/share/libsvm/src/java/libsvm -+ install -m 644 java/libsvm/*.m4 ${INSTDIR}/share/libsvm/src/java/libsvm -+# install package libsvm-java -+ ${MAKE} -C java install -+endif -+# install package libsvm-python -+ ${MAKE} -C python install -+# install package svm-toy -+ install -m 755 svm-toy/gtk/svm-toy-gtk ${INSTDIR}/bin -+ install -m 755 svm-toy/qt/svm-toy-qt ${INSTDIR}/bin -+# install examples -+ mkdir -p ${INSTDIR}/share/libsvm/examples -+ install -m 644 heart_scale ${INSTDIR}/share/libsvm/examples -+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 -+ifneq ("${NO_JAVA}","NO_JAVA") -+ ${MAKE} -C java uninstall -+endif -+ rm -f ${INSTDIR}/bin/svm-toy-gtk -+ rm -f ${INSTDIR}/bin/svm-toy-qt -diff -up ./python/Makefile.orig ./python/Makefile ---- ./python/Makefile.orig 2010-03-19 01:57:28.000000000 +1000 -+++ ./python/Makefile 2010-04-07 11:28:04.000000000 +1000 -@@ -1,4 +1,15 @@ --all = lib -+PYTHON_PATH ?= python${PYTHON_VERSION}/site-packages/libsvm -+PYTHON_TARGETDIR=${LIB_INSTDIR}/${PYTHON_PATH} -+ -+all: lib - - lib: ../svm.cpp ../svm.h - cd ..; make lib; cd - -+ -+install: all -+ mkdir -p ${PYTHON_TARGETDIR} -+ install -m 755 *.py ${PYTHON_TARGETDIR} -+ install -m 755 ../tools/*.py ${PYTHON_TARGETDIR} -+ -+uninstall: -+ rm -fr ${LIBDIR}/${PYTHON_PATH} -diff -up ./python_old/Makefile.orig ./python_old/Makefile ---- ./python_old/Makefile.orig 2009-09-16 23:37:45.000000000 +1000 -+++ ./python_old/Makefile 2010-04-07 11:28:04.000000000 +1000 -@@ -2,9 +2,11 @@ CXX ?= g++ - SWIG ?= swig - - #Windows: see ../README ../Makefile.win --PYTHON_INCLUDEDIR ?= /usr/include/python2.5 -+PYTHON_INCLUDEDIR ?= /usr/include/python${PYTHON_VERSION} -+PYTHON_TARGETDIR=${LIB_INSTDIR}/python${PYTHON_VERSION}/site-packages/libsvm - - CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I.. -+ - LDFLAGS = -shared - # Mac OS - # LDFLAGS = -framework Python -bundle -@@ -28,3 +30,16 @@ clean: - - cleaner: 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 ./svm-toy/gtk/callbacks.cpp.orig ./svm-toy/gtk/callbacks.cpp ---- ./svm-toy/gtk/callbacks.cpp.orig 2006-03-04 17:40:12.000000000 +1000 -+++ ./svm-toy/gtk/callbacks.cpp 2010-04-07 11:28:04.000000000 +1000 -@@ -2,6 +2,7 @@ - #include - #include - #include -+#include - #include "callbacks.h" - #include "interface.h" - #include "../../svm.h" -diff -up ./svm-toy/gtk/Makefile.orig ./svm-toy/gtk/Makefile ---- ./svm-toy/gtk/Makefile.orig 2007-10-14 16:29:12.000000000 +1000 -+++ ./svm-toy/gtk/Makefile 2010-04-07 11:28:04.000000000 +1000 -@@ -2,21 +2,27 @@ CC? = gcc - CXX? = g++ - CFLAGS = -Wall -O3 -g `gtk-config --cflags` - LIBS = `gtk-config --libs` -+COPT = -Wall -O3 -g `pkg-config --cflags --libs gtk+-2.0` -+LOCAL_LIBDIR=../../ -+LIBS= -L${LOCAL_LIBDIR} -lsvm - --svm-toy: main.o interface.o callbacks.o ../../svm.o -- $(CXX) $(CFLAGS) main.o interface.o callbacks.o ../../svm.o -o svm-toy $(LIBS) -+ -+all: svm-toy-gtk -+ -+svm-toy-gtk: main.o interface.o callbacks.o -+ $(CXX) $(COPT) main.o interface.o callbacks.o ${LIBS} -o svm-toy-gtk - - main.o: main.c -- $(CC) $(CFLAGS) -c main.c -+ $(CC) $(COPT) -c main.c - - interface.o: interface.c interface.h -- $(CC) $(CFLAGS) -c interface.c -+ $(CC) $(COPT) -c interface.c - - callbacks.o: callbacks.cpp callbacks.h -- $(CXX) $(CFLAGS) -c callbacks.cpp -+ $(CXX) $(COPT) -c callbacks.cpp - --../../svm.o: -- cd ../..; make svm.o -+#../../svm.o: -+# cd ../..; make svm.o - - clean: -- rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ../../svm.o -+ rm -f *~ callbacks.o svm-toy-gtk main.o interface.o callbacks.o -diff -up ./svm-toy/qt/Makefile.orig ./svm-toy/qt/Makefile ---- ./svm-toy/qt/Makefile.orig 2008-12-19 16:42:05.000000000 +1000 -+++ ./svm-toy/qt/Makefile 2010-04-07 11:28:04.000000000 +1000 -@@ -1,17 +1,21 @@ - CXX? = g++ --CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -lQtGui -+CFLAGS = -Wall -O3 -+FLAGS:=${CFLAGS} `pkg-config --cflags --libs QtGui` -+LOCAL_LIBDIR=../../ -+LIBS= -L${LOCAL_LIBDIR} -lsvm -+ - INCLUDE = /usr/include/qt4 --MOC = /usr/bin/moc-qt4 - --svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o -- $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy -+MOC=${MOC_PATH} -+ -+all: svm-toy-qt -+ -+svm-toy-qt: svm-toy.cpp svm-toy.moc -+ $(CXX) $(FLAGS) svm-toy.cpp ${LIBS} -o svm-toy-qt - - svm-toy.moc: svm-toy.cpp - $(MOC) svm-toy.cpp -o svm-toy.moc - --../../svm.o: -- cd ../..; make svm.o -- - clean: -- rm -f *~ svm-toy svm-toy.moc ../../svm.o -+ rm -f *~ svm-toy-qt svm-toy.moc ../../svm.o - -diff -up ./tools/easy.py.orig ./tools/easy.py ---- ./tools/easy.py.orig 2009-05-14 15:09:29.000000000 +1000 -+++ ./tools/easy.py 2010-04-07 11:28:04.000000000 +1000 -@@ -2,6 +2,7 @@ - - import sys - import os -+from distutils.sysconfig import get_python_lib - from subprocess import * - - if len(sys.argv) <= 1: -@@ -12,10 +13,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 = get_python_lib(1)+"/libsvm/grid.py" - gnuplot_exe = "/usr/bin/gnuplot" - else: - # example for windows -diff -up ./tools/grid.py.orig ./tools/grid.py ---- ./tools/grid.py.orig 2009-11-20 22:29:46.000000000 +1000 -+++ ./tools/grid.py 2010-04-07 14:14:21.000000000 +1000 -@@ -17,7 +17,7 @@ else: - - 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 -@@ -158,10 +158,10 @@ def redraw(db,best_param,tofile=False): - gnuplot.write(("set label \"C = %s gamma = %s\"" - " at screen 0.5,0.8 center\n" % (2**best_log2c, 2**best_log2g)).encode()) - gnuplot.write("splot \"-\" with lines\n".encode()) -- - - -- -+ -+ - db.sort(key = lambda x:(x[0], -x[1])) - - prevc = db[0][0] -@@ -222,9 +222,9 @@ class Worker(Thread): - if rate is None: raise "get no rate" - except: - # we failed, let others do that and we just quit -- -+ - traceback.print_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]) -- -+ - self.job_queue.put((cexp,gexp)) - print('worker %s quit.' % self.name) - break -@@ -331,7 +331,6 @@ def main(): - - result_file = open(out_filename, 'w') - -- - db = [] - best_rate = -1 - best_c1,best_g1 = None,None diff --git a/libsvm-3.1.javaDir.patch b/libsvm-3.11.javaDir.patch similarity index 100% rename from libsvm-3.1.javaDir.patch rename to libsvm-3.11.javaDir.patch diff --git a/libsvm-3.1.packageMain.patch b/libsvm-3.11.packageMain.patch similarity index 93% rename from libsvm-3.1.packageMain.patch rename to libsvm-3.11.packageMain.patch index 87209e9..5fbadbe 100644 --- a/libsvm-3.1.packageMain.patch +++ b/libsvm-3.11.packageMain.patch @@ -1,6 +1,6 @@ diff -up ./Makefile.packageMain ./Makefile ---- ./Makefile.packageMain 2010-09-12 22:11:10.000000000 +1000 -+++ ./Makefile 2011-06-14 17:00:32.774749405 +1000 +--- ./Makefile.packageMain 2011-06-26 05:55:06.000000000 +1000 ++++ ./Makefile 2011-11-08 09:42:13.106501233 +1000 @@ -1,11 +1,44 @@ CXX ?= g++ -CFLAGS = -Wall -Wconversion -O3 -fPIC @@ -10,7 +10,8 @@ diff -up ./Makefile.packageMain ./Makefile +DOT_LIBS=.libs +LIBS= -L${DOT_LIBS} -lsvm +export LIBSVM_VER -+ + +-all: svm-train svm-predict svm-scale +IS_64:=$(shell /bin/uname -i | awk '/64/ {print 64}') + +PREFIXDIR?= /usr @@ -40,12 +41,10 @@ diff -up ./Makefile.packageMain ./Makefile + +all: lib svm-train svm-predict svm-scale svm-python svm-java svm-toy-gtk svm-toy-qt --all: svm-train svm-predict svm-scale - lib: svm.o -- $(CXX) -shared -dynamiclib svm.o -o libsvm.so.$(SHVER) -+ $(CXX) -shared -Wl,-soname,libsvm.so.$(SHVER) svm.o -o libsvm.so.$(SHVER) + $(CXX) -shared -dynamiclib -Wl,-soname,libsvm.so.$(SHVER) svm.o -o libsvm.so.$(SHVER) + ln -sf libsvm.so.$(SHVER) libsvm.so ++ svm-predict: svm-predict.c svm.o $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm diff --git a/libsvm-3.1.pythonDir.patch b/libsvm-3.11.pythonDir.patch similarity index 78% rename from libsvm-3.1.pythonDir.patch rename to libsvm-3.11.pythonDir.patch index 8d8d7ec..ff0991d 100644 --- a/libsvm-3.1.pythonDir.patch +++ b/libsvm-3.11.pythonDir.patch @@ -1,18 +1,19 @@ diff -up ./python/Makefile.pythonDir ./python/Makefile ---- ./python/Makefile.pythonDir 2010-06-16 14:04:46.000000000 +1000 -+++ ./python/Makefile 2011-06-14 16:53:39.365997401 +1000 -@@ -1,4 +1,19 @@ --all = lib +--- ./python/Makefile.pythonDir 2011-05-10 09:35:15.000000000 +1000 ++++ ./python/Makefile 2011-11-08 09:49:54.280501207 +1000 +@@ -1,4 +1,20 @@ +PYTHONDIR_NAME ?= python${PYTHON_VERSION}/site-packages/libsvm +PYTHONDIR?=${LIBDIR}/${PYTHONDIR_NAME} +PYTHONDIR_INSTALL=${DESTDIR}/${PYTHONDIR} +SVM_TOOLS:= $(notdir $(wildcard ../tools/*.py)) ++ + all = lib -lib: +all: lib + +lib: ../svm.cpp ../svm.h - cd ..; make lib; cd - + make -C .. lib + +install: all + mkdir -p ${PYTHONDIR_INSTALL} @@ -22,4 +23,3 @@ diff -up ./python/Makefile.pythonDir ./python/Makefile + +uninstall: + rm -fr ${LIBDIR}/${PYTHON_PATH} $(addprefix ${BINDIR_INSTALL}/svm-,$(SVM_TOOLS)) -+ diff --git a/libsvm-3.1.svm-toy.patch b/libsvm-3.11.svm-toy.patch similarity index 50% rename from libsvm-3.1.svm-toy.patch rename to libsvm-3.11.svm-toy.patch index baad72a..e8d4e69 100644 --- a/libsvm-3.1.svm-toy.patch +++ b/libsvm-3.11.svm-toy.patch @@ -1,6 +1,6 @@ diff -up ./svm-toy/gtk/callbacks.cpp.svm-toy ./svm-toy/gtk/callbacks.cpp --- ./svm-toy/gtk/callbacks.cpp.svm-toy 2010-09-12 22:11:10.000000000 +1000 -+++ ./svm-toy/gtk/callbacks.cpp 2011-06-14 13:36:25.726748304 +1000 ++++ ./svm-toy/gtk/callbacks.cpp 2011-11-08 09:57:01.782500360 +1000 @@ -3,6 +3,7 @@ #include #include @@ -10,61 +10,66 @@ diff -up ./svm-toy/gtk/callbacks.cpp.svm-toy ./svm-toy/gtk/callbacks.cpp #include "interface.h" #include "../../svm.h" diff -up ./svm-toy/gtk/Makefile.svm-toy ./svm-toy/gtk/Makefile ---- ./svm-toy/gtk/Makefile.svm-toy 2010-11-14 10:59:28.000000000 +1000 -+++ ./svm-toy/gtk/Makefile 2011-06-14 13:47:23.529749429 +1000 +--- ./svm-toy/gtk/Makefile.svm-toy 2011-05-11 12:15:45.000000000 +1000 ++++ ./svm-toy/gtk/Makefile 2011-11-08 10:06:35.686501266 +1000 @@ -1,10 +1,12 @@ CC? = gcc CXX? = g++ - CFLAGS = -Wall -O3 -g `pkg-config --cflags gtk+-2.0` +-CFLAGS = -Wall -O3 -g `pkg-config --cflags gtk+-2.0` -LIBS = `pkg-config --libs gtk+-2.0` -+LOCAL_LIBDIR=../../ -+LIBS = `pkg-config --libs gtk+-2.0` -L${LOCAL_LIBDIR} -lsvm ++CFLAGS = -Wall -O3 -g `pkg-config --cflags --libs gtk+-2.0` ++LOCAL_LIBDIR=../.. ++LIBS = -L${LOCAL_LIBDIR} -lsvm -svm-toy: main.o interface.o callbacks.o ../../svm.o - $(CXX) $(CFLAGS) main.o interface.o callbacks.o ../../svm.o -o svm-toy $(LIBS) + -+svm-toy-gtk: main.o interface.o callbacks.o ++svm-toy-gtk: main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o + $(CXX) $(CFLAGS) main.o interface.o callbacks.o $(LIBS) -o $@ main.o: main.c $(CC) $(CFLAGS) -c main.c -@@ -15,8 +17,5 @@ interface.o: interface.c interface.h +@@ -15,8 +17,8 @@ interface.o: interface.c interface.h callbacks.o: callbacks.cpp callbacks.h $(CXX) $(CFLAGS) -c callbacks.cpp --../../svm.o: -- cd ../..; make svm.o -- +-../../svm.o: ../../svm.cpp ../../svm.h +- make -C ../.. svm.o ++${LOCAL_LIBDIR}/svm.o: ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h ++ make -C ${LOCAL_LIBDIR} svm.o + clean: - rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ../../svm.o -+ rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ++ rm -f *~ callbacks.o svm-toy main.o interface.o callbacks.o ${LOCAL_LIBDIR}/svm.o diff -up ./svm-toy/qt/Makefile.svm-toy ./svm-toy/qt/Makefile ---- ./svm-toy/qt/Makefile.svm-toy 2008-12-19 16:42:05.000000000 +1000 -+++ ./svm-toy/qt/Makefile 2011-06-14 13:50:02.634748539 +1000 -@@ -1,17 +1,18 @@ +--- ./svm-toy/qt/Makefile.svm-toy 2011-05-11 12:15:45.000000000 +1000 ++++ ./svm-toy/qt/Makefile 2011-11-08 10:06:11.702501216 +1000 +@@ -1,17 +1,20 @@ CXX? = g++ -CFLAGS = -Wall -O3 -I$(INCLUDE) -I$(INCLUDE)/QtGui -lQtGui -+CFLAGS = -Wall -O3 -I$(INCLUDE) `pkg-config --cflags --libs QtGui` - INCLUDE = /usr/include/qt4 +-INCLUDE = /usr/include/qt4 -MOC = /usr/bin/moc-qt4 ++CFLAGS = -Wall -O3 `pkg-config --cflags --libs QtGui` +MOC=${MOC_PATH} -+LOCAL_LIBDIR=../../ -+LIBS = `pkg-config --libs QtGui` -L${LOCAL_LIBDIR} -lsvm ++LOCAL_LIBDIR=../.. ++LIBS = -L${LOCAL_LIBDIR} -lsvm -svm-toy: svm-toy.cpp svm-toy.moc ../../svm.o - $(CXX) $(CFLAGS) svm-toy.cpp ../../svm.o -o svm-toy +all: svm-toy-qt + -+svm-toy-qt: svm-toy.cpp svm-toy.moc ++svm-toy-qt: svm-toy.cpp svm-toy.moc ${LOCAL_LIBDIR}/svm.o + $(CXX) $(CFLAGS) svm-toy.cpp ${LIBS} -o $@ svm-toy.moc: svm-toy.cpp $(MOC) svm-toy.cpp -o svm-toy.moc --../../svm.o: -- cd ../..; make svm.o -- +-../../svm.o: ../../svm.cpp ../../svm.h +- make -C ../.. svm.o ++${LOCAL_LIBDIR}/svm.o: ${LOCAL_LIBDIR}/svm.cpp ${LOCAL_LIBDIR}/svm.h ++ make -C ${LOCAL_LIBDIR} svm.o + clean: - rm -f *~ svm-toy svm-toy.moc ../../svm.o -+ rm -f *~ svm-toy svm-toy.moc ++ rm -f *~ svm-toy svm-toy.moc ${LOCAL_LIBDIR}/svm.o diff --git a/libsvm-3.1.toolsDir.patch b/libsvm-3.11.toolsDir.patch similarity index 100% rename from libsvm-3.1.toolsDir.patch rename to libsvm-3.11.toolsDir.patch diff --git a/libsvm.spec b/libsvm.spec index efaa12d..9fffb40 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,7 @@ %define shver 2 Name: libsvm -Version: 3.1 -Release: 2%{?dist} +Version: 3.11 +Release: 1%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -239,6 +239,14 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Jun 17 2011 Ding-Yi Chen - 3.11-1 +- Upstream update: + + Set max number of iterations in the main loop of solvers + + matlab: + new make.m for unix/mac/windows and for matlab/octave + + matlab and python: + fix a problem that decision values returned by svmpredict is empty if number of classes = 1 + * Fri Jun 17 2011 Ding-Yi Chen - 3.1-2 - Fix the build error on EL-5 diff --git a/log b/log index ede03f3..dac608b 100644 --- a/log +++ b/log @@ -193,7 +193,7 @@ file updated. Java: Math.random is replaced by Random in java interface Python interface: - subroutines to get SVs +i subroutines to get SVs relative path to load *.dll and *.so svm.cpp: null pointer check before release memory in svm_free_model_content() @@ -206,9 +206,10 @@ file updated. Using new string formatting/encoding in tools/*.py clearer png output, fix grid.py legend ------------------- - -Future plan: -?.?: - - update make.m of matlab interface to use max(...) \ No newline at end of file +3.11: 2011/11/5 + Set max number of iterations in the main loop of solvers + matlab: + new make.m for unix/mac/windows and for matlab/octave + matlab and python: + fix a problem that decision values returned by svmpredict is empty if number of classes = 1 + \ No newline at end of file diff --git a/sources b/sources index 045b743..3a815ba 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ aae7a8f7e357e86e1c893b706bb02a63 guide.pdf -a157c1edfdb290fe8081d6a011022055 libsvm-3.1.tar.gz +44d2a3a611280ecd0d66aafe0d52233e libsvm-3.11.tar.gz From 45474b1efd120f3235bd470ad2e4291ca620ff3a Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Thu, 25 Apr 2013 13:13:24 -0500 Subject: [PATCH 02/16] Drop vendor tag. --- libsvm.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libsvm.spec b/libsvm.spec index bba690b..59af794 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,7 @@ %define shver 2 Name: libsvm Version: 3.17 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -162,7 +162,7 @@ echo -e "# This file is not in the original libsvm tarball, but added for conven # This file is released under BSD license, just like the rest of the package.\n"\ > $RPM_BUILD_ROOT/%{libsvm_python_dir}/__init__.py -desktop-file-install --delete-original --vendor=fedora \ +desktop-file-install --delete-original \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \ ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop \ @@ -227,17 +227,20 @@ rm -rf $RPM_BUILD_ROOT %doc svm-toy/gtk/README %{_bindir}/svm-toy-gtk %{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-gtk-48.png -%{_datadir}/applications/fedora-%{name}-svm-toy-gtk.desktop +%{_datadir}/applications/*%{name}-svm-toy-gtk.desktop %files svm-toy-qt %defattr(-,root,root,-) %doc svm-toy/qt/README %{_bindir}/svm-toy-qt %{_datadir}/icons/hicolor/48x48/apps/%{name}-svm-toy-qt-48.png -%{_datadir}/applications/fedora-%{name}-svm-toy-qt.desktop +%{_datadir}/applications/*%{name}-svm-toy-qt.desktop %changelog +* Thu Apr 25 2013 Jon Ciesla - 3.17-2 +- Drop desktop vendor tag. + * Sat Apr 13 2013 Ding-Yi Chen - 3.17-1 - Upstream update from 3.13 to 3.17 svm.c and svm.h: From 09712fbb92edcc62c84a980e7a24529bc80a9523 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 02:09:08 -0500 Subject: [PATCH 03/16] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- libsvm.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libsvm.spec b/libsvm.spec index 59af794..7919f7e 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,7 @@ %define shver 2 Name: libsvm Version: 3.17 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -238,6 +238,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 3.17-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Thu Apr 25 2013 Jon Ciesla - 3.17-2 - Drop desktop vendor tag. From 406372669296efacb80d3c1fb090dc575e91a034 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Fri, 28 Mar 2014 16:30:01 +0100 Subject: [PATCH 04/16] Use Requires: java-headless rebuild (#1067528) Signed-off-by: Michael Simacek Signed-off-by: Mikolaj Izdebski --- libsvm.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libsvm.spec b/libsvm.spec index 7919f7e..fa4da57 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,7 @@ %define shver 2 Name: libsvm Version: 3.17 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -81,7 +81,7 @@ Group: Development/Libraries BuildRequires: java-devel >= 1.5.0 BuildRequires: jpackage-utils -Requires: java >= 1.5.0 +Requires: java-headless >= 1.5.0 Requires: jpackage-utils Requires: %{name} = %{version}-%{release} @@ -238,6 +238,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Mar 28 2014 Michael Simacek - 3.17-4 +- Use Requires: java-headless rebuild (#1067528) + * Sat Aug 03 2013 Fedora Release Engineering - 3.17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 61e0772fade52872dab8aecda3996a6f42ee36c4 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Tue, 22 Apr 2014 10:29:04 +1000 Subject: [PATCH 05/16] libsvm-3.18 --- .gitignore | 2 ++ ...javaDir.patch => libsvm-3.18.javaDir.patch | 0 ...ain.patch => libsvm-3.18.packageMain.patch | 0 ...onDir.patch => libsvm-3.18.pythonDir.patch | 0 ...svm-toy.patch => libsvm-3.18.svm-toy.patch | 0 ...olsDir.patch => libsvm-3.18.toolsDir.patch | 0 libsvm.spec | 28 +++++++++++-------- sources | 4 +-- 8 files changed, 21 insertions(+), 13 deletions(-) rename libsvm-3.17.javaDir.patch => libsvm-3.18.javaDir.patch (100%) rename libsvm-3.17.packageMain.patch => libsvm-3.18.packageMain.patch (100%) rename libsvm-3.17.pythonDir.patch => libsvm-3.18.pythonDir.patch (100%) rename libsvm-3.17.svm-toy.patch => libsvm-3.18.svm-toy.patch (100%) rename libsvm-3.17.toolsDir.patch => libsvm-3.18.toolsDir.patch (100%) diff --git a/.gitignore b/.gitignore index aa1a6ec..23ae323 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ libsvm-2.91.tar.gz /libsvm-3.11.tar.gz /libsvm-3.12.tar.gz /libsvm-3.17.tar.gz +/libsvm-3.18.tar.gz +/log diff --git a/libsvm-3.17.javaDir.patch b/libsvm-3.18.javaDir.patch similarity index 100% rename from libsvm-3.17.javaDir.patch rename to libsvm-3.18.javaDir.patch diff --git a/libsvm-3.17.packageMain.patch b/libsvm-3.18.packageMain.patch similarity index 100% rename from libsvm-3.17.packageMain.patch rename to libsvm-3.18.packageMain.patch diff --git a/libsvm-3.17.pythonDir.patch b/libsvm-3.18.pythonDir.patch similarity index 100% rename from libsvm-3.17.pythonDir.patch rename to libsvm-3.18.pythonDir.patch diff --git a/libsvm-3.17.svm-toy.patch b/libsvm-3.18.svm-toy.patch similarity index 100% rename from libsvm-3.17.svm-toy.patch rename to libsvm-3.18.svm-toy.patch diff --git a/libsvm-3.17.toolsDir.patch b/libsvm-3.18.toolsDir.patch similarity index 100% rename from libsvm-3.17.toolsDir.patch rename to libsvm-3.18.toolsDir.patch diff --git a/libsvm.spec b/libsvm.spec index fa4da57..fb2dd6b 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,7 @@ %define shver 2 Name: libsvm -Version: 3.17 -Release: 4%{?dist} +Version: 3.18 +Release: 1%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -238,6 +238,12 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Apr 22 2014 Ding-Yi Chen - 3.18-1 +- Upstream update to 3.18 +- svm.cpp and svm-scale.c: check return values of fscanf +- matlab interface: Makefile no longer handles octave + because make.m should be used + * Fri Mar 28 2014 Michael Simacek - 3.17-4 - Use Requires: java-headless rebuild (#1067528) @@ -352,10 +358,10 @@ rm -rf $RPM_BUILD_ROOT * Wed Apr 07 2010 Ding-Yi Chen - 2.91-1 - Fixed Bug 564887 - FTBFS libsvm-2.90-3.fc13 - Upstream update: - * completely new python interface using ctype - * new way to set the print_string function - * Java: able to load model from a BufferedReader directly - * fix grid.py so -log2c can be run under python 2.6 or after + * completely new python interface using ctype + * new way to set the print_string function + * Java: able to load model from a BufferedReader directly + * fix grid.py so -log2c can be run under python 2.6 or after * Thu Nov 05 2009 Ding-Yi Chen - 2.90-2 - Obsoletes libsvm-java for ppc and ppc64. @@ -425,7 +431,7 @@ rm -rf $RPM_BUILD_ROOT * better gradient reconstructions * issue a warning when -h 0 may be faster -* Thu Apr 29 2008 Ding-Yi Chen - 2.86-13 +* Tue Apr 29 2008 Ding-Yi Chen - 2.86-13 - Fix svm-toy-qt clear button does not clear. (from Hsiang-Fu Yu in National Taiwan University) @@ -455,7 +461,7 @@ rm -rf $RPM_BUILD_ROOT - [Bug 436392]: Fix by copy from right place. - Add desktop files and icons for svm-toy-gtk and svm-toy-qt -* Tue Feb 11 2008 Ding-Yi Chen - 2.85-4 +* Mon Feb 11 2008 Ding-Yi Chen - 2.85-4 - Move gnuplot from BuildRequires to Requires * Thu Feb 07 2008 Ding-Yi Chen - 2.85-3 @@ -475,7 +481,7 @@ rm -rf $RPM_BUILD_ROOT - Add svm-toy-gtk - Add svm-toy-qt -* Wed Dec 20 2007 Ding-Yi Chen - 2.84-9 +* Thu Dec 20 2007 Ding-Yi Chen - 2.84-9 - [Bug 254091] Comment 19 - Fix python/Makefile @@ -487,11 +493,11 @@ rm -rf $RPM_BUILD_ROOT * Mon Dec 03 2007 Ding-Yi Chen - 2.84-7 - [Bug 254091] Review Request: libsvm - A Library for Support Vector Machines (Comment #12) -* Thu Sep 26 2007 Ding-Yi Chen - 2.84-6 +* Wed Sep 26 2007 Ding-Yi Chen - 2.84-6 - Add defattr to each subpackage - Move libsvm.so to libsvm -* Thu Sep 24 2007 Ding-Yi Chen - 2.84-5 +* Mon Sep 24 2007 Ding-Yi Chen - 2.84-5 - Split out libsvm-java - Add libsvm.so diff --git a/sources b/sources index 5984ec3..b7c6488 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -b1543809993e2653dd2787f62c3c390a guide.pdf -67f8b597ce85c1f5288d7838e57ea28a libsvm-3.17.tar.gz +bba35e2cf9d14e158009ef8b90fd840a libsvm-3.18.tar.gz +95918671ee5435803a1646e1ad2f3317 log From 61cc8d17f0414e58e5a72309965db29ca4e5c016 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Tue, 22 Apr 2014 10:35:46 +1000 Subject: [PATCH 06/16] Upload guide.pdf --- sources | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources b/sources index b7c6488..367e019 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -bba35e2cf9d14e158009ef8b90fd840a libsvm-3.18.tar.gz -95918671ee5435803a1646e1ad2f3317 log +b1543809993e2653dd2787f62c3c390a guide.pdf From b886949a662527466a213ad6ed12605a8bf2e4e5 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Tue, 22 Apr 2014 10:47:09 +1000 Subject: [PATCH 07/16] libsvm-3.18 new-sources --- .gitignore | 3 +++ sources | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 23ae323..77e536b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ libsvm-2.91.tar.gz /libsvm-3.17.tar.gz /libsvm-3.18.tar.gz /log +/LibSVM-svm-toy-48.png +/libsvm-svm-toy-gtk.desktop +/libsvm-svm-toy-qt.desktop diff --git a/sources b/sources index 367e019..4a9b52a 100644 --- a/sources +++ b/sources @@ -1 +1,6 @@ b1543809993e2653dd2787f62c3c390a guide.pdf +bba35e2cf9d14e158009ef8b90fd840a libsvm-3.18.tar.gz +95918671ee5435803a1646e1ad2f3317 log +0bc4868057a7c1c422f91a798f14a562 LibSVM-svm-toy-48.png +398721fc66bb0903d46c685e9a3cba27 libsvm-svm-toy-gtk.desktop +9a518db15afe9224e3a04695c82d7142 libsvm-svm-toy-qt.desktop From c5f7d9044cf7f5fd068141ee5e8e8af3dbb3204b Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Tue, 8 Nov 2011 16:53:53 +1000 Subject: [PATCH 08/16] Upstream update:3.11 --- .gitignore | 3 --- libsvm.spec | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 77e536b..ce9d876 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ -guide.pdf -libsvm-2.91.tar.gz -/guide.pdf /libsvm-3.0.tar.gz /libsvm-3.1.tar.gz /libsvm-3.11.tar.gz diff --git a/libsvm.spec b/libsvm.spec index fb2dd6b..edd0f0f 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -202,6 +202,7 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/%{name}/examples %{_libdir}/%{name}.so.%{shver} + %files devel %defattr(-,root,root,-) %doc README @@ -220,6 +221,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %doc java/README-Java java/test_applet.html %{_javadir}/%{name}.jar +#%{_datadir}/javadoc/%{name}-%{version} %endif %files svm-toy-gtk From 5459b8aaa6510359e19c8f21568d24a5c7255396 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Mon, 28 Apr 2014 11:40:45 +1000 Subject: [PATCH 09/16] Fixed Bug 1090844 - libsvm-java has unresolved dependencies on epel6 testing --- libsvm.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libsvm.spec b/libsvm.spec index edd0f0f..0580eff 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,7 @@ %define shver 2 Name: libsvm Version: 3.18 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -81,7 +81,12 @@ Group: Development/Libraries BuildRequires: java-devel >= 1.5.0 BuildRequires: jpackage-utils +%if 0%{?rhel} <= 6 +Requires: java >= 1.5.0 +%else Requires: java-headless >= 1.5.0 +%endif + Requires: jpackage-utils Requires: %{name} = %{version}-%{release} @@ -240,6 +245,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 28 2014 Ding-Yi Chen - 3.18-2 +- Fixed Bug 1090844 - libsvm-java has unresolved dependencies on epel6 testing + * Tue Apr 22 2014 Ding-Yi Chen - 3.18-1 - Upstream update to 3.18 - svm.cpp and svm-scale.c: check return values of fscanf From f13cf841ccf6bcf784700ab8f229addf8b7d75c1 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Tue, 8 Nov 2011 16:53:53 +1000 Subject: [PATCH 10/16] Upstream update:3.11 --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index 4c7d592..12cce0f 100644 --- a/log +++ b/log @@ -258,4 +258,4 @@ i subroutines to get SVs initialize model->sv_indices as null in svm_load_model if nr_fold > # data, change nr_fold to be # data and ro leave-one-out cv matlab interface: - handle the problem where output variables are not specified \ No newline at end of file + handle the problem where output variables are not specified From 0852a8c1ca647613af7ef481cacd3178451dbd68 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 02:09:08 -0500 Subject: [PATCH 11/16] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- libsvm.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsvm.spec b/libsvm.spec index 0580eff..c23d2c8 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -245,6 +245,7 @@ rm -rf $RPM_BUILD_ROOT %changelog +<<<<<<< HEAD * Mon Apr 28 2014 Ding-Yi Chen - 3.18-2 - Fixed Bug 1090844 - libsvm-java has unresolved dependencies on epel6 testing @@ -257,6 +258,8 @@ rm -rf $RPM_BUILD_ROOT * Fri Mar 28 2014 Michael Simacek - 3.17-4 - Use Requires: java-headless rebuild (#1067528) +======= +>>>>>>> - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 3.17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 556eaba32cb85ad7d2562e67cfb00a0816bc60ed Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Fri, 28 Mar 2014 16:30:01 +0100 Subject: [PATCH 12/16] Use Requires: java-headless rebuild (#1067528) Signed-off-by: Michael Simacek Signed-off-by: Mikolaj Izdebski --- libsvm.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libsvm.spec b/libsvm.spec index c23d2c8..6503de3 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -81,12 +81,16 @@ Group: Development/Libraries BuildRequires: java-devel >= 1.5.0 BuildRequires: jpackage-utils +<<<<<<< HEAD %if 0%{?rhel} <= 6 Requires: java >= 1.5.0 %else Requires: java-headless >= 1.5.0 %endif +======= +Requires: java-headless >= 1.5.0 +>>>>>>> Use Requires: java-headless rebuild (#1067528) Requires: jpackage-utils Requires: %{name} = %{version}-%{release} @@ -245,7 +249,6 @@ rm -rf $RPM_BUILD_ROOT %changelog -<<<<<<< HEAD * Mon Apr 28 2014 Ding-Yi Chen - 3.18-2 - Fixed Bug 1090844 - libsvm-java has unresolved dependencies on epel6 testing @@ -258,8 +261,6 @@ rm -rf $RPM_BUILD_ROOT * Fri Mar 28 2014 Michael Simacek - 3.17-4 - Use Requires: java-headless rebuild (#1067528) -======= ->>>>>>> - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 3.17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 5e0873a54f8b32a1641e4095c68fc291927d74bb Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Tue, 22 Apr 2014 10:29:04 +1000 Subject: [PATCH 13/16] libsvm-3.18 --- libsvm.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libsvm.spec b/libsvm.spec index 6503de3..0580eff 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -81,16 +81,12 @@ Group: Development/Libraries BuildRequires: java-devel >= 1.5.0 BuildRequires: jpackage-utils -<<<<<<< HEAD %if 0%{?rhel} <= 6 Requires: java >= 1.5.0 %else Requires: java-headless >= 1.5.0 %endif -======= -Requires: java-headless >= 1.5.0 ->>>>>>> Use Requires: java-headless rebuild (#1067528) Requires: jpackage-utils Requires: %{name} = %{version}-%{release} From 578d57f9463bea876730f72f42db851780b1bcc1 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Mon, 28 Apr 2014 15:34:32 +1000 Subject: [PATCH 14/16] EPEL5 desktop files need vendor --- libsvm.spec | 54 ++++++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/libsvm.spec b/libsvm.spec index 0580eff..ac457b5 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,7 +1,11 @@ %define shver 2 +%{!?pyver: %define pyver %(python -c 'import sys; print(sys.version[0:3])')} +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%define libsvm_python_dir %{python_sitearch}/libsvm + Name: libsvm Version: 3.18 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A Library for Support Vector Machines Group: Development/Libraries @@ -21,25 +25,22 @@ Patch4: %{name}-%{version}.toolsDir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: grep -%{!?pyver: %define pyver %(python -c 'import sys; print(sys.version[0:3])')} -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -%define libsvm_python_dir %{python_sitearch}/libsvm - -%define javac javac -%define jar jar %define libdir_libsvm %{_libdir}/libsvm -%if 0%{?fedora} >= 9 -%define moc_path %{_bindir}/moc-qt4 + +%if 0%{?rhel} <= 5 +%define moc_path %{_libdir}/qt4/bin/moc +%define with_vendor "fedora" %else -%if 0%{?rhel} >= 6 %define moc_path %{_bindir}/moc-qt4 -%else -%define moc_path %{_libdir}/qt4/bin/moc -%endif -%endif +%fi %ifnarch ppc ppc64 %define no_java FALSE +%if 0%{?rhel} <= 6 +%define java_dependency java +%else +%define java_dependency java-headless +%endif %else %define no_java NO_JAVA Obsoletes: libsvm-java < 2.88-1 @@ -74,19 +75,14 @@ Python tools and interfaces for libsvm. Install this package if you want to develop programs with libsvm in Python. -%ifnarch ppc ppc64 +%if "%{NO_JAVA}" == "FALSE" %package java Summary: Java tools and interfaces for libsvm Group: Development/Libraries BuildRequires: java-devel >= 1.5.0 BuildRequires: jpackage-utils -%if 0%{?rhel} <= 6 -Requires: java >= 1.5.0 -%else -Requires: java-headless >= 1.5.0 -%endif - +Requires: %{java_dependency} >= 1.5.0 Requires: jpackage-utils Requires: %{name} = %{version}-%{release} @@ -136,18 +132,16 @@ cp %{SOURCE4} . cp %{SOURCE5} %{name}-svm-toy-gtk-48.png cp %{SOURCE5} %{name}-svm-toy-qt-48.png - %build %{__sed} -i 's/\r//' FAQ.html %{__sed} -i 's/\r//' ChangeLog -make all RPM_CFLAGS="$RPM_OPT_FLAGS" PYTHON_VERSION="%{pyver}" JAVAC="%{javac}" JAR="%{jar}" LIBDIR="%{_libdir}" MOC_PATH="%{moc_path}" NO_JAVA="%{no_java}" +make all RPM_CFLAGS="$RPM_OPT_FLAGS" PYTHON_VERSION="%{pyver}" JAVAC="javac" JAR="jar" LIBDIR="%{_libdir}" MOC_PATH="%{moc_path}" NO_JAVA="%{no_java}" mv python/README python/README-Python mv tools/README tools/README-Tools cp README java/README-Java cp README svm-toy/gtk cp README svm-toy/qt - %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir} PYTHON_VERSION="%{pyver}" LIBSVM_VER="%{version}" NO_JAVA="%{no_java}" JAVA_TARGET_DIR="${RPM_BUILD_ROOT}/%{_javadir}" @@ -167,10 +161,17 @@ echo -e "# This file is not in the original libsvm tarball, but added for conven # This file is released under BSD license, just like the rest of the package.\n"\ > $RPM_BUILD_ROOT/%{libsvm_python_dir}/__init__.py +%if 0%{?with_vendor} +desktop-file-install --delete-original --vendor=%{with_vendor} \ + --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ + ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \ + ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop +%eles desktop-file-install --delete-original \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \ - ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop \ + ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop +%endif # Fix Bug 646154 - libsvm-python's pth is not set correctly echo 'libsvm' > $RPM_BUILD_ROOT/%{python_sitearch}/libsvm.pth @@ -245,6 +246,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 28 2014 Ding-Yi Chen - 3.18-3 +- EPEL5 desktop files need vendor. + * Mon Apr 28 2014 Ding-Yi Chen - 3.18-2 - Fixed Bug 1090844 - libsvm-java has unresolved dependencies on epel6 testing From 6418af21bc4dc027471ecbb52354fc210672d22e Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Mon, 28 Apr 2014 15:49:14 +1000 Subject: [PATCH 15/16] Fix spec --- libsvm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsvm.spec b/libsvm.spec index ac457b5..20c069c 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -32,7 +32,7 @@ BuildRequires: grep %define with_vendor "fedora" %else %define moc_path %{_bindir}/moc-qt4 -%fi +%endif %ifnarch ppc ppc64 %define no_java FALSE From db3f53eb75e671a09e0d9a0b8024352d3f2f91e6 Mon Sep 17 00:00:00 2001 From: Ding-Yi Chen Date: Mon, 28 Apr 2014 16:11:13 +1000 Subject: [PATCH 16/16] Fix SPEC --- libsvm.spec | 12 +++++------- log | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/libsvm.spec b/libsvm.spec index 20c069c..6aaad7e 100644 --- a/libsvm.spec +++ b/libsvm.spec @@ -1,6 +1,7 @@ %define shver 2 %{!?pyver: %define pyver %(python -c 'import sys; print(sys.version[0:3])')} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%define libdir_libsvm %{_libdir}/libsvm %define libsvm_python_dir %{python_sitearch}/libsvm Name: libsvm @@ -25,8 +26,6 @@ Patch4: %{name}-%{version}.toolsDir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: grep -%define libdir_libsvm %{_libdir}/libsvm - %if 0%{?rhel} <= 5 %define moc_path %{_libdir}/qt4/bin/moc %define with_vendor "fedora" @@ -75,7 +74,7 @@ Python tools and interfaces for libsvm. Install this package if you want to develop programs with libsvm in Python. -%if "%{NO_JAVA}" == "FALSE" +%if "%{no_java}" == "FALSE" %package java Summary: Java tools and interfaces for libsvm Group: Development/Libraries @@ -161,12 +160,12 @@ echo -e "# This file is not in the original libsvm tarball, but added for conven # This file is released under BSD license, just like the rest of the package.\n"\ > $RPM_BUILD_ROOT/%{libsvm_python_dir}/__init__.py -%if 0%{?with_vendor} +%if 0%{?with_vendor:1} desktop-file-install --delete-original --vendor=%{with_vendor} \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \ ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-qt.desktop -%eles +%else desktop-file-install --delete-original \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ ${RPM_BUILD_ROOT}/%{_datadir}/applications/%{name}-svm-toy-gtk.desktop \ @@ -208,7 +207,6 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/%{name}/examples %{_libdir}/%{name}.so.%{shver} - %files devel %defattr(-,root,root,-) %doc README @@ -222,7 +220,7 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/svm-*.py %{python_sitearch}/libsvm.pth -%ifnarch ppc ppc64 +%if "%{no_java}" == "FALSE" %files java %defattr(-,root,root,-) %doc java/README-Java java/test_applet.html diff --git a/log b/log index 12cce0f..4c7d592 100644 --- a/log +++ b/log @@ -258,4 +258,4 @@ i subroutines to get SVs initialize model->sv_indices as null in svm_load_model if nr_fold > # data, change nr_fold to be # data and ro leave-one-out cv matlab interface: - handle the problem where output variables are not specified + handle the problem where output variables are not specified \ No newline at end of file