summaryrefslogtreecommitdiffstats
path: root/recipes-extended/dlt-daemon/dlt-daemon_2.11.1.bb
blob: b521bca91b15fccce9260a44c16ace531ecd93c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
SUMMARY = "Diagnostic Log and Trace"
DESCRIPTION = "This component provides a standardised log and trace interface, \
based on the standardised protocol specified in the AUTOSAR standard 4.0 DLT. \
This component can be used by GENIVI components and other applications as \
logging facility providing: \
- the DLT shared library \
- the DLT daemon, including startup scripts \
- the DLT daemon adaptors- the DLT client console utilities \
- the DLT test applications"
HOMEPAGE = "https://www.genivi.org/"
SECTION = "console/utils"
LICENSE = "MPLv2"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=99ba60c3fad7eaf8c56bca6dd75cba09 \
                    file://MPL.txt;md5=ccdb2761cef70c8b2612624c323f89dc"

DEPENDS = "dbus zlib pigz-native"
do_unpack[depends] += "pigz-native:do_populate_sysroot"

# FIX ME
# This should be TAG = "v${PV}" but yocto doesn't support lightweight tags for now
# https://bugzilla.yoctoproject.org/show_bug.cgi?id=6881
TAG = "b8b3ea3a31f7deb681941a19878c82e7b7350ae7"
BRANCH = "v2.11.x"
SRC_URI = "git://git.projects.genivi.org/${PN}.git;branch=${BRANCH};tag=${TAG} \
           file://0001-Fix-build-with-systemd-209.patch \
           file://0002-Don-t-execute-processes-as-a-specific-user.patch \
           file://0003-systemd-unit-type-should-be-in-lowercase-so-use-Type.patch \
           file://0004-Modify-systemd-config-directory.patch"
S = "${WORKDIR}/git"

inherit autotools gettext cmake systemd

# -fPIC is needed to prevent relocation errors when we compile gtest with
# Yocto security flags. See this issue for more details:
#
# https://github.com/google/googletest/issues/854
#
# If that issue is fixed, we can probably remove the manual -fPIC flags here.
OECMAKE_C_FLAGS += "-fPIC"
OECMAKE_CXX_FLAGS += "-fPIC"

PACKAGES += "${PN}-systemd"
SYSTEMD_PACKAGES = "${PN} ${PN}-systemd"
SYSTEMD_SERVICE_${PN} = "dlt-system.service dlt.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
SYSTEMD_SERVICE_${PN}-systemd = "dlt-example-user.service \
    dlt-dbus.service \
    dlt-adaptor-udp.service \
    dlt-receive.service"
SYSTEMD_AUTO_ENABLE_${PN}-systemd = "disable"

EXTRA_OECMAKE = "-DWITH_SYSTEMD=ON"

