## START: Set by rpmautospec ## (rpmautospec version 0.7.2) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: ghost4j Version: 1.0.5 Release: %autorelease Summary: Java wrapper for Ghostscript C API + PS/PDF document handling API License: LGPL 3.0 URL: http://www.ghost4j.org/ BuildArch: noarch ExclusiveArch: %{java_arches} noarch Source0: https://github.com/zippy1978/ghost4j/archive/%{version}/%{name}-%{version}.tar.gz %if 0%{?fedora} < 40 || (0%{?rhel} && 0%{?rhel} < 10) BuildRequires: maven-local-openjdk11 %else BuildRequires: maven-local %endif BuildRequires: ghostscript BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) BuildRequires: mvn(junit:junit) BuildRequires: mvn(log4j:log4j) BuildRequires: mvn(commons-beanutils:commons-beanutils) BuildRequires: mvn(com.github.librepdf:openpdf) BuildRequires: mvn(net.java.dev.jna:jna) BuildRequires: mvn(org.apache.xmlgraphics:xmlgraphics-commons) Requires: ghostscript %description Ghost4J binds the Ghostscript C API to bring Ghostscript power to the Java world. It also provides a high-level API to handle PDF and Postscript documents with objects. %{?javadoc_package} %prep %autosetup -p1 # Swap itext with openpdf %pom_remove_dep com.lowagie:itext %pom_add_dep com.github.librepdf:openpdf %pom_xpath_remove "pom:build/pom:extensions" %pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin # Fix compatibility with jna 5.0.0+ sed -i 's/import com.sun.jna.Pointer;/import com.sun.jna.Pointer;\nimport com.sun.jna.Native;/' src/main/java/org/ghost4j/Ghostscript.java sed -i 's/Pointer.SIZE/Native.POINTER_SIZE/' src/main/java/org/ghost4j/Ghostscript.java sed -i 's/?/String/' src/main/java/org/ghost4j/GhostscriptLibrary.java sed -i 's/win32.StdCallLibrary.StdCallCallback/Callback/' src/main/java/org/ghost4j/GhostscriptLibrary.java sed -i 's/StdCallCallback/Callback/' src/main/java/org/ghost4j/GhostscriptLibrary.java %pom_xpath_set //pom:source 1.8 %pom_xpath_set //pom:target 1.8 %build # Test are broken # ...it would be nice to fix them %mvn_build -f %install %mvn_install %files -f .mfiles %license LICENSE %doc README.md %changelog ## START: Generated by rpmautospec * Fri Oct 11 2024 Luca Magrone - 1.0.5-1 - Initial package release ## END: Generated by rpmautospec