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 PACKAGES += " nfv-vim"
20 do_configure_prepend () {
22 sed -i -e 's|@SYSCONFDIR@|${sysconfdir}|g' \
25 scripts/vim-webserver \
27 sed -i -e 's|@PYTHONROOT@|${libdir}/python2.7/site-packages|g' nfv_vim/config.ini
29 distutils_do_configure
32 do_compile_prepend () {
37 do_install_prepend () {
40 install -d -m 755 ${D}/usr/lib/ocf/resource.d/nfv
41 install -p -D -m 755 scripts/vim ${D}/usr/lib/ocf/resource.d/nfv/vim
42 install -p -D -m 755 scripts/vim-api ${D}/usr/lib/ocf/resource.d/nfv/vim-api
43 install -p -D -m 755 scripts/vim-webserver ${D}/usr/lib/ocf/resource.d/nfv/vim-webserver
44 install -d -m 755 ${D}/${sysconfdir}/nfv/
45 install -d -m 755 ${D}/${sysconfdir}/nfv/vim/
46 install -p -D -m 600 nfv_vim/config.ini ${D}/${sysconfdir}/nfv/vim/config.ini
47 install -p -D -m 600 nfv_vim/debug.ini ${D}/${sysconfdir}/nfv/vim/debug.ini
51 #pkg_postinst_ontarget_${PN} () {
53 FILES_nfv-vim_append = " \
54 ${sysconfdir}/nfv/vim \
55 ${libdir}/ocf/resource.d/nfv/vim \
56 ${libdir}/ocf/resource.d/nfv/vim-api \
57 ${libdir}/ocf/resource.d/nfv/vim-webserver \
58 ${bindir}/nfv-vim-webserver \
59 ${bindir}/nfv-vim-api \
60 ${bindir}/nfv-vim-manage \
62 ${libdir}/python2.7/site-packages/nfv_vim \
63 ${libdir}/python2.7/site-packages/nfv_vim*egg-info \