Compare commits
No commits in common. "162fd289e6a98bdc699fdb780fa7510df0079c69" and "e3bb5de4606ca6d8758dfa9e42c096618d737627" have entirely different histories.
162fd289e6
...
e3bb5de460
63475
lshw-B.02.18-20cda77.patch
Normal file
63475
lshw-B.02.18-20cda77.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,29 +1,29 @@
|
|||||||
From 5da5b63bd38634834bb3e631a24e31a10ab60f27 Mon Sep 17 00:00:00 2001
|
From a43ffe12212e1a4dd7b0038197b53798d7a3dfb1 Mon Sep 17 00:00:00 2001
|
||||||
From: Terje Rosten <terje.rosten@ntnu.no>
|
From: =?UTF-8?q?Terje=20R=C3=B8sten?= <terje.rosten@ntnu.no>
|
||||||
Date: Wed, 25 Mar 2020 21:57:53 +0100
|
Date: Mon, 2 Apr 2018 14:51:55 +0200
|
||||||
Subject: [PATCH] cmakeify
|
Subject: [PATCH] cmakeify
|
||||||
|
|
||||||
---
|
---
|
||||||
CMakeLists.txt | 43 ++++++
|
CMakeLists.txt | 42 ++++++
|
||||||
Makefile | 20 ---
|
Makefile | 20 ---
|
||||||
README.md | 51 ++++---
|
README.md | 47 ++++---
|
||||||
lshw.spec.in | 66 +++-----
|
lshw.spec.in | 52 ++------
|
||||||
src/CMakeLists.txt | 102 +++++++++++++
|
src/CMakeLists.txt | 103 +++++++++++++++
|
||||||
src/Makefile | 144 ------------------
|
src/Makefile | 144 ---------------------
|
||||||
src/core/Makefile | 80 ----------
|
src/core/Makefile | 80 ------------
|
||||||
src/core/{config.h => config.h.in} | 28 +---
|
src/core/{config.h => config.h.in} | 28 ++--
|
||||||
src/core/db.cc | 8 +
|
src/core/db.cc | 8 ++
|
||||||
src/core/dump.cc | 2 +-
|
src/core/dump.cc | 2 +-
|
||||||
src/core/version.h | 2 +
|
src/core/version.h | 2 +
|
||||||
src/gui/CMakeLists.txt | 67 ++++++++
|
src/gui/CMakeLists.txt | 67 ++++++++++
|
||||||
src/gui/Makefile | 61 --------
|
src/gui/Makefile | 61 ---------
|
||||||
.../{gtk-lshw.desktop => gtk-lshw.desktop.in} | 7 +-
|
.../{gtk-lshw.desktop => gtk-lshw.desktop.in} | 7 +-
|
||||||
src/gui/integration/lshw-gui.in | 5 +
|
src/gui/integration/lshw-gui.in | 5 +
|
||||||
.../integration/org.ezix.lshw.gui.policy.in | 20 +++
|
src/gui/integration/org.ezix.lshw.gui.policy.in | 20 +++
|
||||||
src/gui/stock.c | 1 +
|
src/gui/stock.c | 1 +
|
||||||
src/po/CMakeLists.txt | 16 ++
|
src/po/CMakeLists.txt | 16 +++
|
||||||
src/po/Makefile | 23 ---
|
src/po/Makefile | 23 ----
|
||||||
19 files changed, 327 insertions(+), 419 deletions(-)
|
19 files changed, 317 insertions(+), 411 deletions(-)
|
||||||
create mode 100644 CMakeLists.txt
|
create mode 100644 CMakeLists.txt
|
||||||
delete mode 100644 Makefile
|
delete mode 100644 Makefile
|
||||||
create mode 100644 src/CMakeLists.txt
|
create mode 100644 src/CMakeLists.txt
|
||||||
@ -40,18 +40,17 @@ Subject: [PATCH] cmakeify
|
|||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..3b1d4d6
|
index 0000000..6c69c37
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -0,0 +1,43 @@
|
@@ -0,0 +1,42 @@
|
||||||
+cmake_minimum_required(VERSION 3.0)
|
+cmake_minimum_required(VERSION 3.0)
|
||||||
+
|
+
|
||||||
+project(lshw)
|
+project(lshw)
|
||||||
+set(VERSION "B.02.19.2")
|
+set(VERSION "B.012.18")
|
||||||
+
|
+
|
||||||
+find_package(Git)
|
+IF(EXISTS "${PROJECT_SOURCE_DIR}/.git")
|
||||||
+
|
+ find_package(Git)
|
||||||
+if(EXISTS "${PROJECT_SOURCE_DIR}/.git" AND "${MAKE_RELEASE}" STREQUAL "")
|
|
||||||
+ if(GIT_FOUND)
|
+ if(GIT_FOUND)
|
||||||
+ execute_process(
|
+ execute_process(
|
||||||
+ COMMAND ${GIT_EXECUTABLE} describe --tags
|
+ COMMAND ${GIT_EXECUTABLE} describe --tags
|
||||||
@ -114,10 +113,10 @@ index 8fe665e..0000000
|
|||||||
- tar --transform s!^!$(PACKAGENAME)-$(VERSION)/! -rf $(PACKAGENAME)-$(VERSION).tar $^
|
- tar --transform s!^!$(PACKAGENAME)-$(VERSION)/! -rf $(PACKAGENAME)-$(VERSION).tar $^
|
||||||
- gzip -f $(PACKAGENAME)-$(VERSION).tar
|
- gzip -f $(PACKAGENAME)-$(VERSION).tar
|
||||||
diff --git a/README.md b/README.md
|
diff --git a/README.md b/README.md
|
||||||
index 30feaf1..294888c 100644
|
index 7afcae6..393da0f 100644
|
||||||
--- a/README.md
|
--- a/README.md
|
||||||
+++ b/README.md
|
+++ b/README.md
|
||||||
@@ -15,27 +15,29 @@ Installation
|
@@ -15,27 +15,25 @@ Installation
|
||||||
1. Requirements
|
1. Requirements
|
||||||
- Linux 2.4.x, 2.6.x, 3.x or 4.x (2.2.x might work, though)
|
- Linux 2.4.x, 2.6.x, 3.x or 4.x (2.2.x might work, though)
|
||||||
- a PA-RISC-, Alpha-, IA-64- (Itanium-), PowerPC-, ARM- or x86- based machine
|
- a PA-RISC-, Alpha-, IA-64- (Itanium-), PowerPC-, ARM- or x86- based machine
|
||||||
@ -129,17 +128,13 @@ index 30feaf1..294888c 100644
|
|||||||
+ - for optional zlib feature install zlib and gzip
|
+ - for optional zlib feature install zlib and gzip
|
||||||
|
|
||||||
- 2. To compile it, just use:
|
- 2. To compile it, just use:
|
||||||
+ 2. Use cmake options to decide feature set:
|
+ 2. Use cmake options to adjust non default set:
|
||||||
+ - -DGUI=OFF - disable graphical user interface version og lshw
|
+ -DGUI=OFF, -DZLIB=ON, -DSQLITE=ON and/or -DNOLOGO=ON
|
||||||
+ - -DZLIB=ON - enable reading of gzipped datafiles
|
|
||||||
+ - -DSQLITE=ON - enable SQLite support
|
|
||||||
+ - -DPOLICYKIT=ON - enable PolicyKit integration
|
|
||||||
+ - -DNOLOGO=ON - don't install logos with copyright
|
|
||||||
|
|
||||||
- $ make
|
- $ make
|
||||||
+ 3. Do configuration and build by
|
+ 3. Do configuration and build by
|
||||||
|
|
||||||
- To compile with zlib support (see below), use:
|
- To complile with zlib support (see below), use:
|
||||||
-
|
-
|
||||||
- $ make ZLIB=1
|
- $ make ZLIB=1
|
||||||
-
|
-
|
||||||
@ -159,7 +154,7 @@ index 30feaf1..294888c 100644
|
|||||||
|
|
||||||
Getting help
|
Getting help
|
||||||
------------
|
------------
|
||||||
@@ -61,12 +63,27 @@ If compiled with zlib support, lshw will look for `file`.gz first, then for `fil
|
@@ -61,12 +59,27 @@ If compiled with zlib support, lshw will look for `file`.gz first, then for `fil
|
||||||
|
|
||||||
Statically-linked and/or compressed binaries can be built by using
|
Statically-linked and/or compressed binaries can be built by using
|
||||||
|
|
||||||
@ -177,8 +172,8 @@ index 30feaf1..294888c 100644
|
|||||||
+Building compressed binaries requires `upx` (cf. https://upx.github.io/).
|
+Building compressed binaries requires `upx` (cf. https://upx.github.io/).
|
||||||
|
|
||||||
-in the `src/` directory
|
-in the `src/` directory
|
||||||
+Release management and data files maintenance
|
+Release and maintenance
|
||||||
+---------------------------------------------
|
+-----------------------
|
||||||
|
|
||||||
-Building compressed binaries requires `upx` (cf. https://upx.github.io/).
|
-Building compressed binaries requires `upx` (cf. https://upx.github.io/).
|
||||||
+Create release tarball,
|
+Create release tarball,
|
||||||
@ -186,42 +181,17 @@ index 30feaf1..294888c 100644
|
|||||||
+ 1. Edit CMakeLists.txt to set version
|
+ 1. Edit CMakeLists.txt to set version
|
||||||
+ 2. Run
|
+ 2. Run
|
||||||
+ $ mkdir build && cd build
|
+ $ mkdir build && cd build
|
||||||
+ $ cmake .. -DMAKE_RELEASE=ON
|
+ $ cmake .. -GNinja
|
||||||
+ $ make release
|
+ $ ninja release
|
||||||
+
|
+
|
||||||
+Update hwdata files:
|
+Update hwdata files:
|
||||||
+
|
+
|
||||||
+ $ make refresh_hwdata
|
+ $ ninja refresh_hwdata
|
||||||
diff --git a/lshw.spec.in b/lshw.spec.in
|
diff --git a/lshw.spec.in b/lshw.spec.in
|
||||||
index e837fd4..3fe23c2 100644
|
index c597379..a7655f5 100644
|
||||||
--- a/lshw.spec.in
|
--- a/lshw.spec.in
|
||||||
+++ b/lshw.spec.in
|
+++ b/lshw.spec.in
|
||||||
@@ -7,11 +7,11 @@ Version: @VERSION@
|
@@ -52,49 +52,17 @@ http://lshw.ezix.org/
|
||||||
Release: 2
|
|
||||||
Source: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz
|
|
||||||
URL: http://lshw.ezix.org/
|
|
||||||
-License: GPL
|
|
||||||
+License: GPLv2
|
|
||||||
Group: Applications/System
|
|
||||||
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
||||||
-
|
|
||||||
-%global debug_package %{nil}
|
|
||||||
+BuildRequires: gcc
|
|
||||||
+BuildRequires: gcc-c++
|
|
||||||
+BuildRequires: cmake
|
|
||||||
|
|
||||||
%description
|
|
||||||
lshw (Hardware Lister) is a small tool to provide detailed information on
|
|
||||||
@@ -39,7 +39,7 @@ lshw (Hardware Lister) is a small tool to provide detailed informaton 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 x86s
|
|
||||||
- systems and on some PowerPC machines (PowerMac G4 is known to work).
|
|
||||||
+systems and on some PowerPC machines (PowerMac G4 is known to work).
|
|
||||||
|
|
||||||
This package provides a graphical user interface to display hardware
|
|
||||||
information.
|
|
||||||
@@ -54,61 +54,29 @@ http://lshw.ezix.org/
|
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -230,7 +200,6 @@ index e837fd4..3fe23c2 100644
|
|||||||
- SBINDIR="%{_sbindir}" \
|
- SBINDIR="%{_sbindir}" \
|
||||||
- MANDIR="%{_mandir}" \
|
- MANDIR="%{_mandir}" \
|
||||||
- DATADIR="%{_datadir}" \
|
- DATADIR="%{_datadir}" \
|
||||||
- VERSION="%{version}" \
|
|
||||||
- all
|
- all
|
||||||
-%if %{!?_without_gui:1}0
|
-%if %{!?_without_gui:1}0
|
||||||
-%{__make} %{?_smp_mflags} \
|
-%{__make} %{?_smp_mflags} \
|
||||||
@ -238,7 +207,6 @@ index e837fd4..3fe23c2 100644
|
|||||||
- SBINDIR="%{_sbindir}" \
|
- SBINDIR="%{_sbindir}" \
|
||||||
- MANDIR="%{_mandir}" \
|
- MANDIR="%{_mandir}" \
|
||||||
- DATADIR="%{_datadir}" \
|
- DATADIR="%{_datadir}" \
|
||||||
- VERSION="%{version}" \
|
|
||||||
- gui
|
- gui
|
||||||
-%endif
|
-%endif
|
||||||
+mkdir build && cd build
|
+mkdir build && cd build
|
||||||
@ -276,12 +244,11 @@ index e837fd4..3fe23c2 100644
|
|||||||
-%defattr(-,root,root, 0555)
|
-%defattr(-,root,root, 0555)
|
||||||
-%doc README.md COPYING docs/TODO docs/Changelog docs/lshw.xsd
|
-%doc README.md COPYING docs/TODO docs/Changelog docs/lshw.xsd
|
||||||
+%license COPYING
|
+%license COPYING
|
||||||
+%doc docs/TODO docs/Changelog docs/lshw.xsd
|
+%doc COPYING docs/TODO docs/Changelog docs/lshw.xsd
|
||||||
%{_sbindir}/lshw
|
%{_sbindir}/lshw
|
||||||
-%doc %{_mandir}/man?/*
|
%doc %{_mandir}/man?/*
|
||||||
+%{_mandir}/man?/*
|
|
||||||
%{_datadir}/lshw/
|
%{_datadir}/lshw/
|
||||||
%{_datadir}/locale/*/*/*
|
@@ -102,9 +70,11 @@ http://lshw.ezix.org/
|
||||||
|
|
||||||
%if %{!?_without_gui:1}0
|
%if %{!?_without_gui:1}0
|
||||||
%files gui
|
%files gui
|
||||||
@ -297,10 +264,10 @@ index e837fd4..3fe23c2 100644
|
|||||||
%changelog
|
%changelog
|
||||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..8b97a16
|
index 0000000..ab559d9
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/CMakeLists.txt
|
+++ b/src/CMakeLists.txt
|
||||||
@@ -0,0 +1,102 @@
|
@@ -0,0 +1,103 @@
|
||||||
+if(STATIC)
|
+if(STATIC)
|
||||||
+ set(ZLIB OFF)
|
+ set(ZLIB OFF)
|
||||||
+ set(SQLITE OFF)
|
+ set(SQLITE OFF)
|
||||||
@ -384,7 +351,7 @@ index 0000000..8b97a16
|
|||||||
+ set_target_properties(lshw PROPERTIES LINK_FLAGS "-static" )
|
+ set_target_properties(lshw PROPERTIES LINK_FLAGS "-static" )
|
||||||
+endif()
|
+endif()
|
||||||
+
|
+
|
||||||
+target_link_libraries(lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} core resolv)
|
+target_link_libraries(lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} resolv core)
|
||||||
+
|
+
|
||||||
+if(NOT ZLIB)
|
+if(NOT ZLIB)
|
||||||
+ if(HWDATA)
|
+ if(HWDATA)
|
||||||
@ -403,9 +370,10 @@ index 0000000..8b97a16
|
|||||||
+
|
+
|
||||||
+install(FILES lshw.1 DESTINATION ${MANDIR}/man1 COMPONENT doc)
|
+install(FILES lshw.1 DESTINATION ${MANDIR}/man1 COMPONENT doc)
|
||||||
+install(TARGETS lshw DESTINATION sbin)
|
+install(TARGETS lshw DESTINATION sbin)
|
||||||
|
+
|
||||||
diff --git a/src/Makefile b/src/Makefile
|
diff --git a/src/Makefile b/src/Makefile
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 7ae8218..0000000
|
index 917bf6b..0000000
|
||||||
--- a/src/Makefile
|
--- a/src/Makefile
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,144 +0,0 @@
|
@@ -1,144 +0,0 @@
|
||||||
@ -431,7 +399,7 @@ index 7ae8218..0000000
|
|||||||
-export SQLITE
|
-export SQLITE
|
||||||
-export ZLIB
|
-export ZLIB
|
||||||
-
|
-
|
||||||
-CXX?=$(CROSS_COMPILE)c++
|
-CXX?=c++
|
||||||
-INCLUDES=-I./core/
|
-INCLUDES=-I./core/
|
||||||
-DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -DVERSION=\"$(VERSION)\"
|
-DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -DVERSION=\"$(VERSION)\"
|
||||||
-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
-CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
||||||
@ -441,7 +409,7 @@ index 7ae8218..0000000
|
|||||||
-ifeq ($(ZLIB), 1)
|
-ifeq ($(ZLIB), 1)
|
||||||
- CXXFLAGS+= -DZLIB $(shell pkg-config --cflags zlib)
|
- CXXFLAGS+= -DZLIB $(shell pkg-config --cflags zlib)
|
||||||
-endif
|
-endif
|
||||||
-LDFLAGS+=-L./core/ -g
|
-LDFLAGS=-L./core/ -g
|
||||||
-ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
|
-ifneq ($(shell $(LD) --help 2| grep -- --as-needed), )
|
||||||
- LDFLAGS+= -Wl,--as-needed
|
- LDFLAGS+= -Wl,--as-needed
|
||||||
-endif
|
-endif
|
||||||
@ -555,13 +523,13 @@ index 7ae8218..0000000
|
|||||||
-# DO NOT DELETE
|
-# DO NOT DELETE
|
||||||
diff --git a/src/core/Makefile b/src/core/Makefile
|
diff --git a/src/core/Makefile b/src/core/Makefile
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index b429380..0000000
|
index 884a963..0000000
|
||||||
--- a/src/core/Makefile
|
--- a/src/core/Makefile
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,80 +0,0 @@
|
@@ -1,80 +0,0 @@
|
||||||
-PACKAGENAME?=lshw
|
-PACKAGENAME?=lshw
|
||||||
-
|
-
|
||||||
-CXX?=$(CROSS_COMPILE)c++
|
-CXX=c++
|
||||||
-INCLUDES=
|
-INCLUDES=
|
||||||
-DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
|
-DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\"
|
||||||
-CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
-CXXFLAGS?=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS)
|
||||||
@ -569,7 +537,7 @@ index b429380..0000000
|
|||||||
-LDSTATIC=
|
-LDSTATIC=
|
||||||
-LIBS=
|
-LIBS=
|
||||||
-
|
-
|
||||||
-OBJS = hw.o main.o print.o mem.o dmi.o device-tree.o cpuinfo.o osutils.o pci.o version.o cpuid.o ide.o cdrom.o pcmcia-legacy.o scsi.o s390.o disk.o spd.o network.o isapnp.o pnp.o fb.o options.o usb.o sysfs.o display.o heuristics.o parisc.o cpufreq.o partitions.o blockio.o lvm.o ideraid.o pcmcia.o volumes.o mounts.o smp.o abi.o jedec.o dump.o fat.o virtio.o vio.o nvme.o mmc.o
|
-OBJS = hw.o main.o print.o mem.o dmi.o device-tree.o cpuinfo.o osutils.o pci.o version.o cpuid.o ide.o cdrom.o pcmcia-legacy.o scsi.o s390.o disk.o spd.o network.o isapnp.o pnp.o fb.o options.o usb.o sysfs.o display.o heuristics.o parisc.o cpufreq.o partitions.o blockio.o lvm.o ideraid.o pcmcia.o volumes.o mounts.o smp.o abi.o jedec.o dump.o fat.o virtio.o vio.o
|
||||||
-ifeq ($(SQLITE), 1)
|
-ifeq ($(SQLITE), 1)
|
||||||
- OBJS+= db.o
|
- OBJS+= db.o
|
||||||
-endif
|
-endif
|
||||||
@ -731,7 +699,7 @@ index 91e039a..5cecdda 100644
|
|||||||
#else
|
#else
|
||||||
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
|
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..3489053
|
index 0000000..48bd3f5
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/gui/CMakeLists.txt
|
+++ b/src/gui/CMakeLists.txt
|
||||||
@@ -0,0 +1,67 @@
|
@@ -0,0 +1,67 @@
|
||||||
@ -751,7 +719,7 @@ index 0000000..3489053
|
|||||||
+include_directories("${GTK2_INCLUDE_DIRS}")
|
+include_directories("${GTK2_INCLUDE_DIRS}")
|
||||||
+
|
+
|
||||||
+add_executable(gtk-lshw ${GTK_SOURCES})
|
+add_executable(gtk-lshw ${GTK_SOURCES})
|
||||||
+target_link_libraries(gtk-lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} ${GTK2_LIBRARIES} core resolv)
|
+target_link_libraries(gtk-lshw ${SQLITE3_LIBRARIES} ${Z_LIBRARIES} ${GTK2_LIBRARIES} resolv core)
|
||||||
+install(TARGETS gtk-lshw DESTINATION sbin)
|
+install(TARGETS gtk-lshw DESTINATION sbin)
|
||||||
+
|
+
|
||||||
+if(POLICYKIT)
|
+if(POLICYKIT)
|
||||||
@ -804,14 +772,14 @@ index 0000000..3489053
|
|||||||
+endif()
|
+endif()
|
||||||
diff --git a/src/gui/Makefile b/src/gui/Makefile
|
diff --git a/src/gui/Makefile b/src/gui/Makefile
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index f003cfb..0000000
|
index 2526c18..0000000
|
||||||
--- a/src/gui/Makefile
|
--- a/src/gui/Makefile
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,61 +0,0 @@
|
@@ -1,61 +0,0 @@
|
||||||
-PACKAGENAME?=lshw
|
-PACKAGENAME?=lshw
|
||||||
-
|
-
|
||||||
-CXX?=$(CROSS_COMPILE)c++
|
-CXX?=c++
|
||||||
-CC?=$(CROSS_COMPILE)cc
|
-CC?=cc
|
||||||
-STRIP?=strip
|
-STRIP?=strip
|
||||||
-OBJCOPY?=objcopy
|
-OBJCOPY?=objcopy
|
||||||
-
|
-
|
||||||
@ -822,7 +790,7 @@ index f003cfb..0000000
|
|||||||
-ifeq ($(SQLITE), 1)
|
-ifeq ($(SQLITE), 1)
|
||||||
- CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
|
- CXXFLAGS+= -DSQLITE $(shell pkg-config --cflags sqlite3)
|
||||||
-endif
|
-endif
|
||||||
-CFLAGS=$(CXXFLAGS) -g $(DEFINES)
|
-CFLAGS=$(CXXFLAGS) $(DEFINES)
|
||||||
-GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
|
-GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs)
|
||||||
-LIBS+=-L../core -llshw -lresolv $(GTKLIBS)
|
-LIBS+=-L../core -llshw -lresolv $(GTKLIBS)
|
||||||
-ifeq ($(SQLITE), 1)
|
-ifeq ($(SQLITE), 1)
|
||||||
@ -988,4 +956,5 @@ index 36fbdb7..0000000
|
|||||||
-clean:
|
-clean:
|
||||||
- rm -f $(CATALOGS) $(PACKAGENAME).pot
|
- rm -f $(CATALOGS) $(PACKAGENAME).pot
|
||||||
--
|
--
|
||||||
2.25.1
|
2.13.6
|
||||||
|
|
||||||
BIN
lshw-B.02.18.tar.gz
Normal file
BIN
lshw-B.02.18.tar.gz
Normal file
Binary file not shown.
@ -1,135 +0,0 @@
|
|||||||
diff -Naur lshw-B.02.19.2.org/README.md lshw-B.02.19.2.sw/README.md
|
|
||||||
--- lshw-B.02.19.2.org/README.md 2022-03-02 05:57:54.280000000 +0000
|
|
||||||
+++ lshw-B.02.19.2.sw/README.md 2022-03-02 06:01:57.610000000 +0000
|
|
||||||
@@ -14,7 +14,7 @@
|
|
||||||
|
|
||||||
1. Requirements
|
|
||||||
- Linux 2.4.x, 2.6.x, 3.x or 4.x (2.2.x might work, though)
|
|
||||||
- - a PA-RISC-, Alpha-, IA-64- (Itanium-), PowerPC-, ARM- or x86- based machine
|
|
||||||
+ - a PA-RISC-, Alpha-, Sw_64-, IA-64- (Itanium-), PowerPC-, ARM- or x86- based machine
|
|
||||||
- cmake, GNU make or Ninja
|
|
||||||
- an ANSI (or close enough to ANSI compliance) C++ compiler (tested with g++ 2.95.4 and 3.x)
|
|
||||||
- for the (optional) GTK+ graphical user interface, you will need a
|
|
||||||
diff -Naur lshw-B.02.19.2.org/src/core/cpuid.cc lshw-B.02.19.2.sw/src/core/cpuid.cc
|
|
||||||
--- lshw-B.02.19.2.org/src/core/cpuid.cc 2022-03-02 05:57:54.280000000 +0000
|
|
||||||
+++ lshw-B.02.19.2.sw/src/core/cpuid.cc 2022-03-02 06:17:08.250000000 +0000
|
|
||||||
@@ -10,7 +10,7 @@
|
|
||||||
|
|
||||||
__ID("@(#) $Id$");
|
|
||||||
|
|
||||||
-#if defined(__i386__) || defined(__alpha__)
|
|
||||||
+#if defined(__i386__) || defined(__alpha__) || defined(__sw_64__)
|
|
||||||
|
|
||||||
static hwNode *getcache(hwNode & node,
|
|
||||||
int n = 0)
|
|
||||||
@@ -70,7 +70,7 @@
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
-#endif // __i386__ || __alpha__
|
|
||||||
+#endif // __i386__ || __alpha__ || __sw_64__
|
|
||||||
|
|
||||||
#ifdef __i386__
|
|
||||||
|
|
||||||
diff -Naur lshw-B.02.19.2.org/src/core/cpuinfo.cc lshw-B.02.19.2.sw/src/core/cpuinfo.cc
|
|
||||||
--- lshw-B.02.19.2.org/src/core/cpuinfo.cc 2022-03-02 05:57:54.280000000 +0000
|
|
||||||
+++ lshw-B.02.19.2.sw/src/core/cpuinfo.cc 2022-03-02 06:09:36.460000000 +0000
|
|
||||||
@@ -360,6 +360,63 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+static void cpuinfo_sw_64(hwNode & node,
|
|
||||||
+string id,
|
|
||||||
+string value)
|
|
||||||
+{
|
|
||||||
+ static int cpusdetected = 0;
|
|
||||||
+ static int cpusactive = 0;
|
|
||||||
+ unsigned long long frequency = 0;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ hwNode *cpu = getcpu(node, 0);
|
|
||||||
+
|
|
||||||
+ if (id == "platform string" && node.getProduct() == "")
|
|
||||||
+ node.setProduct(value);
|
|
||||||
+ if (id == "system serial number" && node.getSerial() == "")
|
|
||||||
+ node.setSerial(value);
|
|
||||||
+ if (id == "system type")
|
|
||||||
+ node.setVersion(node.getVersion() + " " + value);
|
|
||||||
+ if (id == "system variation")
|
|
||||||
+ node.setVersion(node.getVersion() + " " + value);
|
|
||||||
+ if (id == "system revision")
|
|
||||||
+ node.setVersion(node.getVersion() + " " + value);
|
|
||||||
+
|
|
||||||
+ if (id == "cpus detected")
|
|
||||||
+ cpusdetected = atoi(value.c_str());
|
|
||||||
+ if (id == "cpus active")
|
|
||||||
+ cpusactive = atoi(value.c_str());
|
|
||||||
+ if (id == "cycle frequency [Hz]")
|
|
||||||
+ frequency = atoll(value.c_str());
|
|
||||||
+
|
|
||||||
+ if (cpu)
|
|
||||||
+ {
|
|
||||||
+ cpu->claim(true);
|
|
||||||
+
|
|
||||||
+ if (frequency)
|
|
||||||
+ cpu->setSize(frequency);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ for (i = 1; i < cpusdetected; i++)
|
|
||||||
+ {
|
|
||||||
+ hwNode *mycpu = getcpu(node, i);
|
|
||||||
+
|
|
||||||
+ if (mycpu)
|
|
||||||
+ {
|
|
||||||
+ mycpu->disable();
|
|
||||||
+
|
|
||||||
+ if (cpu)
|
|
||||||
+ mycpu->setSize(cpu->getSize());
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ for (i = 1; i < cpusactive; i++)
|
|
||||||
+ {
|
|
||||||
+ hwNode *mycpu = getcpu(node, i);
|
|
||||||
+
|
|
||||||
+ if (mycpu)
|
|
||||||
+ mycpu->enable();
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
static void cpuinfo_alpha(hwNode & node,
|
|
||||||
string id,
|
|
||||||
string value)
|
|
||||||
@@ -637,6 +694,10 @@
|
|
||||||
{
|
|
||||||
cpuinfo_alpha(n, id, value);
|
|
||||||
}
|
|
||||||
+ else if (plat == "sw_64")
|
|
||||||
+ {
|
|
||||||
+ cpuinfo_sw_64(n, id, value);
|
|
||||||
+ }
|
|
||||||
else if (plat == "ia64")
|
|
||||||
{
|
|
||||||
cpuinfo_ia64(n, id, value);
|
|
||||||
diff -Naur lshw-B.02.19.2.org/src/core/dmi.cc lshw-B.02.19.2.sw/src/core/dmi.cc
|
|
||||||
--- lshw-B.02.19.2.org/src/core/dmi.cc 2022-03-02 05:57:54.280000000 +0000
|
|
||||||
+++ lshw-B.02.19.2.sw/src/core/dmi.cc 2022-03-02 06:11:38.140000000 +0000
|
|
||||||
@@ -734,7 +734,8 @@
|
|
||||||
"Core M3",
|
|
||||||
"Core M5",
|
|
||||||
"Core M7",
|
|
||||||
- "Alpha", /* 0x30 */
|
|
||||||
+ "Sw_64", /* 0x9916 */
|
|
||||||
+ "Alpha", /* 0x30 */
|
|
||||||
"Alpha 21064",
|
|
||||||
"Alpha 21066",
|
|
||||||
"Alpha 21164",
|
|
||||||
diff -Naur lshw-B.02.19.2.org/src/core/pci.cc lshw-B.02.19.2.sw/src/core/pci.cc
|
|
||||||
--- lshw-B.02.19.2.org/src/core/pci.cc 2022-03-02 05:57:54.290000000 +0000
|
|
||||||
+++ lshw-B.02.19.2.sw/src/core/pci.cc 2022-03-02 06:13:58.590000000 +0000
|
|
||||||
@@ -169,6 +169,7 @@
|
|
||||||
#define PCI_CLASS_PROCESSOR_486 0x0b01
|
|
||||||
#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02
|
|
||||||
#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10
|
|
||||||
+#define PCI_CLASS_PROCESSOR_SW_64 0x9916
|
|
||||||
#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20
|
|
||||||
#define PCI_CLASS_PROCESSOR_CO 0x0b40
|
|
||||||
|
|
||||||
Binary file not shown.
23
lshw.spec
23
lshw.spec
@ -1,15 +1,14 @@
|
|||||||
Name: lshw
|
Name: lshw
|
||||||
Version: B.02.19.2
|
Version: B.02.18
|
||||||
Release: 3
|
Release: 21
|
||||||
Summary: Hardware lister
|
Summary: Hardware lister
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: http://ezix.org/project/wiki/HardwareLiSter
|
URL: http://ezix.org/project/wiki/HardwareLiSter
|
||||||
Source0: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz
|
Source0: http://www.ezix.org/software/files/%{name}-%{version}.tar.gz
|
||||||
Patch0: lshw-B.02.18-scandir.patch
|
Patch0: lshw-B.02.18-scandir.patch
|
||||||
|
Patch1: lshw-B.02.18-20cda77.patch
|
||||||
Patch2: lshw-B.02.18-revert-json.patch
|
Patch2: lshw-B.02.18-revert-json.patch
|
||||||
Patch3: lshw-B.02.19.2-cmake.patch
|
Patch3: lshw-B.02.18-cmake.patch
|
||||||
Patch4: lshw-B.02.19.2-sw.patch
|
|
||||||
|
|
||||||
BuildRequires: gcc gcc-c++ cmake gettext
|
BuildRequires: gcc gcc-c++ cmake gettext
|
||||||
BuildRequires: desktop-file-utils libappstream-glib ninja-build
|
BuildRequires: desktop-file-utils libappstream-glib ninja-build
|
||||||
@ -36,12 +35,9 @@ The %{name}-help package contains doc files for %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch00 -p1
|
%patch00 -p1
|
||||||
|
%patch01 -p1
|
||||||
%patch02 -R -p1
|
%patch02 -R -p1
|
||||||
%patch03 -p1
|
%patch03 -p1
|
||||||
%ifarch sw_64
|
|
||||||
%patch04 -p1
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p build && cd build
|
mkdir -p build && cd build
|
||||||
@ -78,15 +74,6 @@ src/lshw -json -disable usb -disable pcmcia -disable isapnp \
|
|||||||
%{_mandir}/man1/lshw.1.gz
|
%{_mandir}/man1/lshw.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 24 2023 guoqinglan <guoqinglan@kylinsec.com.cn> - B.02.19.2-3
|
|
||||||
- fix build error for sw_64
|
|
||||||
|
|
||||||
* Mon Oct 24 2022 wuzx<wuzx1226@qq.com> - B.02.19.2-2
|
|
||||||
- add sw64 patch
|
|
||||||
|
|
||||||
* Wed Jan 27 2021 yuanxin <yuanxin24@huawei.com> - B.02.19.2-1
|
|
||||||
- upgrade version to B.02.19.2
|
|
||||||
|
|
||||||
* Fri Feb 14 2020 chengquan <chengquan3@huawei.com> - B.02.18-21
|
* Fri Feb 14 2020 chengquan <chengquan3@huawei.com> - B.02.18-21
|
||||||
- Rollback some patches for bugfix
|
- Rollback some patches for bugfix
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user