forked from pool/libsvm
Accepting request 1203936 from home:fstrba:branches:science
Use SOURCE_DATE_EPOCH for reproducible jar mtime OBS-URL: https://build.opensuse.org/request/show/1203936 OBS-URL: https://build.opensuse.org/package/show/science/libsvm?expand=0&rev=26
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
libsvm-3.3.tar.gz
Normal file
3
libsvm-3.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a97ec885a37d40b6e6fb42e568590e509a24cbf78cc649ac24e23f1340dcd06e
|
||||||
|
size 910001
|
11
libsvm-java8.patch
Normal file
11
libsvm-java8.patch
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
--- libsvm-3.3/java/Makefile 2023-10-31 23:35:13.969018818 +0100
|
||||||
|
+++ libsvm-3.3/java/Makefile 2023-10-31 23:35:49.032582534 +0100
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
svm_train.class svm_predict.class svm_toy.class svm_scale.class
|
||||||
|
|
||||||
|
#JAVAC = jikes
|
||||||
|
-JAVAC_FLAGS = -target 1.7 -source 1.7
|
||||||
|
+JAVAC_FLAGS = -target 1.8 -source 1.8
|
||||||
|
JAVAC = javac
|
||||||
|
# JAVAC_FLAGS =
|
||||||
|
export CLASSPATH := .:$(CLASSPATH)
|
12
libsvm-reproducible-jar-mtime.patch
Normal file
12
libsvm-reproducible-jar-mtime.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
--- libsvm-3.3/java/Makefile 2024-09-26 17:44:00.135921357 +0200
|
||||||
|
+++ libsvm-3.3/java/Makefile 2024-09-26 17:46:18.746958191 +0200
|
||||||
|
@@ -11,7 +11,8 @@
|
||||||
|
export CLASSPATH := .:$(CLASSPATH)
|
||||||
|
|
||||||
|
all: $(FILES)
|
||||||
|
- jar cvf libsvm.jar *.class libsvm/*.class
|
||||||
|
+ jar --date="$$(date -u -d @$${SOURCE_DATE_EPOCH:-$$(date +%s)} +%Y-%m-%dT%H:%M:%SZ)" \
|
||||||
|
+ --create --verbose --file=libsvm.jar *.class libsvm/*.class
|
||||||
|
|
||||||
|
.java.class:
|
||||||
|
$(JAVAC) $(JAVAC_FLAGS) $<
|
111
libsvm.changes
Normal file
111
libsvm.changes
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 26 16:05:53 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* libsvm-reproducible-jar-mtime.patch
|
||||||
|
+ Use SOURCE_DATE_EPOCH for reproducible jar mtime
|
||||||
|
+ Applied if building with Java >= 17
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 1 10:07:24 UTC 2024 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- Use %autosetup macro. Allows to eliminate the usage of deprecated
|
||||||
|
%patchN
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 31 22:39:01 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* libsvm-java8.patch
|
||||||
|
+ Build with source and target levels 8
|
||||||
|
+ Fixes build with JDK 21
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 8 23:02:48 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- update to version 3.30
|
||||||
|
* Probabilistic outputs for one-class SVM are now supported.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 16 23:03:23 UTC 2021 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
- Fix build by adding missing python-rpm-macros dependency.
|
||||||
|
- Build Python bindings for current Python version.
|
||||||
|
- Make sure we're actually using the compiler flags.
|
||||||
|
- Fix shebangs.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 11 11:54:50 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- update to version 3.24
|
||||||
|
It conducts some minor fixes.
|
||||||
|
- Add conflicts for vpp-devel package, vpp provides a completely
|
||||||
|
unrelated libsvm.so as well (VM denoting Virtual Machine).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jul 7 00:35:54 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Fix errors in the description.
|
||||||
|
- Drop old defattr lines.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 5 20:42:09 UTC 2019 - Dirk Stoecker <opensuse@dstoecker.de>
|
||||||
|
|
||||||
|
- update to version 3.23
|
||||||
|
It conducts some minor fixes.
|
||||||
|
- Drop unneeded ncurses-devel requirement for devel package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 19 18:00:00 UTC 2017 - tzotsos@opensuse.org
|
||||||
|
|
||||||
|
- Update to version 3.22
|
||||||
|
* No changelog available
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 31 16:40:33 UTC 2015 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Update to version 3.21
|
||||||
|
* No changelog available
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 26 12:57:56 UTC 2015 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Update to version 3.20
|
||||||
|
* No Changelog available
|
||||||
|
- Fix Groups
|
||||||
|
- Split out the tools in a tools subpackage
|
||||||
|
- Package java tools into their own package
|
||||||
|
- Add build dependencies for java
|
||||||
|
* javapackages-tools
|
||||||
|
* java-devel
|
||||||
|
- Depend on java-devel instead of jave
|
||||||
|
- Remove depreciated %py_requires and %clean section
|
||||||
|
- Remove dependency on pkgconfig; the devel package doesn't contain
|
||||||
|
any pkgconfig file
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Apr 5 15:27:09 UTC 2014 - scorot@free.fr
|
||||||
|
|
||||||
|
- fix permissions of %%doc in libsvm2 package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 13 15:09:44 UTC 2014 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Update to 3.17
|
||||||
|
* no upstream changelog
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 7 18:25:49 UTC 2012 - scorot@free.fr
|
||||||
|
|
||||||
|
- add python in build requirements
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 7 18:03:49 UTC 2012 - scorot@free.fr
|
||||||
|
|
||||||
|
- repackgage python file into a python module package
|
||||||
|
- put liibrary into a separate package
|
||||||
|
- spec file reformating
|
||||||
|
- build with optflags
|
||||||
|
- fix license
|
||||||
|
- remove unneeded libtool from build requirements
|
||||||
|
|
176
libsvm.spec
Normal file
176
libsvm.spec
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
#
|
||||||
|
# spec file for package libsvm
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define libname libsvm3
|
||||||
|
%define fileversion 3.3
|
||||||
|
|
||||||
|
Summary: A Library for Support Vector Machines
|
||||||
|
License: BSD-3-Clause
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Name: libsvm
|
||||||
|
Version: 3.30
|
||||||
|
Release: 0
|
||||||
|
URL: https://www.csie.ntu.edu.tw/~cjlin/libsvm/
|
||||||
|
Source0: https://www.csie.ntu.edu.tw/~cjlin/libsvm/%{name}-%{fileversion}.tar.gz
|
||||||
|
Patch0: libsvm-java8.patch
|
||||||
|
Patch1: libsvm-reproducible-jar-mtime.patch
|
||||||
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: java-devel >= 1.8
|
||||||
|
BuildRequires: javapackages-tools
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
|
||||||
|
%description
|
||||||
|
LIBSVM is an integrated software for support vector classification,
|
||||||
|
(C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution
|
||||||
|
estimation (one-class SVM). It supports multi-class classification.
|
||||||
|
|
||||||
|
%package -n svm-tools
|
||||||
|
Summary: A set of tools to use with libsvm
|
||||||
|
Group: Development/Languages/C and C++
|
||||||
|
|
||||||
|
%description -n svm-tools
|
||||||
|
LIBSVM is an integrated software for support vector classification,
|
||||||
|
(C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution
|
||||||
|
estimation (one-class SVM). It supports multi-class classification.
|
||||||
|
|
||||||
|
%package -n %{libname}
|
||||||
|
Summary: A Library for Support Vector Machines
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n %{libname}
|
||||||
|
LIBSVM is an integrated software for support vector classification,
|
||||||
|
(C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and distribution
|
||||||
|
estimation (one-class SVM). It supports multi-class classification.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: C headers for developing programs with libsvm
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: %{libname} = %{version}
|
||||||
|
# VPP provides a libsvm.so installed in _libdir as well
|
||||||
|
Conflicts: vpp-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
This package contains the libraries and header files needed for
|
||||||
|
developing applications with libsvm.
|
||||||
|
|
||||||
|
%package -n %{python_prefix}-svm
|
||||||
|
Summary: Python bindings for libsvm
|
||||||
|
Group: Development/Languages/Python
|
||||||
|
Requires: gnuplot
|
||||||
|
Requires: svm-tools = %{version}
|
||||||
|
Provides: python-svm = %{version}-%{release}
|
||||||
|
Obsoletes: python-svm < %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n %{python_prefix}-svm
|
||||||
|
This package contains the Python bindings for libsvm.
|
||||||
|
|
||||||
|
%package java
|
||||||
|
Summary: Java bindings for libsvm
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
Requires: %{libname} = %{version}
|
||||||
|
Requires: java >= 1.6.0
|
||||||
|
Requires: javapackages-tools
|
||||||
|
Requires(post): javapackages-tools
|
||||||
|
Requires(postun): javapackages-tools
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description java
|
||||||
|
This package contains the Java bindings for libsvm.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -n %{name}-%{fileversion}
|
||||||
|
%patch -P 0 -p1
|
||||||
|
# The "--date" option was added into jar in OpenJDK 17
|
||||||
|
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
|
||||||
|
%patch -P 1 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%build
|
||||||
|
# We can't override CFLAGS, we have to patch the Makefile.
|
||||||
|
sed -i '
|
||||||
|
s/^CFLAGS = .*$/CFLAGS = %{optflags} -Wall -Wconversion -fPIC/g
|
||||||
|
s/$(CXX) $${SHARED_LIB_FLAG}/$(CXX) %{optflags} $${SHARED_LIB_FLAG}/g
|
||||||
|
' Makefile
|
||||||
|
make %{_smp_mflags} all lib
|
||||||
|
rm -f java/libsvm.jar
|
||||||
|
make -C java
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
mkdir -p %{buildroot}%{_javadir}
|
||||||
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
|
mkdir -p %{buildroot}%{_includedir}/libsvm
|
||||||
|
mkdir -p %{buildroot}%{python_sitelib}/svm
|
||||||
|
|
||||||
|
install -m 755 svm-train %{buildroot}%{_bindir}
|
||||||
|
install -m 755 svm-scale %{buildroot}%{_bindir}
|
||||||
|
install -m 755 svm-predict %{buildroot}%{_bindir}
|
||||||
|
install -m 755 ./tools/checkdata.py %{buildroot}%{_bindir}/svm-checkdata
|
||||||
|
install -m 755 ./tools/grid.py %{buildroot}%{_bindir}/svm-grid
|
||||||
|
install -m 755 ./tools/subset.py %{buildroot}%{_bindir}/svm-subset
|
||||||
|
install -m 755 ./tools/easy.py %{buildroot}%{_bindir}/svm-easy
|
||||||
|
install -m 644 svm.h %{buildroot}%{_includedir}/libsvm/
|
||||||
|
install -m 755 libsvm.so.3 %{buildroot}%{_libdir}
|
||||||
|
ln -s %{_libdir}/libsvm.so.3 %{buildroot}%{_libdir}/libsvm.so
|
||||||
|
mv ./python/README README-python
|
||||||
|
mv ./tools/README README-python-tools
|
||||||
|
|
||||||
|
# Don't use env in shebangs, and prefer the default Python.
|
||||||
|
# (https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors)
|
||||||
|
sed -i '1s|/usr/bin/env *|%{_bindir}/|;1s|/usr/bin/python$|%{_bindir}/python%python_bin_suffix|' \
|
||||||
|
%{buildroot}%{_bindir}/svm-*
|
||||||
|
|
||||||
|
install -m 644 -t %{buildroot}%{python_sitelib}/svm ./python/libsvm/*.py
|
||||||
|
|
||||||
|
# Remove unnecessary shebangs.
|
||||||
|
sed -i '/^#!\/usr\/bin\/env .*$/ d' %{buildroot}%{python_sitelib}/svm/*
|
||||||
|
|
||||||
|
install -m 755 ./java/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||||
|
|
||||||
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files -n svm-tools
|
||||||
|
%doc FAQ.html README
|
||||||
|
%{_bindir}/svm-train
|
||||||
|
%{_bindir}/svm-scale
|
||||||
|
%{_bindir}/svm-predict
|
||||||
|
|
||||||
|
%files -n %{libname}
|
||||||
|
%license COPYRIGHT
|
||||||
|
%{_libdir}/libsvm.so.3
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/libsvm
|
||||||
|
%{_libdir}/libsvm.so
|
||||||
|
|
||||||
|
%files -n %{python_prefix}-svm
|
||||||
|
%doc README-python README-python-tools
|
||||||
|
%{_bindir}/svm-checkdata
|
||||||
|
%{_bindir}/svm-grid
|
||||||
|
%{_bindir}/svm-subset
|
||||||
|
%{_bindir}/svm-easy
|
||||||
|
%{python_sitelib}/svm
|
||||||
|
|
||||||
|
%files java
|
||||||
|
%{_javadir}/%{name}.jar
|
||||||
|
|
||||||
|
%changelog
|
Reference in New Issue
Block a user