Accepting request 1204560 from Java:packages
Fix build after removal of the default %%{java_home} define OBS-URL: https://build.opensuse.org/request/show/1204560 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/aelfred?expand=0&rev=28
This commit is contained in:
commit
b19e59e0dd
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 29 19:43:31 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Fix build after removal of the default %%{java_home} define
|
||||||
|
- Refactor the spec file to actually build the jar and not just
|
||||||
|
to distribute the prebuilt one
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 20 10:02:33 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
Tue Feb 20 10:02:33 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||||
|
|
||||||
|
40
aelfred.spec
40
aelfred.spec
@ -22,11 +22,12 @@ Release: 0
|
|||||||
Summary: Java-based XML parser
|
Summary: Java-based XML parser
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
URL: http://saxon.sourceforge.net/aelfred.html
|
URL: https://saxon.sourceforge.net/aelfred.html
|
||||||
Source0: http://downloads.sourceforge.net/project/saxon/aelfred/7.0/aelfred7_0.zip
|
Source0: http://downloads.sourceforge.net/project/saxon/aelfred/7.0/aelfred7_0.zip
|
||||||
Patch0: aelfred-icedtea-build.patch
|
Patch0: aelfred-icedtea-build.patch
|
||||||
Patch1: aelfred-javadoc.patch
|
Patch1: aelfred-javadoc.patch
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: java-devel >= 1.8
|
BuildRequires: java-devel >= 1.8
|
||||||
BuildRequires: javapackages-tools
|
BuildRequires: javapackages-tools
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
@ -54,38 +55,35 @@ Demonstrations and samples for aelfred.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -c
|
%setup -q -c
|
||||||
|
rm *.jar
|
||||||
unzip %{name}-source.zip
|
unzip %{name}-source.zip
|
||||||
%patch -P 0
|
%patch -P 0
|
||||||
%patch -P 1 -p1
|
%patch -P 1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export JAVA_HOME=%{java_home}
|
mkdir -p classes
|
||||||
export PATH=%{java_home}/bin:$PATH
|
javac -source 8 -target 8 -d classes `find net -name \*.java`
|
||||||
export CLASSPATH=
|
javadoc -notimestamp -source 8 -d HTML `find net -name \*.java`
|
||||||
cd net
|
jar \
|
||||||
%{javac} -source 8 -target 8 `find . -name \*.java`
|
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
|
||||||
%{javadoc} -notimestamp -source 8 -d ../HTML `find . -name \*.java`
|
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
|
||||||
|
%endif
|
||||||
|
--create --file=%{name}.jar -C classes .
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# jar
|
# jar
|
||||||
export JAVA_HOME=%{java_home}
|
install -dm 0755 %{buildroot}%{_javadir}
|
||||||
cd net
|
install -pm 0644 %{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||||
mkdir -p %{buildroot}%{_javadir}
|
|
||||||
cp -a ../saxon-%{name}.jar \
|
|
||||||
%{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
||||||
(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do \
|
|
||||||
ln -s ${jar} ${jar/-%{version}/}; done)
|
|
||||||
# javadoc
|
# javadoc
|
||||||
mkdir -p %{buildroot}%{_javadocdir}/%{name}
|
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
cp -a ../HTML/* %{buildroot}%{_javadocdir}/%{name}
|
cp -a HTML/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%{_javadir}/%{name}.jar
|
||||||
%{_javadir}/*
|
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%defattr(0644,root,root,0755)
|
%{_javadocdir}/%{name}
|
||||||
%dir %{_javadocdir}/%{name}
|
|
||||||
%{_javadocdir}/%{name}/*
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user