# # spec file for package bytecoder # # 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/ # %global git_tag 2023-12-01 Name: bytecoder Version: 20231201 Release: 0 Summary: JVM to JavaScript, OpenCL and WebAssembly Transpiler License: Apache-2.0 Group: Development/Libraries/Java URL: https://www.mirkosertic.de/blog/2017/06/compiling-bytecode-to-javascript/ Source0: https://github.com/mirkosertic/Bytecoder/archive/refs/tags/%{git_tag}.tar.gz Source1: %{name}.pod BuildRequires: fdupes BuildRequires: maven-local BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(commons-io:commons-io) BuildRequires: mvn(info.picocli:picocli) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.commons:commons-text) BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.apache.maven:maven-artifact) BuildRequires: mvn(org.apache.maven:maven-core) BuildRequires: mvn(org.apache.maven:maven-plugin-api) BuildRequires: mvn(org.codehaus.plexus:plexus-utils) BuildRequires: mvn(org.jocl:jocl) BuildRequires: mvn(org.ow2.asm:asm-analysis) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-jdk14) %description Bytecoder is a Rich Domain Model for Java Bytecode and Framework to interpret and transpile it to other languages such as JavaScript, OpenCL or WebAssembly. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML BuildArch: noarch %description javadoc API documentation for %{name}. %prep %setup -q -n Bytecoder-%{git_tag} %pom_disable_module integrationtest %pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin %pom_remove_plugin :maven-source-plugin %pom_remove_plugin org.jetbrains.kotlin:kotlin-maven-plugin core %pom_remove_plugin org.springframework.boot:spring-boot-maven-plugin cli %pom_remove_dep org.seleniumhq.selenium:selenium-chrome-driver core %pom_remove_dep org.testcontainers:selenium core %pom_change_dep com.google.guava:guava com.google.guava:guava:any . maven rm -rf core/src/main/java/de/mirkosertic/bytecoder/core/test/UnitTestRunner.java %build %{mvn_build} -f -- \ -Dproject.build.outputTimestamp=$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ) \ -Dsource=8 pod2man --release='%{name} %{version}' --section=1 --center='User Commands' --quotes=none %{SOURCE1} %{name}.1 %install %mvn_install %fdupes %{buildroot}%{_javadocdir}/%{name} %define jars \ %{name}:\ picocli:\ slf4j:\ jackson-databind:\ jackson-core:\ jackson-annotations:\ objectweb-asm:\ apache-commons-lang3:\ apache-commons-io:\ apache-commons-text:\ jocl %jpackage_script de.mirkosertic.bytecoder.cli.BytecoderCLI "" "" "%{jars}" %{name} true install -dm0755 %{buildroot}%{_mandir}/man1 install -m0644 %{name}.1 %{buildroot}%{_mandir}/man1 %files -f .mfiles %license LICENSE %doc README.md %{_bindir}/%{name} %{_mandir}/man1/%{name}.1%{?ext_man} %files javadoc -f .mfiles-javadoc %license LICENSE %changelog