Allow building with java > 1.8 OBS-URL: https://build.opensuse.org/request/show/1265235 OBS-URL: https://build.opensuse.org/package/show/Java:packages/jblas?expand=0&rev=2
92 lines
2.9 KiB
RPMSpec
92 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package jblas
|
|
#
|
|
# Copyright (c) 2025 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/
|
|
#
|
|
|
|
|
|
%{?!make_build:%global make_build make -O %{?_smp_mflags}}
|
|
%global lapack_version 3.11.0
|
|
Name: jblas
|
|
Version: 1.2.5
|
|
Release: 0
|
|
Summary: Linear Algebra for Java
|
|
License: BSD-3-Clause
|
|
Group: Development/Libraries/Java
|
|
URL: https://jblas.org/
|
|
Source0: https://github.com/jblas-project/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz
|
|
Patch0: %{name}-javah.patch
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-fortran
|
|
BuildRequires: java-devel >= 1.8
|
|
BuildRequires: lapack-devel
|
|
BuildRequires: maven-local
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: ruby
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
|
|
|
%description
|
|
jblas is a matrix library for Java which uses existing high performance BLAS
|
|
and LAPACK libraries like ATLAS.
|
|
|
|
%package javadoc
|
|
Summary: API documentation for %{name}
|
|
Group: Documentation/HTML
|
|
BuildArch: noarch
|
|
|
|
%description javadoc
|
|
API documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{name}-%{version}
|
|
|
|
# Port to Java 8+
|
|
%patch -P 0 -p1
|
|
%pom_xpath_set "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:source" "1.8"
|
|
%pom_xpath_set "pom:plugin[pom:artifactId[text()='maven-compiler-plugin']]/pom:configuration/pom:target" "1.8"
|
|
|
|
sed -i -e 's/^LAPACK_REQUIRED_SYMBOLS = .*/LAPACK_REQUIRED_SYMBOLS = []/' config/config_libs.rb
|
|
|
|
find src/main/resources/lib/static/Linux/ -name \*.so -delete
|
|
find src/main/resources/lib/static/Windows/ -name \*.dll -delete
|
|
find src/main/resources/lib/static/'Mac OS X'/ -name \*.jnilib -delete
|
|
|
|
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
|
|
%pom_remove_plugin :maven-source-plugin
|
|
%pom_remove_plugin :maven-javadoc-plugin
|
|
|
|
%pom_xpath_replace pom:tasks '<target><ant target="generate-float"/></target>'
|
|
|
|
%{mvn_file} : %{name}
|
|
|
|
%build
|
|
# FIXME: you should use the %%configure macro
|
|
./configure
|
|
%make_build all
|
|
%{mvn_build} -f -- \
|
|
-Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)
|
|
|
|
%install
|
|
%mvn_install
|
|
%fdupes %{buildroot}%{_javadocdir}/%{name}
|
|
|
|
%files -f .mfiles
|
|
%license COPYING
|
|
%doc AUTHORS BUGS README.md
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
%license COPYING
|
|
|
|
%changelog
|