nfv-vim: fix incorrect paths
[pti/rtp.git] / meta-stx / recipes-core / stx-nfv / nfv-vim.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 += " nfv-vim"
17
18 inherit setuptools
19
20 do_configure_prepend () {
21         cd ${S}/nfv/nfv-vim
22         sed -i -e 's|@SYSCONFDIR@|${sysconfdir}|g' \
23                 scripts/vim \
24                 scripts/vim-api \
25                 scripts/vim-webserver \
26                 nfv_vim/config.ini
27         sed -i -e 's|@PYTHONROOT@|${libdir}/python2.7/site-packages|g' nfv_vim/config.ini
28
29         distutils_do_configure
30
31
32 do_compile_prepend () {
33         cd ${S}/nfv/nfv-vim
34         distutils_do_compile
35 }
36
37 do_install_prepend () {
38         cd ${S}/nfv/nfv-vim
39         distutils_do_install
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
48
49 }
50
51 #pkg_postinst_ontarget_${PN} () {
52
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 \
61         ${bindir}/nfv-vim \
62         ${libdir}/python2.7/site-packages/nfv_vim \
63         ${libdir}/python2.7/site-packages/nfv_vim*egg-info \
64         "