drop java for platforms not in java_arches

This commit is contained in:
Michal Ambroz 2022-11-01 13:00:24 +01:00
parent 4a015f7148
commit 5a188602fc

View File

@ -47,8 +47,11 @@ disasm engine for binary analysis and reversing in the security community.}
BuildRequires: gcc
BuildRequires: make
BuildRequires: git
%ifarch %{java_arches}
BuildRequires: jna
BuildRequires: java-devel
%endif
%if %{with python2}
BuildRequires: python2
@ -114,7 +117,7 @@ The python%{python3_pkgversion}-capstone package contains python3 bindings for %
%endif
%ifarch %{java_arches}
%package java
Summary: Java bindings for %{name}
Requires: %{name} = %{version}-%{release}
@ -123,7 +126,7 @@ BuildArch: noarch
%description java
%{common_desc}
The %{name}-java package contains java bindings for %{name}.
%endif
%prep
@ -155,6 +158,7 @@ pushd bindings/python
%endif
popd
%ifarch %{java_arches}
# build java bindings needs some python
pushd bindings/java
%if %{with python3}
@ -163,6 +167,7 @@ pushd bindings/java
%make_build PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken
%endif
popd
%endif
@ -183,9 +188,10 @@ pushd bindings/python
%endif
popd
%ifarch %{java_arches}
# install java bindings
install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
%endif
%check
@ -227,13 +233,15 @@ make check LD_LIBRARY_PATH="`pwd`"
%endif
%ifarch %{java_arches}
%files java
%{_javadir}/
%endif
%changelog
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
- drop java binding for platforms not in %%{java_arches}
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.2-10
- Rebuilt for Python 3.11