From 175665310098cd249968448798f2a343774af5de915b55c9d32602650eea728e Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Thu, 10 Oct 2024 14:46:26 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/java-jwt?expand=0&rev=6 --- java-jwt-build.xml | 143 +++++++++++++++++++++++++++++++++++++++++++++ java-jwt.spec | 47 +++++++++------ 2 files changed, 172 insertions(+), 18 deletions(-) create mode 100644 java-jwt-build.xml diff --git a/java-jwt-build.xml b/java-jwt-build.xml new file mode 100644 index 0000000..5054486 --- /dev/null +++ b/java-jwt-build.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java-jwt.spec b/java-jwt.spec index d21103f..bff7c77 100644 --- a/java-jwt.spec +++ b/java-jwt.spec @@ -16,6 +16,9 @@ # +# The automatic requires would be java-headless >= 9, but the +# binaries are java 8 compatible +%define __requires_exclude java-headless Name: java-jwt Version: 4.4.0 Release: 0 @@ -24,12 +27,16 @@ License: MIT Group: Development/Libraries/Java URL: https://github.com/auth0/%{name} Source0: https://github.com/auth0/%{name}/archive/%{version}.tar.gz -Source1: https://repo1.maven.org/maven2/com/auth0/%{name}/%{version}/%{name}-%{version}.pom +Source1: %{name}-build.xml +Source2: https://repo1.maven.org/maven2/com/auth0/%{name}/%{version}/%{name}-%{version}.pom +BuildRequires: ant BuildRequires: fdupes -BuildRequires: java-devel >= 1.8 -BuildRequires: maven-local -BuildRequires: mvn(com.fasterxml.jackson.core:jackson-databind) -BuildRequires: mvn(commons-codec:commons-codec) +BuildRequires: jackson-annotations +BuildRequires: jackson-core +BuildRequires: jackson-databind +BuildRequires: java-devel >= 9 +BuildRequires: javapackages-local >= 6 +Requires: java-headless >= 1.8 BuildArch: noarch %description @@ -44,27 +51,31 @@ API documentation for the Logback library %prep %setup -q -cp %{SOURCE1} lib/pom.xml - -%pom_xpath_remove pom:dependency/pom:scope lib -find lib -name module-info.java -print -delete +cp %{SOURCE1} lib/build.xml %build -pushd lib -%{mvn_build} -f -popd +mkdir -p lib/lib +build-jar-repository -s lib/lib jackson-annotations jackson-core jackson-databind +ant -f lib/build.xml jar javadoc %install -pushd lib -%mvn_install -%fdupes -s %{buildroot}%{_javadocdir} -popd +install -dm 0755 %{buildroot}%{_javadir} +install -pm 0644 lib/target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar -%files -f lib/.mfiles +install -dm 0755 %{buildroot}%{_mavenpomdir} +%{mvn_install_pom} %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}.pom +%add_maven_depmap %{name}.pom %{name}.jar + +install -dm 0755 %{buildroot}%{_javadocdir} +cp -r lib/target/site/apidocs %{buildroot}%{_javadocdir}/%{name} +%fdupes -s %{buildroot}%{_javadocdir} + +%files -f .mfiles %license LICENSE %doc README.md -%files javadoc -f lib/.mfiles-javadoc +%files javadoc +%{_javadocdir}/%{name} %license LICENSE %changelog