commit 9b09c724ed0a061dcde2f74dbc4669f0210a84bf
Author: Björn Esser <bjoern.esser(a)gmail.com>
Date: Sun May 4 10:53:05 2014 +0200
new upstream release (#1051090)
failsafe backport of Python2-macros for RHEL <= 6
Python3 is not available on RHEL7, yet
preserve timestamps of modified files
minor improvements
exp.html | 2 +-
index.html | 22 +++++---
liblinear.spec | 167 ++++++++++++++++++++++++++++++--------------------------
sources | 2 +-
4 files changed, 105 insertions(+), 88 deletions(-)
---
diff --git a/exp.html b/exp.html
index 4d742ef..a9e00ab 100644
--- a/exp.html
+++ b/exp.html
@@ -36,7 +36,7 @@ Technical report, 2013.
<p>
can be found in this
-<a href=../papers/ranksvm/ranksvml2_exp-1.2.tar.gz>tar.gz file</a>.
+<a href=../papers/ranksvm/ranksvml2_exp-1.3.tgz>tar.gz file</a>.
<p>
Use files here only if you are interested in redoing our
experiments. To apply the method
diff --git a/index.html b/index.html
index 7bf08a9..a8ebe8e 100644
--- a/index.html
+++ b/index.html
@@ -27,8 +27,14 @@ a library for short-text classification and analysis.
It's built upon LIBLINEAR.
<p>
<img SRC="../images/new.gif" >
-Version 1.93 released on January 27, 2013. We fixed some
-minor issues in this version.
+Version 1.94 released on November 12, 2013.
+Following the recent change of LIBSVM, we slightly adjust the way class labels are
handled
+internally.
+By default labels are ordered by their first occurrence in the training set.
+Hence for a set with -1/+1 labels, if -1 appears first,
+then internally -1 becomes +1. This has caused
+confusion. Now for data with -1/+1 labels, we specifically
+ensure that internally the binary SVM has positive data corresponding to the +1
instances. For developers, see changes in the subrouting group_classes of linear.cpp.
<p> An experimental version using 64-bit int is in
<a href=../libsvmtools>LIBSVM tools</a>. It
in theory can handle up to
@@ -142,7 +148,7 @@ consider LIBSVM first.
<h3>
<a NAME="download">
Download LIBLINEAR</h3>
-The current release (Version 1.93, January 2013) of <b>LIBLINEAR </b>can be
obtained by downloading
+The current release (Version 1.94, November 2013) of <b>LIBLINEAR </b>can be
obtained by downloading
the
<a
href="http://www.csie.ntu.edu.tw/~cjlin/cgi-bin/liblinear.cgi?+http://www.csie.ntu.edu.tw/~cjlin/liblinear+zip">
zip
@@ -158,9 +164,9 @@ file.
A README file with detailed explanation is
provided. For <b>MS Windows</b> users, there is a subdirectory in the zip
file containing binary executable files.
-<p>Please read the <a
href="http://www.csie.ntu.edu.tw/~cjlin/liblinear/COPYRIGHT">COPYRIGHT</a>
+<p>Please read the <a href="COPYRIGHT">COPYRIGHT</a>
notice before using
-<b>LIBLINEAR</b>.
+<b>LIBLINEAR</b>.
<hr>
<h3>
@@ -252,10 +258,10 @@ Interfaces to LIBLINEAR</h3>
<td> <a NAME="ruby">Ruby</td>
<td> A Ruby interface via SWIG</td>
<td>
- Tom Zeng
+ Kei Tsuchiya (extended from the work of Tom Zeng)
</td>
- <td> 1.51</td>
- <td> <a
href=http://github.com/tomz/liblinear-ruby-swig/tree/master>liblinear-...
+ <td> 1.93</td>
+ <td> <a
href=https://github.com/kei500/liblinear-ruby>liblinear-ruby-swig</...
</tr>
<tr>
diff --git a/liblinear.spec b/liblinear.spec
index 1fb8210..34210f0 100644
--- a/liblinear.spec
+++ b/liblinear.spec
@@ -1,35 +1,32 @@
-%if 0%{?fedora} || 0%{?rhel} >= 7
-%global __python_sitearch %{python2_sitearch}
-%else
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
-%global __python_sitearch %{python_sitearch}
-%endif
-
-Name: liblinear
-Version: 1.93
-Release: 3%{?dist}
-Summary: Library for Large Linear Classification
-%{?el5:Group: System Environment/Libraries}
-
-License: BSD
-URL:
http://www.csie.ntu.edu.tw/~cjlin/%{name}
-Source0: %{url}/%{name}-%{version}.tar.gz
-Source1: %{url}/index.html
-Source2: %{url}/FAQ.html
-Source3: %{url}/exp.html
-Source4:
http://www.csie.ntu.edu.tw/~cjlin/papers/%{name}.pdf
+# Failsafe backport of Python2-macros for RHEL <= 6
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%{!?python_version: %global python_version %(%{__python} -c "import sys;
sys.stdout.write(sys.version[:3])")}
+%{!?__python2: %global __python2 %{__python}}
+%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
+%{!?python2_sitearch: %global python2_sitearch %{python_sitearch}}
+%{!?python2_version: %global python2_version %{python_version}}
+
+Name: liblinear
+Version: 1.94
+Release: 1%{?dist}
+Summary: Library for Large Linear Classification
+%{?el5:Group: System Environment/Libraries}
+
+License: BSD
+URL:
http://www.csie.ntu.edu.tw/~cjlin/%{name}
+Source0: %{url}/%{name}-%{version}.tar.gz
+Source1: %{url}/index.html
+Source2: %{url}/FAQ.html
+Source3: %{url}/exp.html
+Source4:
http://www.csie.ntu.edu.tw/~cjlin/papers/%{name}.pdf
# simple fixes, not needed by upstream
-Patch0: liblinear-adapt_makefile.patch
-Patch1: liblinear-fix_compiler_warnings.patch
+Patch0: liblinear-adapt_makefile.patch
+Patch1: liblinear-fix_compiler_warnings.patch
-%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
-BuildRequires: blas-devel
-BuildRequires: python2-devel
-
-%if 0%{?fedora} || 0%{?rhel} >= 7
-BuildRequires: python3-devel
-%endif
+%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
+BuildRequires: blas-devel
%description
@@ -43,12 +40,19 @@ Experiments demonstrate that %{name} is very efficient on large
sparse
data sets. %{name} is the winner of ICML 2008 large-scale learning
challenge (linear SVM track). It is also used for winning KDD Cup 2010.
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%doc COPYRIGHT
+%{_libdir}/%{name}.so.*
+
%package cli
-Summary: CLI-tools for %{name}
-%{?el5:Group: Applications/Engineering}
+Summary: CLI-tools for %{name}
+%{?el5:Group: Applications/Engineering}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description cli
This package contains cli-tools for use with %{name}.
@@ -56,21 +60,33 @@ This package contains cli-tools for use with %{name}.
For further information read "3.1 Practical Usage" from the pdf included
in the %{name}-doc package.
+%files cli
+%doc heart_scale
+%{_bindir}/*
+
%package devel
-Summary: Development files for %{name}
-%{?el5:Group: Development/Libraries}
+Summary: Development files for %{name}
+%{?el5:Group: Development/Libraries}
+
+Requires: %{name}%{?_isa} == %{version}-%{release}
+%{?el5:Requires: %{_bindir}/pkg-config}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+%{?el5:Provides: pkgconfig(%{name}) == %{version}}
%description devel
The %{name}-devel package contains libraries and header files for developing
applications that use %{name}.
+%files devel
+%{_includedir}/*
+%{_libdir}/%{name}.so
+%{_libdir}/pkgconfig/%{name}.pc
+
%package doc
-Summary: Documentation files for %{name}
-%{?el5:Group: Documentation}
+Summary: Documentation files for %{name}
+%{?el5:Group: Documentation}
%{!?el5:BuildArch: noarch}
@@ -78,12 +94,16 @@ Summary: Documentation files for %{name}
The %{name}-doc package contains some brief documentation for developing
applications that use %{name}.
+%files doc
+%doc COPYRIGHT README* {predict,train}.c *.html *.pdf
+
%package -n python-%{name}
-Summary: Python bindings for %{name}
-%{?el5:Group: System Environment/Libraries}
+Summary: Python bindings for %{name}
+%{?el5:Group: System Environment/Libraries}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+BuildRequires: python2-devel
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python-%{name}
This package contains bindings for developing Python applications that
@@ -92,11 +112,16 @@ use %{name}.
For further information read "README.python" included in the
%{name}-doc package.
+%files -n python-%{name}
+%{python2_sitearch}/*
+
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 8
%package -n python3-%{name}
-Summary: Python3 bindings for %{name}
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary: Python3 bindings for %{name}
+
+BuildRequires: python3-devel
+Requires: %{name}%{?_isa} == %{version}-%{release}
%description -n python3-%{name}
This package contains bindings for developing Python3 applications that
@@ -104,7 +129,10 @@ use %{name}.
For further information read "README.python" included in the
%{name}-doc package.
-%endif
+
+%files -n python3-%{name}
+%{python3_sitearch}/*
+%endif #0%{?fedora} || 0%{?rhel} >= 8
%prep
@@ -140,7 +168,12 @@ EOF
mv python/README README.python
# remove hashbang from lib's files
-sed -i -e '/#!\//d' python/*.py
+for _file in python/*.py
+do
+ sed '1{\@^#!/usr/bin/env python@d}' ${_file} > ${_file}.new &&
+ touch -r ${_file} ${_file}.new &&
+ mv -f ${_file}.new ${_file}
+done
%build
@@ -155,7 +188,7 @@ make %{?_smp_mflags}
mkdir -p %{buildroot}%{_bindir} \
%{buildroot}%{_libdir}/pkgconfig \
%{buildroot}%{_includedir}/%{name} \
- %{buildroot}%{__python_sitearch}
+ %{buildroot}%{python2_sitearch}
install -pm 0755 predict %{buildroot}%{_bindir}/%{name}-predict
install -pm 0755 train %{buildroot}%{_bindir}/%{name}-train
@@ -164,48 +197,26 @@ ln -s %{name}.so.1 %{buildroot}%{_libdir}/%{name}.so
install -pm 0644 %{name}.pc %{buildroot}%{_libdir}/pkgconfig
install -pm 0644 {linear,tron}.h %{buildroot}%{_includedir}/%{name}
-install -pm 0644 python/*.py %{buildroot}%{__python_sitearch}
+install -pm 0644 python/*.py %{buildroot}%{python2_sitearch}
-%if 0%{?fedora} || 0%{?rhel} >= 7
+%if 0%{?fedora} || 0%{?rhel} >= 8
mkdir -p %{buildroot}%{python3_sitearch}
install -pm 0644 python/*.py %{buildroot}%{python3_sitearch}
-%endif
+%endif #0%{?fedora} || 0%{?rhel} >= 8
%clean
%{?el5:rm -rf %{buildroot}}
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
-
-
-%files
-%doc COPYRIGHT
-%{_libdir}/%{name}.so.*
-
-%files cli
-%doc heart_scale
-%{_bindir}/*
-
-%files devel
-%{_includedir}/*
-%{_libdir}/%{name}.so
-%{_libdir}/pkgconfig/%{name}.pc
-
-%files doc
-%doc COPYRIGHT README* {predict,train}.c *.html *.pdf
-
-%files -n python-%{name}
-%{__python_sitearch}/*
-
-%if 0%{?fedora} || 0%{?rhel} >= 7
-%files -n python3-%{name}
-%{python3_sitearch}/*
-%endif
-
-
%changelog
+* Sun May 04 2014 Björn Esser <bjoern.esser(a)gmail.com> - 1.94-1
+- new upstream release (#1051090)
+- failsafe backport of Python2-macros for RHEL <= 6
+- Python3 is not available on RHEL7, yet
+- preserve timestamps of modified files
+- minor improvements
+
* Wed Oct 02 2013 Björn Esser <bjoern.esser(a)gmail.com> - 1.93-3
- adaptions for new Python-guidelines
- generate .pc-file on-the-fly
diff --git a/sources b/sources
index 5942bf7..68a31b0 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-5ca3c8e9bb2ec5661aa77221b206e296 liblinear-1.93.tar.gz
+f52e1f2dd6bccb58977a334bba0bbf90 liblinear-1.94.tar.gz
e59751acc930d6fbfad3f9a1bf2c6dd5 liblinear.pdf