1
0

Compare commits

...

3 Commits

2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 24 14:07:03 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use SOURCE_DATE_EPOCH for reproducible jar mtime
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 4 10:38:56 UTC 2020 - Fridrich Strba <fstrba@suse.com> Wed Mar 4 10:38:56 UTC 2020 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package opennlp-tokenize-models # spec file for package opennlp-tokenize-models
# #
# Copyright (c) 2020 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -24,8 +24,8 @@ License: Apache-2.0
URL: https://opennlp.sourceforge.net URL: https://opennlp.sourceforge.net
Source0: https://repo1.maven.org/maven2/edu/washington/cs/knowitall/%{name}/%{version}/%{name}-%{version}-sources.jar 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 Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
BuildRequires: java-devel BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local BuildRequires: javapackages-local >= 6
BuildRequires: unzip BuildRequires: unzip
BuildArch: noarch BuildArch: noarch
@ -38,7 +38,11 @@ cp %{SOURCE1} LICENSE
%pom_remove_parent %pom_remove_parent
%build %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 %install
# jar # jar
@ -46,7 +50,7 @@ install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar install -pm 0644 %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
# pom # pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} 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 %add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
%files -f .mfiles %files -f .mfiles