Skip to content

Commit bf3fd2a

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 bf3fd2a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

scripts/obs/nut.spec

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,16 @@ BuildRequires: dos2unix
159159
BuildRequires: fdupes
160160
%endif
161161

162-
%if ( 0%{?rhel_version}>=800 || ! 0%{?rhel_version} ) && ( 0%{?rhel}>=8 || ! 0%{?rhel} )
162+
%if ( ! 0%{?rhel_version} ) && ( ! 0%{?rhel} )
163163
# Not sure why claimed absent in RHEL7 (even with Fedora/EPEL repo layer added)
164164
%define NUTPKG_WITH_AVAHI 1
165165
BuildRequires: avahi-devel
166166
%else
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

@@ -265,17 +267,19 @@ BuildRequires: powerman-devel
265267
%define NUTPKG_WITH_POWERMAN 0
266268
%endif
267269

268-
%if ( 0%{?suse_version}>0 || ! %{?suse_version} ) && (0%{?centos_version}>=800) || ! 0%{?centos_version} ) && ( ! 0%{?rhel_version} ) && ( ! 0%{?rhel} )
270+
%if ( 0%{?suse_version}>0 || ! 0%{?suse_version} ) && (0%{?centos_version}>=800 || ! 0%{?centos_version} ) && ( ! 0%{?rhel_version} ) && ( ! 0%{?rhel} )
269271
# Strange that this is not present in RHEL (even with Fedora EPEL repos attached)
270272
# But it also complains about epel-rpm-macros when this is added though.
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)