# # spec file for package jsvg # # 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/ # %global version_base 2.0.0 %global version_suffix rc5 Name: jsvg Version: %{version_base}~%{version_suffix} Release: 0 Summary: Java SVG renderer License: MIT Group: Development/Libraries/Java URL: https://github.com/weisJ/%{name} Source0: %{url}/archive/refs/tags/v%{version_base}-%{version_suffix}.tar.gz Source1: https://repo1.maven.org/maven2/com/github/weisj/%{name}/%{version_base}/%{name}-%{version_base}.pom BuildRequires: fdupes BuildRequires: java-devel >= 9 BuildRequires: jurand BuildRequires: maven-local BuildRequires: mvn(com.google.errorprone:error_prone_annotations) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.jetbrains:annotations) BuildArch: noarch %description JSVG is an SVG user agent using AWT graphics. Its aim is to provide a small and fast implementation. This library is under active development and doesn’t yet support all features of the SVG specification, some of which it decidedly won’t support at all. This implementation only tries to be a static user agent meaning it won’t support any scripting languages or interaction. Animations aren’t currently implemented but are planned to be supported. This library aims to be as lightweight as possible. Generally JSVG uses ~50% less memory than svgSalamander and ~98% less than Batik. %package javadoc Summary: API documentation for %{name} Group: Documentation/HTML %description javadoc API documentation for %{name}. %prep %autosetup -n %{name}-%{version_base}-%{version_suffix} cp %{SOURCE1} %{name}/pom.xml %pom_add_dep org.jetbrains:annotations %{name} %pom_add_dep com.google.errorprone:error_prone_annotations %{name} jurand -i -a -n Sealed \ jsvg/src/main/java/com/github/weisj/jsvg/attributes/{value,font/FontStyle.java} %pom_add_plugin org.apache.maven.plugins:maven-compiler-plugin %{name} \ ' compile-java-8 compile 8 8 compile-java-9 compile compile 9 ${project.basedir}/src/main/module ' %pom_xpath_inject pom:project 'bundle' %{name} %pom_add_plugin org.apache.felix:maven-bundle-plugin %{name} \ 'true com.github.weisj.%{name} <_exportcontents> com.github.weisj.%{name}, com.github.weisj.%{name}.paint, com.github.weisj.%{name}.parser, com.github.weisj.%{name}.parser.css, com.github.weisj.%{name}.parser.resources, com.github.weisj.%{name}.provider, com.github.weisj.%{name}.renderer, com.github.weisj.%{name}.renderer.animation, com.github.weisj.%{name}.renderer.awt, com.github.weisj.%{name}.renderer.output, com.github.weisj.%{name}.ui, com.github.weisj.%{name}.view, !com.google.errorprone.annotations, * <_removeheaders>Private-Package,Tool bundle-manifest process-classes manifest ' mkdir jsvg/src/main/module cat >jsvg/src/main/module/module-info.java <<__JAVA__ open module com.github.weisj.jsvg { requires org.jetbrains.annotations; requires static com.google.errorprone.annotations; requires java.base; requires transitive java.desktop; requires java.logging; requires transitive java.xml; exports com.github.weisj.jsvg; exports com.github.weisj.jsvg.paint; exports com.github.weisj.jsvg.parser; exports com.github.weisj.jsvg.parser.css; exports com.github.weisj.jsvg.parser.resources; exports com.github.weisj.jsvg.renderer; exports com.github.weisj.jsvg.renderer.animation; exports com.github.weisj.jsvg.renderer.awt; exports com.github.weisj.jsvg.renderer.output; exports com.github.weisj.jsvg.ui; exports com.github.weisj.jsvg.view; } __JAVA__ %{mvn_file} : %{name} %build pushd %{name} %{mvn_build} -f popd %install pushd %{name} %mvn_install %fdupes %{buildroot}%{_javadocdir}/%{name} popd %files -f %{name}/.mfiles %license LICENSE %doc {CONTRIBUTING,README}.md %files javadoc -f %{name}/.mfiles-javadoc %license LICENSE %changelog