On Thu, Jun 03, 2010 at 09:48:47PM +0200, Remy Bohmer wrote: > Adds the Hardware Lister package to ptxdist > A patch is added for the package to make the xml output > compatibility with a xml-parser using tinyxpath. > > Signed-off-by: Bart vdr. Meulen <[email protected]> > Signed-off-by: Remy Bohmer <[email protected]> > --- > .../replace_reserved_xml_keyword.patch | 33 ++++++++ > patches/lshw-B.02.14/series | 1 + > rules/lshw.in | 21 +++++ > rules/lshw.make | 85 > ++++++++++++++++++++ > 4 files changed, 140 insertions(+), 0 deletions(-) > create mode 100644 patches/lshw-B.02.14/replace_reserved_xml_keyword.patch > create mode 100644 patches/lshw-B.02.14/series > create mode 100644 rules/lshw.in > create mode 100644 rules/lshw.make > > diff --git a/patches/lshw-B.02.14/replace_reserved_xml_keyword.patch > b/patches/lshw-B.02.14/replace_reserved_xml_keyword.patch > new file mode 100644 > index 0000000..f508ce7 > --- /dev/null > +++ b/patches/lshw-B.02.14/replace_reserved_xml_keyword.patch > @@ -0,0 +1,33 @@ > +Replace keyword node with hwnode for TinyXpath compatibility > + > +It turns out that within TinyXpath 'node' is a reserved key-word. > +Replace it with 'hwnode' when printing to xml. > + > +Signed-off-by: Bart vdr. Meulen <[email protected]> > +Signed-off-by: Remy Bohmer <[email protected]> > +--- > + src/core/hw.cc | 4 ++-- > + 1 file changed, 2 insertions(+), 2 deletions(-) > + > +Index: lshw-B.02.14/src/core/hw.cc > +=================================================================== > +--- lshw-B.02.14.orig/src/core/hw.cc 2009-10-14 14:49:33.000000000 +0200 > ++++ lshw-B.02.14/src/core/hw.cc 2009-10-14 14:49:49.000000000 +0200 > +@@ -1343,7 +1343,7 @@ string hwNode::asXML(unsigned level) > + if(visible(getClassName())) > + { > + out << spaces(2*level); > +- out << "<node id=\"" << getId() << "\""; > ++ out << "<hwnode id=\"" << getId() << "\""; > + if (disabled()) > + out << " disabled=\"true\""; > + if (claimed()) > +@@ -1596,7 +1596,7 @@ string hwNode::asXML(unsigned level) > + if(visible(getClassName())) > + { > + out << spaces(2*level); > +- out << "</node>" << endl; > ++ out << "</hwnode>" << endl; > + } > + > + return out.str(); > diff --git a/patches/lshw-B.02.14/series b/patches/lshw-B.02.14/series > new file mode 100644 > index 0000000..e0ad077 > --- /dev/null > +++ b/patches/lshw-B.02.14/series > @@ -0,0 +1 @@ > +replace_reserved_xml_keyword.patch > diff --git a/rules/lshw.in b/rules/lshw.in > new file mode 100644 > index 0000000..8cbe128 > --- /dev/null > +++ b/rules/lshw.in > @@ -0,0 +1,21 @@ > +## SECTION=shell_and_console > + > +menuconfig LSHW > + bool > + prompt "lshw " > + select GTK if LSHW_GUI > + help > + 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. > + > +if LSHW > + > +config LSHW_GUI > + bool > + default n > + prompt "install GUI" > + > +endif > + > diff --git a/rules/lshw.make b/rules/lshw.make > new file mode 100644 > index 0000000..8ab63de > --- /dev/null > +++ b/rules/lshw.make > @@ -0,0 +1,85 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2010 by Bart vdr. Meulen <[email protected]> > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_LSHW) += lshw > + > +# > +# Paths and names > +# > +LSHW_VERSION := B.02.14 > +LSHW := lshw-$(LSHW_VERSION) > +LSHW_SUFFIX := tar.gz > +LSHW_URL := http://www.ezix.org/software/files/$(LSHW).$(LSHW_SUFFIX) > +LSHW_SOURCE := $(SRCDIR)/$(LSHW).$(LSHW_SUFFIX) > +LSHW_DIR := $(BUILDDIR)/$(LSHW) > +LSHW_LICENSE := GPLv2 > + > +# > ---------------------------------------------------------------------------- > +# Get > +# > ---------------------------------------------------------------------------- > + > +$(LSHW_SOURCE): > + @$(call targetinfo) > + @$(call get, LSHW) > + > +# > ---------------------------------------------------------------------------- > +# Prepare > +# > ---------------------------------------------------------------------------- > + > +LSHW_CONF_TOOL := NO > +LSHW_MAKE_OPT := $(CROSS_ENV_PROGS) all > +LSHW_INSTALL_OPT := $(CROSS_ENV_PROGS) install
This doesn't work here without the -rpath-link from LDFLAGS (in CROSS_ENV_FLAGS) linking fails here. You probably need to set LSHW*_ENv := $(CROSS_ENV) and provided a patch that merges things correctly. > +ifdef PTXCONF_LSHW_GUI > + LSHW_MAKE_OPT+=gui > + LSHW_INSTALL_OPT+=install-gui Don't indent and align with <tab>:=<space> > +endif > + > +# > ---------------------------------------------------------------------------- > +# Target-Install > +# > ---------------------------------------------------------------------------- > + > +$(STATEDIR)/lshw.targetinstall: > + @$(call targetinfo) > + > + @$(call install_init, lshw) > + @$(call install_fixup, lshw,PACKAGE,lshw) > + @$(call install_fixup, lshw,PRIORITY,optional) > + @$(call install_fixup, lshw,VERSION,$(LSHW_VERSION)) > + @$(call install_fixup, lshw,SECTION,base) > + @$(call install_fixup, lshw,AUTHOR,"Bart vdr. Meulen > <[email protected]>") > + @$(call install_fixup, lshw,DEPENDS,) > + @$(call install_fixup, lshw,DESCRIPTION,missing) > + > + @$(call install_copy, lshw, 0, 0, 0755, -, /usr/sbin/lshw) > + > + @$(call install_copy, lshw, 0, 0, 0755, /usr/share/lshw) > + @$(call install_copy, lshw, 0, 0, 0644, -, /usr/share/lshw/pci.ids) > + @$(call install_copy, lshw, 0, 0, 0644, -, /usr/share/lshw/usb.ids) > + @$(call install_copy, lshw, 0, 0, 0644, -, /usr/share/lshw/oui.txt) > + @$(call install_copy, lshw, 0, 0, 0644, -, /usr/share/lshw/manuf.txt) > + > +ifdef PTXCONF_LSHW_GUI > + @$(call install_copy, lshw, 0, 0, 0755, -, /usr/sbin/gtk-lshw) > + > + @$(call install_copy, lshw, 0, 0, 0755, /usr/share/lshw/artwork) > + @cd $(LSHW_PKGDIR)/usr/share/lshw/artwork; \ > + for file in * ; do \ > + $(call install_copy, lshw, 0, 0, 0644, -, \ > + /usr/share/lshw/artwork$$file); \ /usr/share/lshw/artwork/$$file); \ missing '/' > + done > +endif > + > + @$(call install_finish, lshw) > + @$(call touch) > + > +# vim: syntax=make > -- > 1.7.0.4 > > > -- > ptxdist mailing list > [email protected] > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- ptxdist mailing list [email protected]
