diff options
author | Ole Troan <ot@cisco.com> | 2016-12-01 21:49:03 +0100 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2016-12-02 09:11:11 +0000 |
commit | f14e3bf7b297f3b9eea87af412929bb8f277b315 (patch) | |
tree | cc9fc2313b79936b34bda0c01a354c0633834ba0 /build-root | |
parent | 7be864ad0d8e3b139a277fb4a0234480f0cc3daa (diff) |
API: Packaging of JSON files.
Change-Id: If041b6faf1a091d4758b514f0a8cd800ee0e6a89
Signed-off-by: Ole Troan <ot@cisco.com>
Signed-off-by: Ole Troan <otroan@ot-vpp.cisco.com>
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'build-root')
-rw-r--r-- | build-root/rpm/vpp.spec | 20 | ||||
-rwxr-xr-x | build-root/scripts/find-api-core-contents | 9 | ||||
-rwxr-xr-x | build-root/scripts/find-api-lib-contents | 6 | ||||
-rwxr-xr-x | build-root/scripts/find-plugins-contents | 4 |
4 files changed, 37 insertions, 2 deletions
diff --git a/build-root/rpm/vpp.spec b/build-root/rpm/vpp.spec index 0620234d..5db0c4bd 100644 --- a/build-root/rpm/vpp.spec +++ b/build-root/rpm/vpp.spec @@ -98,7 +98,12 @@ mkdir -p -m755 %{buildroot}%{_bindir} mkdir -p -m755 %{buildroot}%{_unitdir} install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/*/bin/* %{buildroot}%{_bindir} install -p -m 755 %{_mu_build_dir}/%{_vpp_build_dir}/vppapigen/vppapigen %{buildroot}%{_bindir} -install -p -m 755 %{_mu_build_dir}/../vppapigen/pyvppapigen.py %{buildroot}%{_bindir} + +# core api +mkdir -p -m755 %{buildroot}/usr/share/vpp/api +install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/vpp/vpp-api/vpe.api.json %{buildroot}/usr/share/vpp/api +install -p -m 755 %{_mu_build_dir}/%{_vpp_install_dir}/vlib-api/vlibmemory/memclnt.api.json %{buildroot}/usr/share/vpp/api + # # configs # @@ -123,6 +128,10 @@ do ( cd %{buildroot}%{_libdir} && ln -fs $file $(echo $file | sed -e 's/\(\.so\)\.[0-9]\+.*/\1/') ) done +for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/vnet -type f -name '*.api.json' -print ) +do + install -p -m 644 $file %{buildroot}/usr/share/vpp/api +done # Python bindings mkdir -p -m755 %{buildroot}%{python2_sitelib}/vpp_papi @@ -178,6 +187,11 @@ do %{buildroot}/usr/lib/vpp_api_test_plugins/$file done +for file in $(find %{_mu_build_dir}/%{_vpp_install_dir}/plugins -type f -name '*.api.json' -print ) +do + install -p -m 644 $file %{buildroot}/usr/share/vpp/api +done + %post sysctl --system %systemd_post vpp.service @@ -214,12 +228,14 @@ fi /usr/bin/elftool %config /etc/sysctl.d/80-vpp.conf %config /etc/vpp/startup.conf +/usr/share/vpp/api/* %files lib %defattr(-,bin,bin) %exclude %{_libdir}/vpp_plugins %exclude %{_libdir}/vpp_api_test_plugins %{_libdir}/* +/usr/share/vpp/api/* %files python-api %defattr(644,root,root) @@ -229,7 +245,6 @@ fi %defattr(-,bin,bin) /usr/bin/vppapigen /usr/bin/jvpp_gen.py -/usr/bin/pyvppapigen.py %{_includedir}/* %{python2_sitelib}/jvppgen/* /usr/share/doc/vpp/examples/sample-plugin @@ -238,3 +253,4 @@ fi %defattr(-,bin,bin) /usr/lib/vpp_plugins/* /usr/lib/vpp_api_test_plugins/* +/usr/share/vpp/api/* diff --git a/build-root/scripts/find-api-core-contents b/build-root/scripts/find-api-core-contents new file mode 100755 index 00000000..f1f96f1f --- /dev/null +++ b/build-root/scripts/find-api-core-contents @@ -0,0 +1,9 @@ +#!/bin/bash + +for i in $(find ${1}/vpp -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done +for i in $(find ${1}/vlib-api -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done + diff --git a/build-root/scripts/find-api-lib-contents b/build-root/scripts/find-api-lib-contents new file mode 100755 index 00000000..562db7b8 --- /dev/null +++ b/build-root/scripts/find-api-lib-contents @@ -0,0 +1,6 @@ +#!/bin/bash + +for i in $(find ${1}/vnet -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done + diff --git a/build-root/scripts/find-plugins-contents b/build-root/scripts/find-plugins-contents index 8d1a4d5a..a5a52acf 100755 --- a/build-root/scripts/find-plugins-contents +++ b/build-root/scripts/find-plugins-contents @@ -9,3 +9,7 @@ done for i in ${1}/plugins/lib64/vpp_api_test_plugins/*.so; do echo ../${i} /usr/lib/vpp_api_test_plugins >> ${2} done + +for i in $(find ${1}/plugins -name *.api.json -type f -print); do + echo ../${i} /usr/share/vpp/api/ >> ${2} +done |