Skip to content

Commit

Permalink
Linux: Adjust JDK dependencies for RPM build
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/davmail/code/trunk@3489 3d1905a2-6b24-0410-a738-b14d5a86fcbd
  • Loading branch information
mguessan committed Nov 14, 2023
1 parent 7a13cf7 commit 07480a8
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions davmail.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: ant >= 1.7.1, desktop-file-utils
%{?fedora:BuildRequires: lua}
# required to define _unitdir macro
%{?fedora:BuildRequires: systemd}
%{?el7:BuildRequires: systemd}
%{?el8:BuildRequires: systemd}
# same on suse
%if %systemd_macros
BuildRequires: systemd-rpm-macros
%endif
Expand All @@ -21,31 +25,48 @@ BuildRequires: systemd-rpm-macros
# missing ant dep on original Fedora 18
BuildRequires: xml-commons-apis
%endif
# force Java 7 on RHEL6
%{?el6:BuildRequires: java-1.8.0-openjdk-devel}
%if 0%{?el7} || 0%{?el8} || 0%{?fedora}

%{?fedora:BuildRequires: java-latest-openjdk-devel}

%if 0%{?el7} || 0%{?el8}
BuildRequires: java-1.8.0-openjdk-devel
%else
%endif

%if 0%{?el6}
BuildRequires: java-1.8.0-openjdk-devel
BuildRequires: java-devel >= 1.8.0
BuildRequires: eclipse-swt
%endif

%if 0%{?is_opensuse} || 0%{?suse_version}
BuildRequires: java-devel >= 1.8.0
BuildRequires: eclipse-swt
%endif

# compile with JavaFX on Fedora
%if 0%{?fedora} > 25
BuildRequires: javafx
%if 0%{?fedora} > 38
BuildRequires: openjfx
%endif

Requires: coreutils
Requires: filesystem
Requires(pre): /usr/sbin/useradd, /usr/sbin/groupadd
Requires(post): coreutils, filesystem
Requires(preun): /sbin/service, coreutils, /usr/sbin/userdel, /usr/sbin/groupdel
Requires(postun): /sbin/service

%if 0%{?el7} || 0%{?el8} || 0%{?fedora}
Requires: /etc/init.d, logrotate, java-1.8.0-openjdk
%else
%{?fedora:Requires: java-latest-openjdk}
%if 0%{?el7} || 0%{?el8}
Requires: java-1.8.0-openjdk
%endif
%if 0%{?el6}
Requires: /etc/init.d, logrotate, jre >= 1.8.0
Requires: eclipse-swt
%endif
%if 0%{?is_opensuse} || 0%{?suse_version}
Requires: jre >= 1.8.0
Requires: eclipse-swt
%endif

Source0: %{name}-src-%{version}.tgz

Expand Down

0 comments on commit 07480a8

Please sign in to comment.