Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-core / stx-metal / mtce-common.inc
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 PACKAGES += " mtce-common"
17
18
19
20 RDEPENDS_mtce-common = " \
21         util-linux \
22         bash \
23         systemd \
24         dpkg \
25         time \
26         libevent \
27         expect \
28         json-c \
29         python-rtslib-fb \
30         fm-common \
31         "
32
33 do_configure_prepend () {
34         :
35
36
37 do_compile_prepend () {
38         cd ${S}/mtce-common/src/
39         oe_runmake clean
40         oe_runmake -e build VER=0 VER_MJR=1 \
41                 CCFLAGS="${CXXFLAGS} -DBUILDINFO=\"\\\"\$\$(date)\\\"\"" 
42 }
43
44 do_install_prepend () {
45
46         cd ${S}/mtce-common/src
47
48         install -m 755 -d ${D}/${libdir}
49
50         install -m 644 -p -D daemon/libdaemon.a ${D}/${libdir}
51         install -m 644 -p -D common/libcommon.a ${D}/${libdir}
52         install -m 644 -p -D common/libthreadUtil.a ${D}/${libdir}
53         install -m 644 -p -D common/libbmcUtils.a ${D}/${libdir}
54         install -m 644 -p -D common/libpingUtil.a ${D}/${libdir}
55         install -m 644 -p -D common/libnodeBase.a ${D}/${libdir}
56         install -m 644 -p -D common/libregexUtil.a ${D}/${libdir}
57         install -m 644 -p -D common/libhostUtil.a ${D}/${libdir}
58
59         # mtce-common headers required to bring in nodeBase.h
60         install -m 755 -d ${D}/${includedir}
61         install -m 755 -d ${D}/${includedir}/mtce-common
62         install -m 644 -p -D common/fitCodes.h ${D}/${includedir}/mtce-common
63         install -m 644 -p -D common/logMacros.h ${D}/${includedir}/mtce-common
64         install -m 644 -p -D common/returnCodes.h ${D}/${includedir}/mtce-common
65         install -m 644 -p -D common/nodeTimers.h ${D}/${includedir}/mtce-common
66
67         # mtce-common headers required to build mtce-guest
68         install -m 644 -p -D common/hostClass.h ${D}/${includedir}/mtce-common
69         install -m 644 -p -D common/httpUtil.h ${D}/${includedir}/mtce-common
70         install -m 644 -p -D common/jsonUtil.h ${D}/${includedir}/mtce-common
71         install -m 644 -p -D common/msgClass.h ${D}/${includedir}/mtce-common
72         install -m 644 -p -D common/nodeBase.h ${D}/${includedir}/mtce-common
73         install -m 644 -p -D common/nodeEvent.h ${D}/${includedir}/mtce-common
74         install -m 644 -p -D common/nodeMacro.h ${D}/${includedir}/mtce-common
75         install -m 644 -p -D common/nodeUtil.h ${D}/${includedir}/mtce-common
76         install -m 644 -p -D common/timeUtil.h ${D}/${includedir}/mtce-common
77
78         # mtce-daemon headers required to build mtce-guest
79         install -m 755 -d ${D}/${includedir}/mtce-daemon
80         install -m 644 -p -D daemon/daemon_ini.h ${D}/${includedir}/mtce-daemon
81         install -m 644 -p -D daemon/daemon_common.h ${D}/${includedir}/mtce-daemon
82         install -m 644 -p -D daemon/daemon_option.h ${D}/${includedir}/mtce-daemon
83
84         # remaining mtce-common headers required to build mtce
85         install -m 644 -p -D common/alarmUtil.h ${D}/${includedir}/mtce-common
86         install -m 644 -p -D common/hostUtil.h ${D}/${includedir}/mtce-common
87         install -m 644 -p -D common/ipmiUtil.h ${D}/${includedir}/mtce-common
88         install -m 644 -p -D common/redfishUtil.h ${D}/${includedir}/mtce-common
89         install -m 644 -p -D common/bmcUtil.h ${D}/${includedir}/mtce-common
90         install -m 644 -p -D common/nlEvent.h ${D}/${includedir}/mtce-common
91         install -m 644 -p -D common/pingUtil.h ${D}/${includedir}/mtce-common
92         install -m 644 -p -D common/regexUtil.h ${D}/${includedir}/mtce-common
93         install -m 644 -p -D common/threadUtil.h ${D}/${includedir}/mtce-common
94         install -m 644 -p -D common/tokenUtil.h ${D}/${includedir}/mtce-common
95         install -m 644 -p -D common/secretUtil.h ${D}/${includedir}/mtce-common
96 }
97
98 # Headers, and static devs go into stx-mtce-dev 
99 # and stx-mtce-staticdev packages respecitively
100 FILES_mtce-common = " "