FILES_${PN}-doc += "/usr/share/dlt-filetransfer"
CT_SRC_DIR_PATTERN "*") # Compilation Mode (DEBUG, RELEASE) # ---------------------------------- #set(BUILD_TYPE "DEBUG") # Kernel selection if needed. You can choose between a # mandatory version to impose a minimal version. # Or check Kernel minimal version and just print a Warning # about missing features and define a preprocessor variable # to be used as preprocessor condition in code to disable # incompatibles features. Preprocessor define is named # KERNEL_MINIMAL_VERSION_OK. # # NOTE*** FOR NOW IT CHECKS KERNEL Yocto environment and # Yocto SDK Kernel version. # ----------------------------------------------- #set (kernel_mandatory_version 4.8) #set (kernel_minimal_version 4.8) # Compiler selection if needed. Impose a minimal version. # ----------------------------------------------- set (gcc_minimal_version 4.9) # PKG_CONFIG required packages # ----------------------------- set (PKG_REQUIRED_LIST json-c libsystemd>=222 afb-daemon>=4.0 appcontroller afb-helpers ) # Prefix path where will be installed the files # Default: /usr/local (need root permission to write in) # ------------------------------------------------------ set(INSTALL_PREFIX /opt/AGL CACHE PATH "INSTALL PREFIX PATH") # Customize link option # ----------------------------- #list(APPEND link_libraries -an-option) # Compilation options definition # Use CMake generator expressions to specify only for a specific language # Values are prefilled with default options that is currently used. # Either separate options with ";", or each options must be quoted separately # DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED ! # ---------------------------------------------------------------------------- #set(COMPILE_OPTIONS # -Wall # -Wextra # -Wconversion # -Wno-unused-parameter # -Wno-sign-compare # -Wno-sign-conversion # -Werror=maybe-uninitialized # -Werror=implicit-function-declaration # -ffunction-sections # -fdata-sections # -fPIC # CACHE STRING "Compilation flags") #set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.") #set(CXX_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C++ language.") #set(PROFILING_COMPILE_OPTIONS # -g # -O0 # -pg # -Wp,-U_FORTIFY_SOURCE # CACHE STRING "Compilation flags for PROFILING build type.") #set(DEBUG_COMPILE_OPTIONS # -g # -ggdb # -Wp,-U_FORTIFY_SOURCE # CACHE STRING "Compilation flags for DEBUG build type.") #set(CCOV_COMPILE_OPTIONS # -g # -O2 # --coverage # CACHE STRING "Compilation flags for CCOV build type.") #set(RELEASE_COMPILE_OPTIONS # -g # -O2 # CACHE STRING "Compilation flags for RELEASE build type.") add_definitions(-DCONTROL_SUPPORT_LUA=1) add_definitions(-DLUA_GLOB_PATTERN="/var/?.lua\\\;") add_definitions(-DCONTROL_PLUGIN_PATH="./var:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/lib/plugins:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/var:${INSTALL_PREFIX}/${PROJECT_NAME}/lib/plugins:${INSTALL_PREFIX}/${PROJECT_NAME}/var:${CMAKE_BINARY_DIR}/package/lib/plugins:${CMAKE_BINARY_DIR}/package/var") add_definitions(-DCONTROL_CONFIG_PATH="./etc:${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/etc:${INSTALL_PREFIX}/${PROJECT_NAME}/etc:${CMAKE_BINARY_DIR}/package/etc") add_definitions(-DCTL_PLUGIN_MAGIC=1286576532) add_definitions(-DAFB_BINDING_VERSION=3) # Optional location for config.xml.in # ----------------------------------- #set(WIDGET_ICON conf.d/wgt/${PROJECT_ICON} CACHE PATH "Path to the widget icon") set(WIDGET_CONFIG_TEMPLATE "${CMAKE_SOURCE_DIR}/conf.d/wgt/config.xml.in" CACHE PATH "Path to widget config file template (config.xml.in)") # Mandatory widget Mimetype specification of the main unit # -------------------------------------------------------------------------- # Choose between : #- text/html : HTML application, # content.src designates the home page of the application # #- application/vnd.agl.native : AGL compatible native, # content.src designates the relative path of the binary. # # - application/vnd.agl.service: AGL service, content.src is not used. # #- ***application/x-executable***: Native application, # content.src designates the relative path of the binary. # For such application, only security setup is made. # set(WIDGET_TYPE application/vnd.agl.service) # Mandatory Widget entry point file of the main unit # -------------------------------------------------------------- # This is the file that will be executed, loaded, # at launch time by the application framework. # set(WIDGET_ENTRY_POINT lib/aft.so) # Optional dependencies order # --------------------------- #set(EXTRA_DEPENDENCIES_ORDER) # Optional Extra global include path # ----------------------------------- #set(EXTRA_INCLUDE_DIRS) # Optional extra libraries # ------------------------- #set(EXTRA_LINK_LIBRARIES) # Optional force binding Linking flag # ------------------------------------ # set(BINDINGS_LINK_FLAG LinkOptions ) # Optional force package prefix generation, like widget # ----------------------------------------------------- # set(PKG_PREFIX DestinationPath) # Optional Application Framework security token # and port use for remote debugging. #------------------------------------------------------------ set(AFB_TOKEN "" CACHE PATH "Default binder security token") set(AFB_REMPORT "1234" CACHE PATH "Default binder listening port") # Print a helper message when every thing is finished # ---------------------------------------------------- set(CLOSING_MESSAGE "Typical binding launch: afb-daemon --name ${PROJECT_NAME} --port=${AFB_REMPORT} --workdir=package-test --ldpaths=/opt/AGL/lib64/afb:../package/lib --token=\"${AFB_TOKEN}\"") set(PACKAGE_MESSAGE "Install widget file using in the target : afm-util install ${PROJECT_NAME}.wgt") # Optional schema validator about now only XML, LUA and JSON # are supported #------------------------------------------------------------ #set(LUA_CHECKER "luac" "-p" CACHE STRING "LUA compiler") #set(XML_CHECKER "xmllint" CACHE STRING "XML linter") #set(JSON_CHECKER "json_verify" CACHE STRING "JSON linter") # This include is mandatory and MUST happens at the end # of this file, else you expose you to unexpected behavior # # This CMake module could be found at the following url: # https://gerrit.automotivelinux.org/gerrit/#/admin/projects/src/cmake-apps-module # ----------------------------------------------------------- include(CMakeAfbTemplates)