%global tar_version 4.5.1.20230728git33a1eea8 Name: java-ovirt-engine-sdk4 Version: 4.5.1 Release: 1.20230728git33a1eea8%{?dist} Summary: Java SDK for version 4 of the oVirt Engine API Group: Development/Languages License: ASL 2.0 URL: http://ovirt.org/wiki/SDK # This should be a tar file containing the generated source code of the # SDK, as we can't build and run the generator with the packages # available in the distribution: Source0: ovirt-engine-sdk-java-%{tar_version}.tar.gz # This file is used to perform the build using Ant, because the upstream # project has build dependencies that make it impossible to build it # with the packages available in the distribution: Source1: build.xml # This file is used to transform the upstream 'pom.xml' file into a # 'pom-nodeps.xml' file that doesn't have the dependencies of the # code generator, as those aren't available in the distribution: Source2: transform-pom.xsl BuildArch: noarch BuildRequires: ant BuildRequires: javapackages-local BuildRequires: mvn(org.apache.httpcomponents:httpclient) BuildRequires: mvn(org.apache.httpcomponents:httpcore) BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) BuildRequires: mvn(com.fasterxml.jackson.core:jackson-core) BuildRequires: mvn(com.fasterxml.jackson.core:jackson-annotations) BuildRequires: mvn(org.slf4j:slf4j-api) %description This package contains the Java SDK for version 4 of the oVirt Engine API. %prep # Extract the source: %setup -q -n ovirt-engine-sdk-java-%{tar_version} %build # Copy the files required for the Ant build to the extracted SDK # directory: cp %{SOURCE1} %{SOURCE2} . # Populate the lib directory with symlinks to the required dependencies that # will be used to create the compiler classpath: mkdir lib while read jar do ln -s %{_javadir}/${jar}.jar lib done << __EOF__ httpcomponents/httpclient httpcomponents/httpcore jackson/jackson-databind jackson/jackson-core jackson/jackson-annotations slf4j/api __EOF__ # Perform build using Ant: java -jar %{_javadir}/ant-launcher.jar -f build.xml %install # Install the POM without dependencies created during the build process # and the .jar file: %mvn_artifact pom-nodeps.xml target/%{name}.jar %mvn_install %files -f .mfiles %dir %{_javadir}/%{name} %doc README.adoc %license LICENSE.txt %changelog * Wed May 22 2019 Sandro Bonazzola - 4.3.0 - Rebase on 4.3.0 for fc29 support * Thu Apr 7 2016 Juan Hernandez - 4.0.0 - Initial packaging.