summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-01-04 14:31:42 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-01-16 08:45:56 +0000
commitb7e6dbef56913fa43ea23b842ebe2933d9e0477e (patch)
tree06292d4cbc5acf1eb8da4ca9eabec10dafc274b3 /README.md
parent2e36a74fa8ae2a4b8e06f7752c3876f32a8dcbb3 (diff)
Add functions reference documentationguppy_6.99.4guppy/6.99.46.99.4
Only JSON helpers functions were documented before this commits. This add a description for every function of the afb-helpers library. Bug-AGL: SPEC-2114 Change-Id: I3ae941841ef4ad8e345dd4cd6bc012f6596eadc2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'README.md')
-rw-r--r--README.md96
1 files changed, 90 insertions, 6 deletions
diff --git a/README.md b/README.md
index 03a0bcc..e0d9c5e 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,95 @@
-AFB Utilities
-=============
+# AFB Helpers library
-You should find useful utilities to integrates as submodule in your bindings
-development.
+You should find useful utilities to integrate in your bindings development.
-From your AFB apps repository do the following to integrates this repo:
+This library is the successor of the old git [afb-helpers-submodule](https://gerrit.automotivelinux.org/gerrit/gitweb?p=apps%2Fapp-afb-helpers-submodule.git;a=summary)
+now available as a separated library.
+
+Please refer to the documentation in the `docs` folder for further informations.
+
+## Installation
+
+The afb-helpers library is integrated by default in the AGL SDK since the Guppy
+version (>=7) and is also available as a package for the AGL supported linux
+distributions.
+
+You could find the SDK build from Yocto which embed the afb-helpers library
+here:
+
+* For the [releases](https://download.automotivelinux.org/AGL/release/) >= Guppy
+ in the latest machine's deploy directory. (e.g for Guppy in
+ `latest/<yourmachine>/deploy/sdk` directory)
+* For the [master](https://download.automotivelinux.org/AGL/snapshots/master/)
+ development branch, in the latest machine's deploy directory. (e.g in
+ `latest/<yourmachine>/deploy/sdk` directory)
+
+To install the native package please refer to [this chapter](../host-configuration/docs/1_Prerequisites.md)
+in the AGL documentation to install the AGL repository for your distribution.
+
+Then use your package manager to install the library.
+
+### OpenSuse
+
+```bash
+sudo zypper ref
+sudo zypper install agl-libafb-helpers-devel
+```
+
+### Fedora
```bash
-git submodule add git@github.com:iotbzh/afb-utilities
+sudo dnf ref
+sudo dnf install agl-libafb-helpers-devel
```
+
+### Ubuntu/Debian
+
+```bash
+sudo apt-get update
+sudo apt-get install agl-libafb-helpers-dev
+```
+
+## (Optionnal) Remove the git submodule version
+
+If you already use the afb-helpers component but using the submodule version
+then you have to get rid of it to be sure to link and use the library version.
+To do so, you have to do the following:
+
+* Deinitialize the submodule using `git`
+
+```bash
+# This example assumes that the git submodule is named app-afb-helpers-submodule
+# and is located at your root project repository.
+git submodule deinit app-afb-helpers-submodule
+```
+
+* Remove the submodule relatives lines from the `.gitmodules` file
+
+```bash
+vim .gitmodules
+```
+
+* Remove the `afb-helpers` target link from any CMake target you specified.
+ Those lines look like:
+
+```bash
+TARGET_LINK_LIBRARIES(${TARGET_NAME}
+ afb-helpers # REMOVE THIS LINE
+ ${link_libraries}
+ )
+```
+
+## Add the libafb-helpers as a static library to your binding
+
+In your `config.cmake` file, add a dependency to the afb-helpers library, i.e:
+
+```cmake
+set(PKG_REQUIRED_LIST
+ json-c
+ afb-daemon
+ afb-helpers --> this is the afb-helpers library dependency name.
+)
+```
+
+Or you can also use the [FIND_PACKAGE](https://cmake.org/cmake/help/v3.6/command/find_package.html?highlight=find_package)
+CMake command to add it if you don't use the [cmake-apps-module](../cmakeafbtemplates/0_Abstract.html)