lshw/lshw.spec

88 lines
2.4 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:02:47 -04:00
Name: lshw
Version: B.02.19.2
Release: 1
2019-09-30 11:02:47 -04:00
Summary: Hardware lister
License: GPLv2
URL: http://ezix.org/project/wiki/HardwareLiSter
Source0: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz
Patch0: lshw-B.02.18-scandir.patch
2020-02-14 10:46:29 +08:00
Patch2: lshw-B.02.18-revert-json.patch
Patch3: lshw-B.02.19.2-cmake.patch
2019-09-30 11:02:47 -04:00
BuildRequires: gcc gcc-c++ cmake gettext
BuildRequires: desktop-file-utils libappstream-glib ninja-build
BuildRequires: python3-devel gtk2-devel >= 2.4
Requires: hwdata
2020-02-14 10:46:29 +08:00
Provides: %{name}-gui = %{version}-%{release}
Obsoletes: %{name}-gui < %{version}-%{release}
2019-09-30 11:02:47 -04:00
%description
lshw (Hardware Lister) is a small tool to provide detailed information
on the hardware configuration of the machine. It can report exact memory
configuration, firmware version, mainboard configuration, CPU version
and speed, cache configuration, bus speed, etc. on DMI-capable x86 or
EFI (IA-64) systems and on some PowerPC machines (PowerMac G4 is known
to work).
%package help
Summary: Doc files for %{name}
BuildArch: noarch
%description help
The %{name}-help package contains doc files for %{name}.
%prep
2020-02-14 10:46:29 +08:00
%setup -q
%patch00 -p1
2020-02-14 10:46:29 +08:00
%patch02 -R -p1
%patch03 -p1
2019-09-30 11:02:47 -04:00
%build
2020-02-14 10:46:29 +08:00
mkdir -p build && cd build
%cmake .. -DNOLOGO=ON -DHWDATA=OFF -DPOLICYKIT=ON -DBUILD_SHARED_LIBS=OFF -GNinja
%ninja_build
2019-09-30 11:02:47 -04:00
%install
2020-02-14 10:46:29 +08:00
cd build
%ninja_install
2019-09-30 11:02:47 -04:00
ln -s gtk-lshw %{buildroot}/%{_sbindir}/lshw-gui
rm -rf %{buildroot}/%{_datadir}/locale/fr/
2020-02-14 10:46:29 +08:00
%check
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/*.appdata.xml
cd build
src/lshw -json -disable usb -disable pcmcia -disable isapnp \
-disable ide -disable scsi -disable dmi -disable memory \
-disable cpuinfo 2>/dev/null | %{__python3} -m json.tool
2019-09-30 11:02:47 -04:00
%files
%license COPYING
2020-02-14 10:46:29 +08:00
%{_bindir}/lshw-gui
2019-09-30 11:02:47 -04:00
%{_sbindir}/*lshw*
2020-02-14 10:46:29 +08:00
%{_datadir}/lshw/artwork
%{_datadir}/lshw/ui/*
%{_datadir}/pixmaps/*
%{_datadir}/applications/gtk-lshw.desktop
%{_datadir}/appdata/gtk-lshw.appdata.xml
%{_datadir}/polkit-1/actions/org.ezix.lshw.gui.policy
2019-09-30 11:02:47 -04:00
%files help
%doc README.md
%{_mandir}/man1/lshw.1.gz
%changelog
* Wed Jan 27 2021 yuanxin <yuanxin24@huawei.com> - B.02.19.2-1
- upgrade version to B.02.19.2
2020-02-14 10:46:29 +08:00
* Fri Feb 14 2020 chengquan <chengquan3@huawei.com> - B.02.18-21
- Rollback some patches for bugfix
* Mon Jan 13 2020 chengquan <chengquan3@huawei.com> - B.02.18-20
- remove gui function and unrelated patches
2019-09-30 11:02:47 -04:00
* Mon Sep 9 2019 luhuaxin <luhuaxin@huawei.com> - B.02.18-19
- Package init