summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi xin <lixin.fnst@cn.fujitsu.com>2015-06-29 18:15:03 +0900
committerMartin Jansa <Martin.Jansa@gmail.com>2015-07-16 21:09:06 +0200
commit484cfba907b86713b66ba55c96b0ced01cd6f043 (patch)
tree930134e1a5a58a4f090b4cfcf80beffdde205f11
parent63c7ae49d02aec9a6329e00182751c19470b765b (diff)
downloadmeta-openembedded-484cfba907b86713b66ba55c96b0ced01cd6f043.tar.gz
sgpio: add new recipe
Intel SGPIO enclosure management utility. Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
-rw-r--r--meta-oe/recipes-extended/sgpio/sgpio/Makefile-error-fix.patch127
-rw-r--r--meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb26
2 files changed, 153 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/sgpio/sgpio/Makefile-error-fix.patch b/meta-oe/recipes-extended/sgpio/sgpio/Makefile-error-fix.patch
new file mode 100644
index 000000000..709f8316f
--- /dev/null
+++ b/meta-oe/recipes-extended/sgpio/sgpio/Makefile-error-fix.patch
@@ -0,0 +1,127 @@
1Fix Makefile:
2
3* change the file format from dos to unix to avoid do_patch failed.
4* override gcc,SBIN_DIR and INSTALL for cross-compilation.
5
6Upstream-Status: pending
7
8Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
9---
10 Makefile | 107 ++++++++++++++++++++++++++++++++-------------------------------
11 1 file changed, 55 insertions(+), 52 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index 278d966..c2b0bc7 100755
15--- a/Makefile
16+++ b/Makefile
17@@ -1,52 +1,55 @@
18-########################################################################
19-# Copyright (C) 2007-2008, Intel Corp. All rights reserved.
20-#
21-#
22-# This program is free software; you can redistribute it and/or modify it under
23-# the terms of the GNU General Public License as published by the Free Software
24-# Foundation; either version 2 of the License, or (at your option) any later version.
25-#
26-# This program is distributed in the hope that it will be useful, but
27-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
28-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
29-# for more details.
30-#
31-# You should have received a copy of the GNU General Public License along
32-# with this program; if not, write to the Free Software Foundation, Inc.,
33-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34-########################################################################
35-
36-
37-# Intel SGPIO enclosure management utility
38-#
39-# Author: Eric R Hall <Eric.R.Hall@intel.com>
40-
41-
42-MANDIR ?= /usr/local/man
43-ALL = sgpio
44-
45-all: $(ALL)
46-
47-sgpio.o: sgpio.c
48- gcc -g -Wall -c sgpio.c
49-
50-sgpio: sgpio.o
51- gcc -g sgpio.o -o sgpio
52-
53-clean:
54- rm -f sgpio.o sgpio
55-
56-install: $(ALL)
57- for i in $(ALL); do \
58- install $$i /sbin/$$i; \
59- done
60- install -d $(MANDIR)/man1
61- install -m 0644 *.1 $(MANDIR)/man1
62-
63-uninstall:
64- for i in $(ALL); do \
65- rm -f /sbin/$$i; \
66- done
67- for i in $(ALL:=.1); do \
68- rm -f $(MANDIR)/man1/$$i; \
69- done
70+########################################################################
71+# Copyright (C) 2007-2008, Intel Corp. All rights reserved.
72+#
73+#
74+# This program is free software; you can redistribute it and/or modify it under
75+# the terms of the GNU General Public License as published by the Free Software
76+# Foundation; either version 2 of the License, or (at your option) any later version.
77+#
78+# This program is distributed in the hope that it will be useful, but
79+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
80+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
81+# for more details.
82+#
83+# You should have received a copy of the GNU General Public License along
84+# with this program; if not, write to the Free Software Foundation, Inc.,
85+# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
86+########################################################################
87+
88+
89+# Intel SGPIO enclosure management utility
90+#
91+# Author: Eric R Hall <Eric.R.Hall@intel.com>
92+
93+
94+MANDIR ?= /usr/local/man
95+SBIN_DIR = /sbin
96+INSTALL =/usr/bin/install -c
97+ALL = sgpio
98+CFLAGS = -g -Wall
99+
100+all: $(ALL)
101+
102+sgpio.o: sgpio.c
103+ ${CC} $(CFLAGS) -c sgpio.c
104+
105+sgpio: sgpio.o
106+ ${CC} -g sgpio.o -o sgpio
107+
108+clean:
109+ rm -f sgpio.o sgpio
110+
111+install: $(ALL)
112+ for i in $(ALL); do \
113+ $(INSTALL) -D $$i $(SBIN_DIR)/$$i; \
114+ done
115+ $(INSTALL) -d $(MANDIR)/man1
116+ $(INSTALL) -m 0644 *.1 $(MANDIR)/man1
117+
118+uninstall:
119+ for i in $(ALL); do \
120+ rm -f /sbin/$$i; \
121+ done
122+ for i in $(ALL:=.1); do \
123+ rm -f $(MANDIR)/man1/$$i; \
124+ done
125--
1261.8.3.1
127
diff --git a/meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb b/meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb
new file mode 100644
index 000000000..9807a31b9
--- /dev/null
+++ b/meta-oe/recipes-extended/sgpio/sgpio_1.2.0.10.bb
@@ -0,0 +1,26 @@
1SUMMARY = "SGPIO captive backplane tool"
2DESCRIPTION = "Intel SGPIO enclosure management utility"
3
4SRC_URI = " \
5 http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BPN}-1.2-0.10-src.tar.gz/a417bf68da4e9bd79a4664c11d7debd1/${BPN}-1.2-0.10-src.tar.gz \
6 file://Makefile-error-fix.patch \
7"
8SRC_URI[md5sum] = "a417bf68da4e9bd79a4664c11d7debd1"
9SRC_URI[sha256sum] = "9bf8c42acaa247efd9321bdb1fc2390022f0c554d77fbbd4a7363d990fc0270b"
10
11S = "${WORKDIR}/${PN}"
12
13LICENSE = "GPLv2+"
14LIC_FILES_CHKSUM = "file://LICENSE_GPL;md5=393a5ca445f6965873eca0259a17f833"
15
16do_compile_prepend() {
17 oe_runmake clean
18}
19
20do_install() {
21 oe_runmake install \
22 INSTALL="/usr/bin/install -p" \
23 DESTDIR=${D} \
24 SBIN_DIR=${D}/${sbindir} \
25 MANDIR=${D}/${mandir}
26}