Patchwork [07/10] dmidecode: new package

login
register
mail settings
Submitter Thomas Petazzoni
Date June 2, 2012, 4:13 p.m.
Message ID <774519e24bff943a30688e14d34e6e37bb57ed4e.1338653505.git.thomas.petazzoni@free-electrons.com>
Download mbox | patch
Permalink /patch/162433/
State Accepted
Commit 9d3547529b87ce3bddfcdc962e0c9d6d2b2ed9d5
Headers show

Comments

Thomas Petazzoni - June 2, 2012, 4:13 p.m.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Config.in                                  |    1 +
 package/dmidecode/Config.in                        |    9 +++++
 .../dmidecode/dmidecode-build-system-fixes.patch   |   35 ++++++++++++++++++++
 package/dmidecode/dmidecode.mk                     |   18 ++++++++++
 4 files changed, 63 insertions(+)
 create mode 100644 package/dmidecode/Config.in
 create mode 100644 package/dmidecode/dmidecode-build-system-fixes.patch
 create mode 100644 package/dmidecode/dmidecode.mk
Peter Korsgaard - June 11, 2012, 8:44 p.m.
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

Patch

diff --git a/package/Config.in b/package/Config.in
index 53d6bba..09ca9dd 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -173,6 +173,7 @@  source "package/dbus-python/Config.in"
 if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 source "package/devmem2/Config.in"
 endif
+source "package/dmidecode/Config.in"
 source "package/dmraid/Config.in"
 source "package/dosfstools/Config.in"
 source "package/e2fsprogs/Config.in"
diff --git a/package/dmidecode/Config.in b/package/dmidecode/Config.in
new file mode 100644
index 0000000..22272ed
--- /dev/null
+++ b/package/dmidecode/Config.in
@@ -0,0 +1,9 @@ 
+config BR2_PACKAGE_DMIDECODE
+	bool "dmidecode"
+	depends on BR2_i386 || BR2_x86_64
+	help
+	  Dmidecode reports information about your system's hardware
+	  as described in your system BIOS according to the SMBIOS/DMI
+	  standard.
+
+	  http://www.nongnu.org/dmidecode/
diff --git a/package/dmidecode/dmidecode-build-system-fixes.patch b/package/dmidecode/dmidecode-build-system-fixes.patch
new file mode 100644
index 0000000..275f9df
--- /dev/null
+++ b/package/dmidecode/dmidecode-build-system-fixes.patch
@@ -0,0 +1,35 @@ 
+Minor build system fixes
+
+Usual build system fixes to allow CC/CFLAGS/LDFLAGS to be overriden
+from the command line, and completed by additional flags from the
+Makefile.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -12,9 +12,10 @@
+ #   (at your option) any later version.
+ #
+ 
+-CC      = gcc
+-CFLAGS  = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+-          -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
++CC      ?= gcc
++override CFLAGS  += \
++	-W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
++        -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
+ #CFLAGS += -DBIGENDIAN
+ #CFLAGS += -DALIGNMENT_WORKAROUND
+ 
+@@ -23,7 +24,7 @@
+ #CFLAGS += -g
+ 
+ # Pass linker flags here
+-LDFLAGS =
++override LDFLAGS +=
+ 
+ DESTDIR =
+ prefix  = /usr/local
diff --git a/package/dmidecode/dmidecode.mk b/package/dmidecode/dmidecode.mk
new file mode 100644
index 0000000..a036a7a
--- /dev/null
+++ b/package/dmidecode/dmidecode.mk
@@ -0,0 +1,18 @@ 
+#############################################################
+#
+# dmidecode
+#
+#############################################################
+
+DMIDECODE_VERSION = 2.11
+DMIDECODE_SITE    = http://download.savannah.gnu.org/releases/dmidecode/
+
+define DMIDECODE_BUILD_CMDS
+	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+endef
+
+define DMIDECODE_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) prefix=/usr DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(call GENTARGETS))