Patchwork [RFC,7/8] package/iprutils: Add IBM Power RAID utilities

login
register
mail settings
Submitter Jeremy Kerr
Date Jan. 16, 2014, 8:52 a.m.
Message ID <1389862338.919734.499084473099.7.gpush@pablo>
Download mbox | patch
Permalink /patch/311641/
State Superseded
Headers show

Comments

Jeremy Kerr - Jan. 16, 2014, 8:52 a.m.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

---
 package/Config.in                                |    1 
 package/iprutils/Config.in                       |   10 +++++
 package/iprutils/iprutils-dont-use-gettext.patch |   30 +++++++++++++++
 package/iprutils/iprutils.mk                     |   27 +++++++++++++
 4 files changed, 68 insertions(+)
Jerzy Grzegorek - Jan. 16, 2014, 1:24 p.m.
Hi Jeremy,

> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
>
> ---
>   package/Config.in                                |    1
>   package/iprutils/Config.in                       |   10 +++++
>   package/iprutils/iprutils-dont-use-gettext.patch |   30 +++++++++++++++

iprutils-01-dont-use-gettext.patch


>   package/iprutils/iprutils.mk                     |   27 +++++++++++++
>   4 files changed, 68 insertions(+)

[...]

> diff --git a/package/iprutils/iprutils.mk b/package/iprutils/iprutils.mk
> new file mode 100644
> index 00000000..0aa94f38
> --- /dev/null
> +++ b/package/iprutils/iprutils.mk
> @@ -0,0 +1,27 @@
> +#############################################################

80 of # signs

> +#
> +# iprutils
> +#
> +#############################################################

ditto

> +
> +IPRUTILS_VERSION = 2.3.15
> +IPRUTILS_SITE = http://downloads.sourceforge.net/project/iprdd/iprutils%20for%202.6%20kernels/$(IPRUTILS_VERSION)
> +IPRUTILS_SOURCE=iprutils-$(IPRUTILS_VERSION)-src.tgz

IPRUTILS_SOURCE = iprutils-$(IPRUTILS_VERSION)-src.tgz


Regards,
Jerzy

> +IPRUTILS_DEPENDENCIES = ncurses libsysfs pciutils
> +IPRUTILS_LICENSE = Common Public License Version 1.0
> +IPRUTILS_LICENSE_FILES = LICENSE
> +
> +define IPRUTILS_BUILD_CMDS
> +	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
> +endef
> +
> +define IPRUTILS_INSTALL_TARGET_CMDS
> +        $(INSTALL) -d $(TARGET_DIR)/sbin
> +        $(INSTALL) -D --mode=755 $(@D)/iprconfig $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=755 $(@D)/iprupdate $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=755 $(@D)/iprdump $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=755 $(@D)/iprinit $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=700 $(@D)/iprdbg $(TARGET_DIR)/sbin/
> +endef
> +
> +$(eval $(generic-package))
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
Jeremy Kerr - Jan. 17, 2014, 1:58 a.m.
Hi Jerzy,

Thanks for the review. Comments inline:

>>   package/Config.in                                |    1
>>   package/iprutils/Config.in                       |   10 +++++
>>   package/iprutils/iprutils-dont-use-gettext.patch |   30 +++++++++++++++
> 
> iprutils-01-dont-use-gettext.patch

Makes sense. Fixed, along with the other patches introduced in this series.

>> diff --git a/package/iprutils/iprutils.mk b/package/iprutils/iprutils.mk
>> new file mode 100644
>> index 00000000..0aa94f38
>> --- /dev/null
>> +++ b/package/iprutils/iprutils.mk
>> @@ -0,0 +1,27 @@
>> +#############################################################
> 
> 80 of # signs

Fixed, including other new .mk files in this series

>> +
>> +IPRUTILS_VERSION = 2.3.15
>> +IPRUTILS_SITE =
>> http://downloads.sourceforge.net/project/iprdd/iprutils%20for%202.6%20kernels/$(IPRUTILS_VERSION)
>>
>> +IPRUTILS_SOURCE=iprutils-$(IPRUTILS_VERSION)-src.tgz
> 
> IPRUTILS_SOURCE = iprutils-$(IPRUTILS_VERSION)-src.tgz

Fixed.

I've updated my git tree based on your feedback, I'll repost after a
little while, in case there are any more changes requested.

Cheers,


Jeremy
Thomas Petazzoni - Jan. 30, 2014, 8:54 p.m.
Dear Jeremy Kerr,

On Thu, 16 Jan 2014 16:52:18 +0800, Jeremy Kerr wrote:

