33f4530
%undefine __cmake_in_source_build
7ea0dac
7ea0dac
%bcond_without gui
7ea0dac
a31e9e3
Summary:       Hardware lister
a31e9e3
Name:          lshw
73250d8
Version:       B.02.20
39963e1
Release:       3%{?dist}
bfdda92
License:       GPL-2.0-only
a31e9e3
URL:           http://ezix.org/project/wiki/HardwareLiSter
a31e9e3
Source0:       http://www.ezix.org/software/files/lshw-%{version}.tar.gz
dddb74d
Source1:       https://salsa.debian.org/openstack-team/third-party/lshw/raw/debian/stein/debian/patches/lshw-gtk.1
756c2fb
Patch1:        lshw-B.02.18-scandir.patch
73250d8
Patch2:        lshw-B.02.20-cmake.patch
915ffd0
BuildRequires: cmake
1eb4ce6
BuildRequires: desktop-file-utils
915ffd0
BuildRequires: gcc
915ffd0
BuildRequires: gcc-c++
bea7484
BuildRequires: gettext
7ea0dac
%if %{with gui}
ba6e806
BuildRequires: gtk3-devel >= 3.24
ca642f6
BuildRequires: libappstream-glib
7ea0dac
%endif
b32854f
BuildRequires: ninja-build
1eb4ce6
BuildRequires: python3-devel
ba6e806
BuildRequires: sqlite-devel
a31e9e3
Requires:      hwdata
caf3666
%description
caf3666
lshw is a small tool to provide detailed informaton on the hardware
be3b1f2
configuration of the machine. It can report exact memory
be3b1f2
configuration, firmware version, mainboard configuration, CPU version
be3b1f2
and speed, cache configuration, bus speed, etc. on DMI-capable x86
be3b1f2
systems and on some PowerPC machines (PowerMac G4 is known to work).
caf3666
caf3666
Information can be output in plain text, XML or HTML.
caf3666
7ea0dac
%if %{with gui}
20ce82d
%package       gui
20ce82d
Summary:       Graphical hardware lister
20ce82d
Requires:      polkit
20ce82d
Requires:      %{name} = %{version}-%{release}
20ce82d
%description   gui
be3b1f2
Graphical frontend for the hardware lister (lshw) tool. If desired,
be3b1f2
hardware information can be saved to file in plain, XML or HTML
be3b1f2
format.
7ea0dac
%endif
caf3666
caf3666
%prep
ed990f9
%autosetup -p1
caf3666
caf3666
%build
7ea0dac
%if %{with gui}
7ea0dac
%global gui_config -DGUI=ON
7ea0dac
%else
7ea0dac
%global gui_config -DGUI=OFF
7ea0dac
%endif
7ea0dac
ba6e806
%cmake -DNOLOGO=ON -DHWDATA=OFF -DPOLICYKIT=ON -DSQLITE=ON -DBUILD_SHARED_LIBS=OFF %{gui_config} -GNinja
33f4530
%cmake_build
401678d
caf3666
%install
33f4530
%cmake_install
7ea0dac
%if %{with gui}
dddb74d
install -m0644 -D %{SOURCE1} %{buildroot}%{_mandir}/man1/lshw-gui.1
b32854f
ln -s gtk-lshw %{buildroot}%{_sbindir}/lshw-gui
7ea0dac
%endif
45b2924
# translations seems borken, remove for now
45b2924
#find_lang %{name}
ba6e806
rm -rf %{buildroot}%{_datadir}/locale/*/
a31e9e3
ca642f6
%check
7ea0dac
%if %{with gui}
ca642f6
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
7ea0dac
%endif
ca642f6
1eb4ce6
# check json output is valid
33f4530
%{_vpath_builddir}/src/lshw -json \
1eb4ce6
    -disable usb -disable pcmcia -disable isapnp \
1eb4ce6
    -disable ide -disable scsi -disable dmi -disable memory \
1eb4ce6
    -disable cpuinfo 2>/dev/null | %{__python3} -m json.tool
1eb4ce6
45b2924
#files -f %{name}.lang
45b2924
%files
be3b1f2
%license COPYING
be3b1f2
%doc README.md
be3b1f2
%{_mandir}/man1/lshw.1*
b32854f
%{_sbindir}/lshw
caf3666
7ea0dac
%if %{with gui}
caf3666
%files gui
be3b1f2
%license COPYING
b32854f
%{_bindir}/lshw-gui
b32854f
%{_sbindir}/gtk-lshw
b32854f
%{_sbindir}/lshw-gui
dddb74d
%{_mandir}/man1/lshw-gui.1*
b32854f
%dir %{_datadir}/lshw
b32854f
%{_datadir}/lshw/artwork
b32854f
%dir %{_datadir}/lshw/ui
b32854f
%{_datadir}/lshw/ui/gtk-lshw.ui
b32854f
%{_datadir}/pixmaps/gtk-lshw.svg
b32854f
%{_datadir}/applications/gtk-lshw.desktop
b32854f
%{_datadir}/appdata/gtk-lshw.appdata.xml
20ce82d
%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy
7ea0dac
%endif
caf3666
caf3666
%changelog
39963e1
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - B.02.20-3
39963e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
39963e1
10d1dca
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - B.02.20-2
10d1dca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
10d1dca
73250d8
* Sat Jan 06 2024 Terje Rosten <terje.rosten@ntnu.no> - B.02.20-1
73250d8
- B.02.20
73250d8
- Remove all upstream patches
73250d8
65bddb0
* Tue Aug 08 2023 Terje Rosten <terje.rosten@ntnu.no> - B.02.19.2-13
65bddb0
- Use SPDX licence
65bddb0
71b44f6
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - B.02.19.2-12
71b44f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
71b44f6
ed990f9
* Wed Apr 05 2023 Terje Rosten <terje.rosten@ntnu.no> - B.02.19.2-11
ed990f9
- Use modern macros
ed990f9
ba6e806
* Tue Apr 04 2023 Yaakov Selkowitz <yselkowi@redhat.com> - B.02.19.2-10
ba6e806
- Update to upstream commit 76afbaaf40e
ba6e806
a8b4ab2
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - B.02.19.2-9
a8b4ab2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
a8b4ab2
fc57b49
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - B.02.19.2-8
fc57b49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
fc57b49
7ea0dac
* Sun Jun 19 2022 Stewart Smith <trawets@amazon.com> - B.02.19.2-7
7ea0dac
- Make GUI an optional bcond
19c3e43
- Disable remote DNS lookup on 'lshw -version'
7ea0dac
0164f10
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - B.02.19.2-6
0164f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
0164f10
886d3ca
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - B.02.19.2-5
886d3ca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
886d3ca
a066abe
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - B.02.19.2-4
a066abe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a066abe
62fd965
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - B.02.19.2-3
62fd965
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
62fd965
4d6701c
* Fri Apr 24 2020 Terje Rosten <terje.rosten@ntnu.no> - B.02.19.2-2
4d6701c
- Add patch from openSUSE to fix rhbz#1822455
4d6701c
fcfbecb
* Tue Mar 24 2020 Terje Rosten <terje.rosten@ntnu.no> - B.02.19.2-1
fcfbecb
- B.02.19.2
fcfbecb
b760219
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-23
b760219
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
b760219
6d6ba27
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-22
6d6ba27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
6d6ba27
c207aae
* Tue May 28 2019 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-21
c207aae
- Update to commit 6cc0581
c207aae
- Rebase cmake patch on top 6cc0581
c207aae
- Add NVME patch from PR#45
c207aae
dddb74d
* Sat May 25 2019 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-20
dddb74d
- Add lshw-gui man page (from Debian, thanks!)
dddb74d
49aa7c0
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-19
49aa7c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
49aa7c0
04a569e
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-18
04a569e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
04a569e
517116e
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - B.02.18-17
517116e
- Rebuilt for Python 3.7
517116e
b32854f
* Mon Apr 02 2018 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-16
b32854f
- Update to commit 20cda77
b32854f
- Convert to cmake build system
b32854f
1eb4ce6
* Thu Feb 08 2018 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-15
1eb4ce6
- Fix JSON issue (rhbz#1543320)
1eb4ce6
787bed3
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-14
787bed3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
787bed3
f1b15dd
* Fri Jan 26 2018 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-13
f1b15dd
- Fix date
1eb4ce6
- Need gettext
f1b15dd
bf14c5c
* Fri Jan 26 2018 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-12
756c2fb
- Update to commit d05baa7
756c2fb
a5312cc
* Mon Aug 28 2017 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-11
a5312cc
- Prefer lshw-gui in lshw-gui context
a5312cc
ca642f6
* Sun Aug 13 2017 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-10
ca642f6
- Add AppData bz#1476498
ca642f6
19cab3f
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-9
19cab3f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
19cab3f
70268d5
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-8
70268d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
70268d5
a596305
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.18-7
a596305
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
a596305
b426100
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - B.02.18-6
b426100
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b426100
45730f8
* Wed Aug 24 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-5
6cf87ac
- Modify lshw gui wrapper to fix bz#1368404
6cf87ac
ad5b392
* Thu Aug 11 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-4
ad5b392
- Add patches to fix sysconf/long_bit issue and crash (bz#1342792)
ad5b392
1f3a87e
* Wed May 18 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-3
1f3a87e
- Add patch to fix crash (bz#1332486)
1f3a87e
a671014
* Mon Apr 25 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-2
a671014
- Date fix
a671014
be3b1f2
* Mon Apr 25 2016 Terje Rosten <terje.rosten@ntnu.no> - B.02.18-1
be3b1f2
- B.02.18
be3b1f2
57c8cec
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - B.02.17-7
57c8cec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
57c8cec
19e73f5
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.17-6
19e73f5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
19e73f5
eec3d46
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - B.02.17-5
eec3d46
- Rebuilt for GCC 5 C++11 ABI change
eec3d46
e26170c
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.17-4
e26170c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e26170c
9f4897a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.17-3
9f4897a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9f4897a
4988f45
* Mon Sep 30 2013 Terje Rosten <terje.rosten@ntnu.no> - B.02.17-2
4988f45
- Add patch to fix segfault in scan fat code
4988f45
e6151e4
* Thu Sep 26 2013 Terje Rosten <terje.rosten@ntnu.no> - B.02.17-1
e6151e4
- B.02.17
e6151e4
8767713
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.16-9
8767713
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8767713
70e8bb4
* Sun Jun 09 2013 Terje Rosten <terje.rosten@ntnu.no> - B.02.16-8
70e8bb4
- Rename macro
70e8bb4
45b2924
* Sun Jun 09 2013 Terje Rosten <terje.rosten@ntnu.no> - B.02.16-7
45b2924
- Fix desktop file (bz #953684)
45b2924
- Remove broken translations (bz #905896)
45b2924
- Add vendor macro
45b2924
 
c183170
* Fri Apr 26 2013 Jon Ciesla <limburgher@gmail.com> - B.02.16-6
c183170
- Drop desktop vendor tag.
c183170
e2c802a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.16-5
e2c802a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e2c802a
95b12c6
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.16-4
95b12c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
95b12c6
20ce82d
* Tue May 08 2012 Terje Rosten <terje.rosten@ntnu.no> - B.02.16-3
20ce82d
- Switch from consolehelper to PolicyKit (bz #502730)
20ce82d
873027d
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.16-2
873027d
- Rebuilt for c++ ABI breakage
873027d
7ab6e91
* Sun Jan 29 2012 Terje Rosten <terje.rosten@ntnu.no> - B.02.16-1
7ab6e91
- B.02.16
7ab6e91
2e47a37
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.15-4
2e47a37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2e47a37
eda9e06
* Mon Oct 17 2011 Terje Rosten <terje.rosten@ntnu.no> - B.02.15-3
eda9e06
- Own all dirs
eda9e06
c4f70a8
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.15-2
c4f70a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c4f70a8
a31e9e3
* Sun Nov 21 2010 Terje Rosten <terje.rosten@ntnu.no> - B.02.15-1
a31e9e3
- B.02.15
a31e9e3
- Remove patches now upstream
a31e9e3
- Build with sqlite support
a31e9e3
e6b36de
* Sun Sep 05 2010 Terje Rosten <terje.rosten@ntnu.no> - B.02.14-5
e6b36de
- Add patch to fix build with gcc-4.5
e6b36de
a550549
* Sun Sep 05 2010 Terje Rosten <terje.rosten@ntnu.no> - B.02.14-4
e6b36de
- Add patch to fix ext4 issue
a550549
70a8455
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.14-3
70a8455
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
70a8455
a550549
* Wed May 06 2009 Adam Jackson <ajax@redhat.com> - B.02.14-2
936b3d6
- Requires: hwdata
936b3d6
- Drop redundant copies of pci.ids and friends, since we'll pick up the
a550549
  copies in hwdata at runtime
936b3d6
041f2e2
* Sun Mar  1 2009 Terje Rosten <terjeros@phys.ntnu.no> - B.02.14-1
041f2e2
- B.02.14
041f2e2
- Drop gcc43 patch now upstream
041f2e2
044175e
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - B.02.13-4
041f2e2
- rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
044175e
78e4118
* Wed Aug 13 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.13-3
78e4118
- rebuild
78e4118
584b2d6
* Wed Aug 13 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.13-2
584b2d6
- proper patch macro
584b2d6
6bd18bb
* Wed Aug 13 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.13-1
6bd18bb
- B.02.13
6bd18bb
- remove patches now upstream
6bd18bb
- add new gcc43 patch
6bd18bb
125105b
* Tue Apr 15 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-5
125105b
- rebuild
125105b
e0a7ecf
* Tue Apr 15 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-4
e0a7ecf
- add patch to fix bz #442501
e0a7ecf
5dabbe9
* Mon Feb 11 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-3
5dabbe9
- add patch to build with gcc-4.3
5dabbe9
fd4376a
* Sat Feb 09 2008 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-2
cd61286
- rebuild
cd61286
401678d
* Mon Nov  5 2007 Terje Rosten <terjeros@phys.ntnu.no> - B.02.12.01-1
401678d
- B.02.12.01
401678d
- Replace trademark icons
401678d
caf3666
* Tue Aug 14 2007 Terje Rosten <terjeros@phys.ntnu.no> - B.02.11.01-3
caf3666
- Move desktop and pam config to files
caf3666
- Simplify build
caf3666
caf3666
* Tue Aug 07 2007 Terje Rosten <terjeros@phys.ntnu.no> - B.02.11.01-2
caf3666
- Remove trademarks
caf3666
caf3666
* Mon Aug 06 2007 Terje Rosten <terjeros@phys.ntnu.no> - B.02.11.01-1
caf3666
- B.02.11.01
caf3666
caf3666
* Sun Aug 05 2007 Terje Rosten <terjeros@phys.ntnu.no> - B.02.11-3
caf3666
- Move artwork to gui subpackage
caf3666
- Implement consolehelper support
caf3666
caf3666
* Sat Aug 04 2007 Terje Rosten <terjeros@phys.ntnu.no> - B.02.11-2
caf3666
- License is GPLv2 (only)
caf3666
- Fix ui %%description
caf3666
caf3666
* Wed Aug 01 2007 Terje Rosten <terjeros@phys.ntnu.no> - B.02.11-1
caf3666
- Follow upstream version scheme
caf3666
caf3666
* Wed Jul 25 2007 Terje Rosten <terjeros@phys.ntnu.no> - 2.11-1
caf3666
- 2.11
caf3666
caf3666
* Wed Jun 27 2007 Terje Rosten <terjeros@phys.ntnu.no> - 2.10-2
caf3666
- minor fixes
caf3666
- add patch to avoid stripping
caf3666
- add desktop file
caf3666
- strip changelog
caf3666
- move from sbin to bin
caf3666
- new url
caf3666
caf3666
* Wed Feb 14 2007 Dag Wieers <dag@wieers.com> - 2.10-1 - 4876+/dag
caf3666
- Updated to release B.02.10.
caf3666
caf3666
* Tue Dec 21 2004 Dag Wieers <dag@wieers.com> - 2.0-1
caf3666
- Initial package. (using DAR)
caf3666