diff --git a/user/gtk-lshw b/user/gtk-lshw new file mode 120000 index 00000000000..c66e9f1622a --- /dev/null +++ b/user/gtk-lshw @@ -0,0 +1 @@ +lshw \ No newline at end of file diff --git a/user/lshw/patches/0001-use-bin-instead-of-sbin.patch b/user/lshw/patches/0001-use-bin-instead-of-sbin.patch new file mode 100644 index 00000000000..170c7323f19 --- /dev/null +++ b/user/lshw/patches/0001-use-bin-instead-of-sbin.patch @@ -0,0 +1,49 @@ +From 46208ad404268af97fe1fcae1ffd9d4b7ddd1e30 Mon Sep 17 00:00:00 2001 +From: Guilhem Baccialone +Date: Sun, 26 Jan 2025 21:54:34 +0100 +Subject: [PATCH 1/2] use /bin instead of /sbin + +--- + src/Makefile | 2 +- + src/core/config.h | 2 +- + src/gui/integration/console.apps | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index ac726d0..9ff435a 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -7,7 +7,7 @@ ZLIB?=0 + + DESTDIR?=/ + PREFIX?=/usr +-SBINDIR=$(PREFIX)/sbin ++SBINDIR=$(PREFIX)/bin + MANDIR=$(PREFIX)/share/man + DATADIR=$(PREFIX)/share + INSTALL?=install -p +diff --git a/src/core/config.h b/src/core/config.h +index 69023fd..3f64ce3 100644 +--- a/src/core/config.h ++++ b/src/core/config.h +@@ -22,7 +22,7 @@ + #endif + + #ifndef SBINDIR +-#define SBINDIR PREFIX"/sbin" ++#define SBINDIR PREFIX"/bin" + #endif + + #ifndef DATADIR +diff --git a/src/gui/integration/console.apps b/src/gui/integration/console.apps +index 09973cb..e497973 100644 +--- a/src/gui/integration/console.apps ++++ b/src/gui/integration/console.apps +@@ -1,3 +1,3 @@ + USER=root +-PROGRAM=/usr/sbin/gtk-lshw ++PROGRAM=/usr/bin/gtk-lshw + SESSION=true +-- +2.48.1 + diff --git a/user/lshw/patches/0002-install-files-from-integration-s-folder.patch b/user/lshw/patches/0002-install-files-from-integration-s-folder.patch new file mode 100644 index 00000000000..50320fc3fae --- /dev/null +++ b/user/lshw/patches/0002-install-files-from-integration-s-folder.patch @@ -0,0 +1,41 @@ +From 8686a49843b0cc67782115e149a9b4971575996f Mon Sep 17 00:00:00 2001 +From: Guilhem Baccialone +Date: Sun, 26 Jan 2025 22:02:24 +0100 +Subject: [PATCH 2/2] install files from integration's folder + +--- + src/Makefile | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/Makefile b/src/Makefile +index 9ff435a..b5a837a 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -10,6 +10,7 @@ PREFIX?=/usr + SBINDIR=$(PREFIX)/bin + MANDIR=$(PREFIX)/share/man + DATADIR=$(PREFIX)/share ++LIBDIR=$(PREFIX)/lib + INSTALL?=install -p + STRIP?=strip + GZIP?=gzip -9 +@@ -136,8 +137,16 @@ install-gui: gui + $(INSTALL) -m 0755 gui/gtk-$(PACKAGENAME) $(DESTDIR)/$(SBINDIR) + $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)/artwork + $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)/ui ++ $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/applications ++ $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/metainfo ++ $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/doc/$(PACKAGENAME) ++ $(INSTALL) -d -m 0755 $(DESTDIR)/$(LIBDIR)/pam.d + $(INSTALL) -m 0644 gui/*.ui $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)/ui + $(INSTALL) -m 0644 gui/artwork/*.svg $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)/artwork ++ $(INSTALL) -m 0644 gui/integration/gtk-lshw.desktop $(DESTDIR)/$(DATADIR)/applications ++ $(INSTALL) -m 0644 gui/integration/gtk-lshw.appdata.xml $(DESTDIR)/$(DATADIR)/metainfo ++ $(INSTALL) -T -m 0644 gui/integration/gtk-lshw.pam $(DESTDIR)/$(LIBDIR)/pam.d/gtk-lshw ++ $(INSTALL) -m 0644 gui/integration/console.apps $(DESTDIR)/$(DATADIR)/doc/$(PACKAGENAME) + + clean: + rm -f $(PACKAGENAME).o $(PACKAGENAME) $(PACKAGENAME)-static $(PACKAGENAME)-compressed +-- +2.48.1 + diff --git a/user/lshw/template.py b/user/lshw/template.py new file mode 100644 index 00000000000..dd719d8d5f3 --- /dev/null +++ b/user/lshw/template.py @@ -0,0 +1,50 @@ +pkgname = "lshw" +pkgver = "02.20" +pkgrel = 0 +build_style = "makefile" +make_build_args = [ + "all", + "gui", + f"VERSION={pkgver}", + "NO_VERSION_CHECK=1", + "ZLIB=1", +] +make_install_args = [ + "install", + "install-gui", + f"VERSION={pkgver}", + "NO_VERSION_CHECK=1", + "ZLIB=1", +] +make_use_env = True +hostmakedepends = ["gettext", "pkgconf"] +makedepends = [ + "gtk+3-devel", + "linux-headers", + "zlib-ng-compat-devel", +] +pkgdesc = "Hardware lister" +maintainer = "Guilhem Baccialone " +license = "GPL-2.0-only" +url = "https://ezix.org/project/wiki/HardwareLiSter" +source = f"https://www.ezix.org/software/files/lshw-B.{pkgver}.tar.gz" +sha256 = "06d9cf122422220e5dc94e8ea5b01816a69bb6b59368f63d7f21fff31fc6922a" +# no tests available +options = ["!check"] + + +@subpackage("gtk-lshw") +def _(self): + self.subdesc = "GTK UI" + self.depends = [ + self.parent, + ] + return [ + "cmd:gtk-lshw", + "usr/share/lshw/artwork", + "usr/share/lshw/ui", + "usr/share/applications", + "usr/share/metainfo", + "usr/share/doc/lshw", + "usr/lib/pam.d", + ] diff --git a/user/lshw/update.py b/user/lshw/update.py new file mode 100644 index 00000000000..e83e4a29cce --- /dev/null +++ b/user/lshw/update.py @@ -0,0 +1,2 @@ +url = "https://www.ezix.org/software/files" +pattern = r"lshw-[A-Z]\.([0-9]{2,}(?:\.[0-9]{2,}){1,})\.tar\.gz"