Skip to content

Commit a7854e0

Browse files
committed
scripts/obs/nut.spec: more constraints about what is available in what distro versions [#1209]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent b828fcb commit a7854e0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/obs/nut.spec

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ BuildRequires: avahi-devel
167167
%define NUTPKG_WITH_AVAHI 0
168168
%endif
169169

170-
%if ( 0%{?rhel_version}>=800 || ! 0%{?rhel_version} ) && ( 0%{?rhel}>=8 || ! 0%{?rhel} ) && ( 0%{?sle_version}>=150000 || ! 0%{?sle_version} ) && ( 0%{?suse_version}>=1300 || ! 0%{?suse_version} )
170+
%if ( ! 0%{?rhel_version} ) && ( ! 0%{?rhel} ) && ( 0%{?sle_version}>=150000 || ! 0%{?sle_version} ) && ( 0%{?suse_version}>=1300 || ! 0%{?suse_version} )
171+
# Not sure why claimed absent in RHEL (even with Fedora/EPEL repo layer added)
171172
%define NUTPKG_WITH_FREEIPMI 1
172173
BuildRequires: (libfreeipmi-devel or freeipmi-devel)
173174
%else
@@ -231,7 +232,8 @@ BuildRequires: (httpd-devel or apache2-devel)
231232

232233
BuildRequires: (dbus-1-glib-devel or dbus-glib-devel)
233234

234-
%if ( 0%{?rhel_version}>=800 || ! 0%{?rhel_version} ) && ( 0%{?rhel}>=8 || ! 0%{?rhel} )
235+
%if ( (0%{?rhel_version}>0 && 0%{?rhel_version}<800) || ! 0%{?rhel_version} ) && ( (0%{?rhel}>0 && 0%{?rhel}<8) || ! 0%{?rhel} )
236+
# Strange that this is not present in RHEL8 (even with Fedora EPEL repos attached)
235237
BuildRequires: (libcppunit-devel or cppunit-devel)
236238
%endif
237239

@@ -271,11 +273,13 @@ BuildRequires: powerman-devel
271273
BuildRequires: systemd-rpm-macros
272274
%endif
273275

276+
%if ( 0%{?rhel_version}>=800 || ! 0%{?rhel_version} ) && ( 0%{?rhel}>=8 || ! 0%{?rhel} )
274277
# Only needed for PDF generation, we do not package that now
275278
#BuildRequires: dblatex
276279

277280
BuildRequires: (libxslt-tools or libxslt)
278281
BuildRequires: asciidoc
282+
%endif
279283

280284
%if 0%{?opensuse_version}
281285
# Package provides driver for USB HID UPSes, but people can live with hal addon:

0 commit comments

Comments
 (0)