/tmp/python.ver issue.

epel8
Ding-Yi Chen 18 years ago
parent 793c8549d5
commit a5205db2cb

@ -1,6 +1,6 @@
diff -up ./Makefile.orig ./Makefile diff -up ./Makefile.orig ./Makefile
--- ./Makefile.orig 2007-08-22 15:23:34.000000000 +1000 --- ./Makefile.orig 2007-08-30 15:29:42.000000000 +1000
+++ ./Makefile 2007-08-27 15:48:58.000000000 +1000 +++ ./Makefile 2007-08-30 15:30:25.000000000 +1000
@@ -1,7 +1,31 @@ @@ -1,7 +1,31 @@
CXXC = g++ CXXC = g++
CFLAGS = -Wall -O3 CFLAGS = -Wall -O3
@ -81,15 +81,15 @@ diff -up ./Makefile.orig ./Makefile
+ ${MAKE} -C python clean + ${MAKE} -C python clean
+ +
diff -up ./python/Makefile.orig ./python/Makefile diff -up ./python/Makefile.orig ./python/Makefile
--- ./python/Makefile.orig 2007-08-27 11:11:38.000000000 +1000 --- ./python/Makefile.orig 2007-08-30 15:29:49.000000000 +1000
+++ ./python/Makefile 2007-08-29 17:38:14.000000000 +1000 +++ ./python/Makefile 2007-08-30 16:03:46.000000000 +1000
@@ -2,13 +2,19 @@ CC = g++ @@ -2,7 +2,14 @@ CC = g++
SWIG ?= swig SWIG ?= swig
#Windows: see ../README ../Makefile.win #Windows: see ../README ../Makefile.win
-PYTHON_INCLUDEDIR ?= /usr/include/python2.4 -PYTHON_INCLUDEDIR ?= /usr/include/python2.4
+PYTHON_VERSION=${shell python -V 2> /tmp/python.ver ; cat /tmp/python.ver | awk 'BEGIN {FS= "[ .]"} {printf("%s.%s",$$2,$$3)}'; rm -f /tmp/python.ver} +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 +ifndef PYTHON_INCLUDEDIR
+ +
+PYTHON_INCLUDEDIR?= /usr/include/python${PYTHON_VERSION} +PYTHON_INCLUDEDIR?= /usr/include/python${PYTHON_VERSION}
@ -99,13 +99,7 @@ diff -up ./python/Makefile.orig ./python/Makefile
CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I.. CFLAGS = -O3 -I$(PYTHON_INCLUDEDIR) -I..
LDFLAGS = -shared LDFLAGS = -shared
# Mac OS @@ -28,3 +35,19 @@ clean:
# LDFLAGS = -framework Python -bundle
-
all: svmc.so
svmc.so: svmc_wrap.o svm.o
@@ -28,3 +34,19 @@ clean:
moreclean: clean moreclean: clean
rm -f svmc_wrap.c rm -f svmc_wrap.c
@ -126,8 +120,8 @@ diff -up ./python/Makefile.orig ./python/Makefile
+ +
+ +
diff -up ./tools/grid.py.orig ./tools/grid.py diff -up ./tools/grid.py.orig ./tools/grid.py
--- ./tools/grid.py.orig 2007-08-28 11:48:03.000000000 +1000 --- ./tools/grid.py.orig 2007-08-30 15:30:17.000000000 +1000
+++ ./tools/grid.py 2007-08-28 11:58:22.000000000 +1000 +++ ./tools/grid.py 2007-08-30 15:30:25.000000000 +1000
@@ -11,7 +11,7 @@ from string import find, split, join, at @@ -11,7 +11,7 @@ from string import find, split, join, at
is_win32 = (sys.platform == 'win32') is_win32 = (sys.platform == 'win32')
@ -138,8 +132,8 @@ diff -up ./tools/grid.py.orig ./tools/grid.py
else: else:
# example for windows # example for windows
diff -up ./tools/easy.py.orig ./tools/easy.py diff -up ./tools/easy.py.orig ./tools/easy.py
--- ./tools/easy.py.orig 2007-08-28 11:47:53.000000000 +1000 --- ./tools/easy.py.orig 2007-08-30 15:30:04.000000000 +1000
+++ ./tools/easy.py 2007-08-28 12:13:58.000000000 +1000 +++ ./tools/easy.py 2007-08-30 15:30:25.000000000 +1000
@@ -11,10 +11,10 @@ if len(sys.argv) <= 1: @@ -11,10 +11,10 @@ if len(sys.argv) <= 1:
is_win32 = (sys.platform == 'win32') is_win32 = (sys.platform == 'win32')
@ -155,4 +149,3 @@ diff -up ./tools/easy.py.orig ./tools/easy.py
gnuplot_exe = "/usr/bin/gnuplot" gnuplot_exe = "/usr/bin/gnuplot"
else: else:
# example for windows # example for windows
diff -up ./tools/subset.py.orig ./tools/subset.py

@ -1,6 +1,6 @@
Name: libsvm Name: libsvm
Version: 2.84 Version: 2.84
Release: 3%{?dist} Release: 4%{?dist}
Summary: A Library for Support Vector Machines Summary: A Library for Support Vector Machines
Group: Development/Libraries Group: Development/Libraries
@ -10,7 +10,7 @@ Source0: %{name}-%{version}.tar.gz
#Source0: http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/libsvm.cgi?+http://www.csie.ntu.edu.tw/~cjlin/%{name}+tar.gz #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: ChangeLog
#Source1: http://www.csie.ntu.edu.tw/~cjlin/libsvm/log #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) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: glibc-devel dos2unix BuildRequires: glibc-devel dos2unix
@ -88,8 +88,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Thu Aug 30 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-3 * Thu Aug 30 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-4
- Refined description. - Refined description.
- Fix the /tmp/python.ver problem
* Mon Aug 27 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-3 * Mon Aug 27 2007 Ding-Yi Chen <dchen@redhat.com> - 2.84-3
- Fix dependency problem - Fix dependency problem

Loading…
Cancel
Save