aboutsummaryrefslogtreecommitdiff
path: root/tools/hardinfo2.spec
diff options
context:
space:
mode:
authorhwspeedy <ns@bigbear.dk>2024-03-12 16:55:38 +0100
committerhwspeedy <ns@bigbear.dk>2024-03-12 16:55:38 +0100
commitf9ef43c08eb00c341a6224d13370aa2b96d3dd5d (patch)
treef1ded2d37efb2237d868161f8caa093f5de29242 /tools/hardinfo2.spec
parent0b4d13200106e9d8ef50e8c4d36f4d1bb256a0d6 (diff)
FIX Updated package test scripts
Diffstat (limited to 'tools/hardinfo2.spec')
-rw-r--r--tools/hardinfo2.spec65
1 files changed, 49 insertions, 16 deletions
diff --git a/tools/hardinfo2.spec b/tools/hardinfo2.spec
index 8f235f64..3aaa440d 100644
--- a/tools/hardinfo2.spec
+++ b/tools/hardinfo2.spec
@@ -1,13 +1,28 @@
+%if 0%{?rhel} <= 8
+%undefine __cmake_in_source_build
+%undefine __cmake3_in_source_build
+%endif
+
Name: hardinfo2
-Version: 2.0.12
+Version: 2.0.15
Release: %autorelease
Summary: System Information and Benchmark for Linux Systems
# most of the source code is GPL-2.0-or-later license, except:
-# includes/blowfish.h - LGPL-2.1-or-later
-# includes/loadgraph.h - LGPL-2.0-only
+
+# hardinfo2/gg_key_file_parse_string_as_value.c: LGPL-2.1-or-later
+# includes/blowfish.h: LGPL-2.1-or-later
# deps/uber-graph/g-ring.c: LGPL-2.1-or-later
# deps/uber-graph/g-ring.h: LGPL-2.1-or-later
+# modules/benchmark/blowfish.c: LGPL-2.1-or-later
+
+# hardinfo2/gg_strescape.c: LGPL-2.0-or-later
+# hardinfo2/util.c: GPL-2.0-or-later AND LGPL-2.0-or-later
+# deps/uber-graph/uber-frame-source.c: LGPL-2.0-or-later
+# deps/uber-graph/uber-frame-source.h: LGPL-2.0-or-later
+# deps/uber-graph/uber-timeout-interval.c: LGPL-2.0-or-later
+# deps/uber-graph/uber-timeout-interval.h: LGPL-2.0-or-later
+
# deps/uber-graph/uber-graph.c: GPL-3.0-or-later
# deps/uber-graph/uber-graph.h: GPL-3.0-or-later
# deps/uber-graph/uber-heat-map.c: GPL-3.0-or-later
@@ -25,16 +40,20 @@ Summary: System Information and Benchmark for Linux Systems
# deps/uber-graph/uber-window.c: GPL-3.0-or-later
# deps/uber-graph/uber-window.h: GPL-3.0-or-later
# deps/uber-graph/uber.h: GPL-3.0-or-later
-# modules/benchmark/blowfish.c - LGPL-2.1-or-later
-License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-only AND GPL-3.0-or-later
+
+# includes/loadgraph.h: LGPL-2.1-only
+# shell/loadgraph.c: LGPL-2.1-only
+
+License: GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-only
URL: https://github.com/hardinfo2/hardinfo2
Source0: %{url}/archive/release-%{version}/hardinfo2-release-%{version}.tar.gz
-Patch0: https://github.com/hardinfo2/hardinfo2/pull/14.patch
-
BuildRequires: gcc-c++
+%if 0%{?rhel} < 8
+BuildRequires: cmake3
+%else
BuildRequires: cmake
-BuildRequires: ninja-build
+%endif
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(cairo)
@@ -46,11 +65,11 @@ BuildRequires: pkgconfig(libsoup-2.4)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(x11)
+BuildRequires: zlib-devel
BuildRequires: desktop-file-utils
-Obsoletes: hardinfo
-
+%if 0%{?rhel} >= 8 || 0%{?fedora}
Recommends: lm_sensors
Recommends: sysbench
Recommends: lsscsi
@@ -59,6 +78,7 @@ Recommends: dmidecode
Recommends: udisks2
Recommends: xdg-utils
Recommends: iperf3
+%endif
%description
Hardinfo2 is based on hardinfo, which have not been released >10 years.
@@ -76,22 +96,28 @@ Features include:
%autosetup -p1 -n hardinfo2-release-%{version}
%build
-%cmake \
- -GNinja \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-
+%if 0%{?rhel} < 8
+%cmake3 -DCMAKE_BUILD_TYPE=Release
+%cmake3_build
+%else
+%cmake -DCMAKE_BUILD_TYPE=Release
%cmake_build
+%endif
%install
+%if 0%{?rhel} < 8
+%cmake3_install
+%else
%cmake_install
+%endif
%find_lang %{name}
%check
-desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
+desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%files -f %{name}.lang
-%license
+%license LICENSE
%doc README.md
%{_bindir}/hardinfo2
%dir %{_libdir}/hardinfo2
@@ -101,6 +127,7 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
%{_libdir}/hardinfo2/modules/devices.so
%{_libdir}/hardinfo2/modules/network.so
%{_datadir}/applications/hardinfo2.desktop
+%dir %{_datadir}/hardinfo2
%{_datadir}/hardinfo2/*.ids
%{_datadir}/hardinfo2/benchmark.data
%{_datadir}/hardinfo2/*.json
@@ -109,4 +136,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
%{_mandir}/man1/hardinfo2.1*
%changelog
+%if %{defined autochangelog}
%autochangelog
+%else
+* Mon May 01 2023 RH Container Bot <rhcontainerbot@fedoraproject.org>
+- Placeholder changelog for envs that are not autochangelog-ready
+%endif
+