From b669e8a43a4c745c3e9ac1ea6c9f3816dda0665406dfa87ed38041f9e237f439 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 21 Feb 2024 09:10:53 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Java:packages/hamcrest?expand=0&rev=54 --- hamcrest.changes | 5 +++++ hamcrest.spec | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/hamcrest.changes b/hamcrest.changes index 2eccd3e..cb36bf9 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 21 09:10:46 UTC 2024 - Fridrich Strba + +- Use %patch -P N instead of deprecated %patchN. + ------------------------------------------------------------------- Thu Jun 9 16:00:32 UTC 2022 - Fridrich Strba diff --git a/hamcrest.spec b/hamcrest.spec index ff21fcc..bc535fa 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,7 +1,7 @@ # # spec file for package hamcrest # -# Copyright (c) 2022 SUSE LLC +# 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 @@ -33,14 +33,14 @@ Patch0: 0001-Fix-build-with-OpenJDK-11.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: java-devel >= 1.8 -BuildRequires: javapackages-local -%if %{with tests} -BuildRequires: ant-junit -%endif +BuildRequires: javapackages-local >= 6 Provides: %{name}-core = %{version} Obsoletes: %{name}-core < %{version} Obsoletes: %{name}-demo < %{version} BuildArch: noarch +%if %{with tests} +BuildRequires: ant-junit +%endif %description Provides a library of matcher objects (also known as constraints or @@ -56,14 +56,14 @@ Group: Documentation/HTML Javadoc for %{name}. %prep -%setup -q -n %{name}-%{version} +%setup -q cp %{SOURCE1} build.xml cp %{SOURCE3} %{SOURCE4} . -%patch0 -p2 +%patch -P 0 -p2 %build -%ant \ +%{ant} \ %if %{without tests} -Dtest.skip=true \ %endif @@ -79,7 +79,7 @@ ln -sf %{name}.jar %{buildroot}%{_javadir}/%{name}/library.jar # poms install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} -install -pm 0644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom +%{mvn_install_pom} %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom %add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar -a "org.hamcrest:hamcrest-all,org.hamcrest:hamcrest-core,org.hamcrest:hamcrest-library" # javadoc