# # spec file for package jwebassembly-compiler # # Copyright (c) 2023 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: jwebassembly-compiler Version: 0.4 Release: 0 Summary: Java bytecode to WebAssembly compiler License: Apache-2.0 Group: Development/Libraries/Java URL: https://github.com/i-net-software/JWebAssembly Source0: %{url}/archive/refs/tags/v%{version}.tar.gz Source1: https://repo1.maven.org/maven2/de/inetsoftware/%{name}/%{version}/%{name}-%{version}.pom BuildRequires: maven-local BuildRequires: mvn(com.google.code.findbugs:jsr305) BuildRequires: mvn(de.inetsoftware:jwebassembly-api) %description JWebAssembly is a Java bytecode to WebAssembly compiler. It uses Java class files as input. That it can compile any language that compile to Java bytecode like Clojure, Groovy, JRuby, Jython, Kotlin and Scala. As output it generates the binary format (.wasm file) or the text format (.wat file). The target is to run Java natively in the browser with WebAssembly. The difference to similar projects is that not a complete VM with GC and memory management should be ported. It’s more like a 1:1 conversion. The generated WebAssembly code is similar in size to the original Java class files. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML BuildArch: noarch %description javadoc API documentation for %{name}. %prep %setup -q -n JWebAssembly-%{version} cp %{SOURCE1} pom.xml mkdir -p src/main/java mv src/de src/main/java %pom_add_plugin org.apache.maven.plugins:maven-jar-plugin \ ' JWebAssembly-Compiler i-net software %{version} JWebAssembly-Compiler i-net software %{version} ' %pom_add_dep com.google.code.findbugs:jsr305 %pom_add_dep de.inetsoftware:jwebassembly-api %{mvn_file} : jwebassembly/%{name} %build %{mvn_build} -f -- \ -Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \ -Dmaven.compiler.{source,target}=8 %install %mvn_install %files -f .mfiles %license LICENSE.txt %doc README.md %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog