Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-core / stx-nfv / mtce-guest.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-guestagent"
17 PACKAGES += " mtce-guestserver"
18
19 do_configure_prepend () {
20         :
21
22
23 do_compile_prepend () {
24         cd ${S}/mtce-guest/src/
25         oe_runmake -e MAJOR="1" MINONR="0" \
26                 INCLUDES=" -I. -I${STAGING_INCDIR}/mtce-common/ -I${STAGING_INCDIR}/mtce-daemon/ " \
27                 CPPFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" build
28 }
29
30 do_install_prepend () {
31
32         cd ${S}/mtce-guest/src/
33         oe_runmake -e install DESTDIR=${D} PREFIX=${D}/usr/ \
34                        SYSCONFDIR=${D}/${sysconfdir} \
35                             LOCALBINDIR=${D}/${bindir} \
36                             UNITDIR=${D}/${systemd_system_unitdir} 
37
38         rm -rf ${D}/var
39         rm -rf ${D}/var/run
40 }
41
42 FILES_mtce-guestserver = " \
43         ${sysconfdir}/mtc/tmp \
44         ${sysconfdir}/mtc/guestServer.ini \
45         ${sysconfdir}/pmon.d/guestServer.conf \
46         ${sysconfdir}/logrotate.d/guestServer.logrotate \
47         ${systemd_system_unitdir}/guestServer.service \
48         ${sysconfdir}/init.d/guestServer \
49         ${bindir}/guestServer \
50         "
51
52 FILES_mtce-guestagent = " \ 
53         ${sysconfdir}/mtc/tmp \
54         ${sysconfdir}/mtc/guestAgent.ini \
55         ${systemd_system_unitdir}/guestAgent.service \
56         ${sysconfdir}/logrotate.d/guestAgent.logrotate \
57         ${sysconfdir}/init.d/guestAgent \
58         ${libdir}/ocf/resource.d/platform/guestAgent \
59         ${bindir}/guestAgent \
60