> +define IPRUTILS_INSTALL_TARGET_CMDS
> +        $(INSTALL) -d $(TARGET_DIR)/sbin
> +        $(INSTALL) -D --mode=755 $(@D)/iprconfig $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=755 $(@D)/iprupdate $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=755 $(@D)/iprdump $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=755 $(@D)/iprinit $(TARGET_DIR)/sbin/
> +        $(INSTALL) -D --mode=700 $(@D)/iprdbg $(TARGET_DIR)/sbin/

We generally do:

	$(INSTALL) -D -m 0755 $(@D)/iprconfig $(TARGET_DIR)/sbin/iprconfig

this also avoids the need to create $(TARGET_DIR)/sbin in the first line.

Thomas

Patch

diff --git a/package/Config.in b/package/Config.in
index f650476c..a9fc035f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1000,6 +1000,7 @@  endif
 source "package/cpuload/Config.in"
 source "package/dsp-tools/Config.in"
 source "package/htop/Config.in"
+source "package/iprutils/Config.in"
 source "package/keyutils/Config.in"
 source "package/kmod/Config.in"
 source "package/lxc/Config.in"
diff --git a/package/iprutils/Config.in b/package/iprutils/Config.in
new file mode 100644
index 00000000..d72688f2
--- /dev/null
+++ b/package/iprutils/Config.in
@@ -0,0 +1,10 @@ 
+config BR2_PACKAGE_IPRUTILS
+	bool "iprutils"
+	select BR2_PACKAGE_NCURSES
+	select BR2_PACKAGE_NCURSES_TARGET_PANEL
+	select BR2_PACKAGE_NCURSES_TARGET_FORM
+	select BR2_PACKAGE_NCURSES_TARGET_MENU
+	select BR2_PACKAGE_LIBSYSFS
+	select BR2_PACKAGE_PCIUTILS
+	help
+	  System utilities for IBM Power RAID devices
diff --git a/package/iprutils/iprutils-dont-use-gettext.patch b/package/iprutils/iprutils-dont-use-gettext.patch
new file mode 100644
index 00000000..8d3d5dd9
--- /dev/null
+++ b/package/iprutils/iprutils-dont-use-gettext.patch
@@ -0,0 +1,30 @@ 
+From 0aa3952890e14f5447147ae4d0d37c515e4fefea Mon Sep 17 00:00:00 2001
+From: Jeremy Kerr <jk@ozlabs.org>
+Date: Fri, 26 Jul 2013 13:07:22 +0800
+Subject: [PATCH] iprconfig: Don't use gettext
+
+... since we don't have any translations.
+
+Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
+---
+ iprconfig.h |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/iprconfig.h b/iprconfig.h
+index 867b5ac..a9cdf5e 100644
+--- a/iprconfig.h
++++ b/iprconfig.h
+@@ -11,9 +11,7 @@
+  *
+  **/
+ 
+-#include <libintl.h>
+-
+-#define _(string) gettext(string)
++#define _(string) (string)
+ #define __(string) (string)
+ #define EXIT_FLAG		0x8000	/* stops at given screen on exit call */
+ #define CANCEL_FLAG		0x4000	/* stops at given screen on quit call */
+-- 
+1.7.10.4
+
diff --git a/package/iprutils/iprutils.mk b/package/iprutils/iprutils.mk
new file mode 100644
index 00000000..0aa94f38
--- /dev/null
+++ b/package/iprutils/iprutils.mk
@@ -0,0 +1,27 @@ 
+#############################################################
+#
+# iprutils
+#
+#############################################################
+
+IPRUTILS_VERSION = 2.3.15
+IPRUTILS_SITE = http://downloads.sourceforge.net/project/iprdd/iprutils%20for%202.6%20kernels/$(IPRUTILS_VERSION)
+IPRUTILS_SOURCE=iprutils-$(IPRUTILS_VERSION)-src.tgz
+IPRUTILS_DEPENDENCIES = ncurses libsysfs pciutils
+IPRUTILS_LICENSE = Common Public License Version 1.0
+IPRUTILS_LICENSE_FILES = LICENSE
+
+define IPRUTILS_BUILD_CMDS
+	$(MAKE) CC=$(TARGET_CC) LD=$(TARGET_LD) -C $(@D) all
+endef
+
+define IPRUTILS_INSTALL_TARGET_CMDS
+        $(INSTALL) -d $(TARGET_DIR)/sbin
+        $(INSTALL) -D --mode=755 $(@D)/iprconfig $(TARGET_DIR)/sbin/
+        $(INSTALL) -D --mode=755 $(@D)/iprupdate $(TARGET_DIR)/sbin/
+        $(INSTALL) -D --mode=755 $(@D)/iprdump $(TARGET_DIR)/sbin/
+        $(INSTALL) -D --mode=755 $(@D)/iprinit $(TARGET_DIR)/sbin/
+        $(INSTALL) -D --mode=700 $(@D)/iprdbg $(TARGET_DIR)/sbin/
+endef
+
+$(eval $(generic-package))