# # spec file for package javacpp # # 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/ # Name: javacpp Version: 1.5.10 Release: 0 Summary: The missing bridge between Java and native C++ License: Apache-2.0 Group: Development/Libraries/Java URL: https://github.com/bytedeco/%{name} Source0: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch0: %{name}-manifest.patch BuildRequires: fdupes BuildRequires: java-devel >= 1.8 BuildRequires: maven-local BuildRequires: mvn(biz.aQute.bnd:bnd-maven-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.moditect:moditect-maven-plugin) %description JavaCPP provides efficient access to native C++ inside Java, not unlike the way some C/C++ compilers interact with assembly language. No need to invent new languages such as with SWIG, SIP, C++/CLI, Cython, or RPython. Instead, similar to what cppyy strives to do for Python, it exploits the syntactic and semantic similarities between Java and C++. Under the hood, it uses JNI, so it works with all implementations of Java SE, in addition to Android, Avian, and RoboVM (instructions). %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML %description javadoc API documentation for %{name}. %prep %setup -q %patch -P 0 -p1 sed -i 's/\r//' *.md %pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin %pom_remove_plugin :maven-source-plugin %pom_remove_plugin biz.aQute.bnd:bnd-baseline-maven-plugin %pom_remove_plugin -r :maven-assembly-plugin %pom_remove_plugin :maven-javadoc-plugin %pom_xpath_set 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration/pom:source' 8 %pom_xpath_set 'pom:plugin[pom:artifactId="maven-compiler-plugin"]/pom:configuration/pom:target' 8 %pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-plugin-plugin']/pom:configuration" " javacpp" %{mvn_file} : %{name} %build %{mvn_build} -f -- \ -Dsource=8 %install %mvn_install %fdupes %{buildroot}%{_javadocdir}/%{name} %files -f .mfiles %license LICENSE.txt %doc {CHANGELOG,README}.md %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog