blob: 6fb1e095fdc3430d264f83d237c9e6fad4f1d11a [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001###########################################################################
2# @licence app begin@
3# SPDX-License-Identifier: MPL-2.0
4#
5# Component Name: Positioning
6#
7# Author: Marco Residori
8#
9# Copyright (C) 2013, XS Embedded GmbH
10#
11# License:
12# This Source Code Form is subject to the terms of the
13# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
14# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
15#
16# @licence end@
17###########################################################################
18
19#
20# Description: This is a Yocto recipe of the 4 proofs of concept contained
21# in the positioning repository.
22# Each PoC has its own sub-package. In this way it is possible to
23# install only the PoC(s) that are of interest
24#
25# Status: Work in Progress
26#
27
28DESCRIPTION = "Positioning"
29HOMEPAGE = "http://projects.genivi.org/ivi-navigation"
30
31LICENSE = "MPLv2"
32LICENSE_${PN}-gnss= "MPLv2"
33LICENSE_${PN}-sns = "MPLv2"
34LICENSE_${PN}-repl = "MPLv2"
35LICENSE_${PN}-enhpos = "MPLv2"
36
37SRC_URI = "git://github.com/GENIVI/positioning.git;protocol=git"
38SRC_URI_append = " file://gnss-use-nmea.patch file://hnmea.patch file://gnss-service-client.patch"
39SRCREV = "25ce7341cea0a26e3d5213966e911aeec56ac1a0"
40LIC_FILES_CHKSUM = "file://LICENSE;md5=e73ca6874051c79a99d065bc57849af5"
41S = "${WORKDIR}/git"
42
43#DEPENDS = "dbus"
44#DEPENDS += "dlt-daemon"
45#DEPENDS += "gpsd"
46#DEPENDS += "dbus-c++ dbus-c++-native "
47
48inherit cmake pkgconfig
49
50PACKAGES =+ "${PN}-gnss ${PN}-gnss-test ${PN}-sns ${PN}-sns-test ${PN}-repl ${PN}-repl-test ${PN}-enhpos ${PN}-enhpos-test "
51
52RDEPENDS_${PN}-repl-test = "${PN}-repl"
53DEPENDS_${PN}-repl-test = "${PN}-repl"
54
55RDEPENDS_${PN}-gnss-test = "${PN}-gnss"
56DEPENDS_${PN}-gnss-test = "${PN}-gnss"
57
58RDEPENDS_${PN}-sns-test = "${PN}-sns"
59DEPENDS_${PN}-sns-test = "${PN}-sns"
60
61RDEPENDS_${PN}-enhpos = "${PN}-gnss ${PN}-sns"
62DEPENDS_${PN}-enhpos = "${PN}-gnss ${PN}-sns"
63
64RDEPENDS_${PN}-enhpos-test = "${PN}-enhpos"
65DEPENDS_${PN}-enhpos-test = "${PN}-enhpos"
66
67do_configure() {
68 cd ${S}/gnss-service && cmake -DWITH_DLT=OFF -DWITH_GPSD=OFF -DWITH_REPLAYER=OFF -DWITH_TESTS=ON -DWITH_NMEA=ON -DGNSS_DEVICE=\"/dev/gps\" -DGNSS_BAUDRATE=B921600 .
69# cd ${S}/gnss-service && cmake -DWITH_DLT=OFF -DWITH_GPSD=OFF -DWITH_REPLAYER=ON -DWITH_TESTS=ON .
70 cd ${S}/sensors-service && cmake -DWITH_DLT=OFF -DWITH_REPLAYER=ON -DWITH_IPHONE=OFF -DWITH_TESTS=ON .
71 cd ${S}/log-replayer && cmake -DWITH_DLT=OFF -DWITH_TESTS=ON .
72 cd ${S}/enhanced-position-service && cmake -DWITH_DLT=OFF -DWITH_GPSD=OFF -DWITH_REPLAYER=ON -DWITH_IPHONE=OFF -DWITH_TESTS=ON .
73}
74
75do_compile() {
76 cd ${S}/gnss-service && make
77 cd ${S}/sensors-service && make
78 cd ${S}/log-replayer && make
79 cd ${S}/enhanced-position-service && make
80}
81
82do_install() {
83 install -d ${D}/${bindir}
84 install -d ${D}/${libdir}
85 install -d ${D}${datadir}/${PN}
86 install -m 755 ${S}/log-replayer/src/log-replayer ${D}/${bindir}
87 install -m 755 ${S}/log-replayer/test/test-log-replayer ${D}/${bindir}
88 install -m 644 ${S}/log-replayer/logs/*.log ${D}${datadir}/${PN}
89 install -m 755 ${S}/gnss-service/src/*.so ${D}/${libdir}
90 install -m 755 ${S}/gnss-service/test/gnss-service-client ${D}/${bindir}
91 install -m 755 ${S}/gnss-service/test/compliance-test/gnss-service-compliance-test ${D}/${bindir}
92 install -m 755 ${S}/sensors-service/src/*.so ${D}/${libdir}
93# install -m 755 ${S}/sensors-service/test/sensors-service-client ${D}/${bindir}
94# install -m 755 ${S}/enhanced-position-service/src/enhanced-position-service ${D}/${bindir}
95# install -m 755 ${S}/enhanced-position-service/test/enhanced-position-client ${D}/${bindir}
96# install -m 755 ${S}/enhanced-position-service/test/compliance-test/enhanced-position-service-compliance-test ${D}/${bindir}
97}
98
99FILES_${PN}-gnss = "${libdir}/libgnss-service*.so "
100FILES_${PN}-gnss-test = "${bindir}/gnss-service-client \
101 ${bindir}/gnss-service-compliance-test "
102
103FILES_${PN}-sns = "${libdir}/libsensors-service*.so "
104FILES_${PN}-sns-test = "${bindir}/sensors-service-client "
105
106FILES_${PN}-repl = "${bindir}/log-replayer \
107 ${datadir}/${PN}/*.log "
108FILES_${PN}-repl-test = "${bindir}/test-log-replayer "
109
110FILES_${PN}-enhpos = "${bindir}/enhanced-position-service "
111FILES_${PN}-enhpos-test = "${bindir}/enhanced-position-client \
112 ${bindir}/enhanced-position-service-compliance-test "
113
114BBCLASSEXTEND = "native"
115
116#TODO: fix this
117do_package_qa() {
118 echo "workaround to avoid problem with RPATH"
119}