%endif
%if 0%{?fedora} || 0%{?rhel}
%bcond_without selinux
-%if 0%{?rhel} >= 8
-%bcond_with cephfs_java
-%else
%bcond_without cephfs_java
-%endif
%bcond_without amqp_endpoint
%bcond_without kafka_endpoint
%bcond_without lttng
Requires(post): binutils
%if 0%{with cephfs_java}
BuildRequires: java-devel
+BuildRequires: jpackage-utils
BuildRequires: sharutils
%endif
%if 0%{with selinux}
-DWITH_TESTS:BOOL=OFF \
%endif
%if 0%{with cephfs_java}
+ -DJAVA_HOME=%{java_home} \
+ -DJAVA_LIB_INSTALL_DIR=%{_jnidir} \
-DWITH_CEPHFS_JAVA:BOOL=ON \
%endif
%if 0%{with selinux}
# before EPEL8 and PowerTools provide all dependencies, we use sepia for the dependencies
$SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
$SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save
+ $SUDO dnf -y module enable javapackages-tools
elif test $ID = rhel -a $MAJOR_VERSION = 8 ; then
$SUDO subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
$SUDO dnf config-manager --add-repo http://apt-mirror.front.sepia.ceph.com/lab-extras/8/
$SUDO dnf config-manager --setopt=apt-mirror.front.sepia.ceph.com_lab-extras_8_.gpgcheck=0 --save
+ $SUDO dnf -y module enable javapackages-tools
fi
;;
esac