From ca8ae54fc8a8dac01d1907736b122779a4335025667f24993dfc547b29874e00 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 24 Sep 2024 14:05:20 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/opennlp-postag-models?expand=0&rev=3 --- opennlp-postag-models.changes | 5 +++++ opennlp-postag-models.spec | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/opennlp-postag-models.changes b/opennlp-postag-models.changes index f4d94fe..13b4961 100644 --- a/opennlp-postag-models.changes +++ b/opennlp-postag-models.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 24 14:05:15 UTC 2024 - Fridrich Strba + +- Use SOURCE_DATE_EPOCH for reproducible jar mtime + ------------------------------------------------------------------- Wed Mar 4 10:42:01 UTC 2020 - Fridrich Strba diff --git a/opennlp-postag-models.spec b/opennlp-postag-models.spec index 2b58987..62a2655 100644 --- a/opennlp-postag-models.spec +++ b/opennlp-postag-models.spec @@ -1,7 +1,7 @@ # # spec file for package opennlp-postag-models # -# Copyright (c) 2020 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 @@ -25,7 +25,7 @@ URL: https://opennlp.sourceforge.net Source0: https://repo1.maven.org/maven2/edu/washington/cs/knowitall/%{name}/%{version}/%{name}-%{version}-sources.jar Source1: http://www.apache.org/licenses/LICENSE-2.0.txt BuildRequires: java-devel -BuildRequires: javapackages-local +BuildRequires: javapackages-local >= 6 BuildRequires: unzip BuildArch: noarch @@ -38,7 +38,11 @@ cp %{SOURCE1} LICENSE %pom_remove_parent %build -jar -cf %{name}-%{version}.jar *.bin +jar --create --verbose \ +%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0} + --date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \ +%endif + --file=%{name}-%{version}.jar *.bin %install # jar @@ -46,7 +50,7 @@ install -dm 0755 %{buildroot}%{_javadir}/%{name} install -pm 0644 %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar # pom install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} -install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom +%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom %add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar %files -f .mfiles From dc7f3000e0efc281837b08dc50ed6ef8e704db691eafd5f35ba92112149ec9d6 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 24 Sep 2024 14:31:19 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/opennlp-postag-models?expand=0&rev=4 --- opennlp-postag-models.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opennlp-postag-models.spec b/opennlp-postag-models.spec index 62a2655..65df83c 100644 --- a/opennlp-postag-models.spec +++ b/opennlp-postag-models.spec @@ -24,7 +24,7 @@ License: Apache-2.0 URL: https://opennlp.sourceforge.net Source0: https://repo1.maven.org/maven2/edu/washington/cs/knowitall/%{name}/%{version}/%{name}-%{version}-sources.jar Source1: http://www.apache.org/licenses/LICENSE-2.0.txt -BuildRequires: java-devel +BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local >= 6 BuildRequires: unzip BuildArch: noarch