2 ## Copyright (C) 2019 Wind River Systems, Inc.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
25 PACKAGECONFIG = "libcap-ng ssl dpdk"
26 PACKAGECONFIG[ssl] = "--enable-ssl,--disable-ssl,openssl,"
27 PACKAGECONFIG[dpdk] = "--with-dpdk=${STAGING_DIR_TARGET}${DPDK_INSTALL_DIR}/share/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,"
35 do_configure_append () {
39 do_compile_append () {
43 do_install_append () {
45 install -d -p -m0755 ${D}/${base_libdir}/udev/rules.d
46 install -d -m0755 ${D}/${systemd_system_unitdir}
47 install -p -m0644 rhel/usr_lib_udev_rules.d_91-vfio.rules ${D}/${base_libdir}/udev/rules.d/91-vfio.rules
50 rhel/usr_lib_systemd_system_ovs-delete-transient-ports.service \
51 ${D}/${systemd_system_unitdir}/ovs-delete-transient-ports.service
54 rhel/usr_lib_systemd_system_ovn-controller.service \
55 ${D}/${systemd_system_unitdir}/ovn-controller.service \
58 rhel/usr_lib_systemd_system_ovn-controller-vtep.service \
59 ${D}/${systemd_system_unitdir}/ovn-controller-vtep.service \
62 rhel/usr_lib_systemd_system_ovn-northd.service \
63 ${D}/${systemd_system_unitdir}/ovn-northd.service \
66 # TODO: Do we need to use sysv?
68 # install -m 0755 rhel/etc_init.d_openvswitch \
69 # $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init
71 # TODO: Is this the best solution?
72 # install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/
73 # install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \
74 # $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
75 # install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \
76 # $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
77 # TODO: warrior builds openvswitch with python3.
78 # install -d -m 0755 $RPM_BUILD_ROOT%{python2_sitelib}
79 # cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \
80 # $RPM_BUILD_ROOT%{python2_sitelib}
82 # TODO: who needs this script?
83 # install -p -D -m 0755 \
84 # rhel/usr_share_openvswitch_scripts_ovs-systemd-reload \
85 # $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-systemd-reload
88 install -d -p -m0755 ${D}/${sysconfdir}/logrotate.d
89 install -p -D -m 0644 rhel/etc_logrotate.d_openvswitch \
90 ${D}/${sysconfdir}/logrotate.d/openvswitch
93 install -d -p -m 0755 ${D}/${sharedstatedir}/openvswitch
94 install -d -p -m 0755 ${D}/${libdir}/firewalld/services/
95 install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \
96 ${D}/${libdir}/firewalld/services/ovn-central-firewall-service.xml
98 install -d -p -m 0755 ${D}/${libdir}/ocf/resource.d/ovn
99 ln -s ${datadir}/openvswitch/scripts/ovndb-servers.ocf ${D}/${libdir}/ocf/resource.d/ovn/ovndb-servers
101 if ${@bb.utils.contains('PACKAGECONFIG', 'dpdk', 'true', 'false', d)}; then
102 install -m 0755 ${STAGING_DATADIR}/dpdk/usertools/dpdk-pmdinfo.py ${D}${datadir}/openvswitch/scripts/dpdk-pmdinfo.py
103 install -m 0755 ${STAGING_DATADIR}/dpdk/usertools/dpdk-devbind.py ${D}${datadir}/openvswitch/scripts/dpdk-devbind.py
109 FILES_${PN}_append = " \