1
0

Compare commits

...

2 Commits

2 changed files with 23 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 24 05:22:54 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use SOURCE_DATE_EPOCH for reproducible builds
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 21 12:18:00 UTC 2022 - Fridrich Strba <fstrba@suse.com> Mon Mar 21 12:18:00 UTC 2022 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
# #
# spec file for package juniversalchardet # spec file for package juniversalchardet
# #
# Copyright (c) 2021 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
@ -30,7 +30,7 @@ Source3: README.txt
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: java-devel >= 1.8 BuildRequires: java-devel >= 1.8
BuildRequires: java-javadoc >= 1.8 BuildRequires: java-javadoc >= 1.8
BuildRequires: javapackages-local BuildRequires: javapackages-local >= 6
BuildArch: noarch BuildArch: noarch
%description %description
@ -54,9 +54,22 @@ cp %{SOURCE3} .
%build %build
mkdir -p target/classes mkdir -p target/classes
javac -source 8 -target 8 -encoding UTF-8 -sourcepath src/main/java -d target/classes $(find src/main/java -name \*.java) javac \
jar -cvf %{name}-%{version}.jar -C target/classes . %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
--release 8 \
%else
-source 8 -target 8 \
%endif
-encoding UTF-8 -sourcepath src/main/java -d target/classes $(find src/main/java -name \*.java)
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 -C target/classes .
javadoc -source 8 -encoding UTF-8 \ javadoc -source 8 -encoding UTF-8 \
-notimestamp \
-d target/apidocs \ -d target/apidocs \
-sourcepath src/main/java \ -sourcepath src/main/java \
-link file://%{_javadocdir}/java \ -link file://%{_javadocdir}/java \
@ -68,7 +81,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 %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom %{mvn_install_pom} %{SOURCE1} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar %add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar
# javadoc # javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name} install -dm 0755 %{buildroot}%{_javadocdir}/%{name}