You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libsvm/libsvm-3.1.pythonDir.patch

26 lines
812 B

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
+PYTHONDIR_NAME ?= python${PYTHON_VERSION}/site-packages/libsvm
+PYTHONDIR?=${LIBDIR}/${PYTHONDIR_NAME}
+PYTHONDIR_INSTALL=${DESTDIR}/${PYTHONDIR}
+SVM_TOOLS:= $(notdir $(wildcard ../tools/*.py))
-lib:
+all: lib
+
+lib: ../svm.cpp ../svm.h
cd ..; make lib; cd -
+
+install: all
+ mkdir -p ${PYTHONDIR_INSTALL}
+ install -m 755 *.py ${PYTHONDIR_INSTALL}
+ install -m 755 ../tools/*.py ${PYTHONDIR_INSTALL}
+ $(foreach toolPy,$(SVM_TOOLS),ln -s ${PYTHONDIR}/$(toolPy) ${BINDIR_INSTALL}/svm-$(toolPy);)
+
+uninstall:
+ rm -fr ${LIBDIR}/${PYTHON_PATH} $(addprefix ${BINDIR_INSTALL}/svm-,$(SVM_TOOLS))
+