rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | ########################################################################### |
| 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 | |
| 28 | DESCRIPTION = "Positioning" |
| 29 | HOMEPAGE = "http://projects.genivi.org/ivi-navigation" |
| 30 | |
| 31 | LICENSE = "MPLv2" |
| 32 | LICENSE_${PN}-gnss= "MPLv2" |
| 33 | LICENSE_${PN}-sns = "MPLv2" |
| 34 | LICENSE_${PN}-repl = "MPLv2" |
| 35 | LICENSE_${PN}-enhpos = "MPLv2" |
| 36 | |
| 37 | SRC_URI = "git://github.com/GENIVI/positioning.git;protocol=git" |
| 38 | SRC_URI_append = " file://gnss-use-nmea.patch file://hnmea.patch file://gnss-service-client.patch" |
| 39 | SRCREV = "25ce7341cea0a26e3d5213966e911aeec56ac1a0" |
| 40 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e73ca6874051c79a99d065bc57849af5" |
| 41 | S = "${WORKDIR}/git" |
| 42 | |
| 43 | #DEPENDS = "dbus" |
| 44 | #DEPENDS += "dlt-daemon" |
| 45 | #DEPENDS += "gpsd" |
| 46 | #DEPENDS += "dbus-c++ dbus-c++-native " |
| 47 | |
| 48 | inherit cmake pkgconfig |
| 49 | |
| 50 | PACKAGES =+ "${PN}-gnss ${PN}-gnss-test ${PN}-sns ${PN}-sns-test ${PN}-repl ${PN}-repl-test ${PN}-enhpos ${PN}-enhpos-test " |
| 51 | |
| 52 | RDEPENDS_${PN}-repl-test = "${PN}-repl" |
| 53 | DEPENDS_${PN}-repl-test = "${PN}-repl" |
| 54 | |
| 55 | RDEPENDS_${PN}-gnss-test = "${PN}-gnss" |
| 56 | DEPENDS_${PN}-gnss-test = "${PN}-gnss" |
| 57 | |
| 58 | RDEPENDS_${PN}-sns-test = "${PN}-sns" |
| 59 | DEPENDS_${PN}-sns-test = "${PN}-sns" |
| 60 | |
| 61 | RDEPENDS_${PN}-enhpos = "${PN}-gnss ${PN}-sns" |
| 62 | DEPENDS_${PN}-enhpos = "${PN}-gnss ${PN}-sns" |
| 63 | |
| 64 | RDEPENDS_${PN}-enhpos-test = "${PN}-enhpos" |
| 65 | DEPENDS_${PN}-enhpos-test = "${PN}-enhpos" |
| 66 | |
| 67 | do_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 | |
| 75 | do_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 | |
| 82 | do_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 | |
| 99 | FILES_${PN}-gnss = "${libdir}/libgnss-service*.so " |
| 100 | FILES_${PN}-gnss-test = "${bindir}/gnss-service-client \ |
| 101 | ${bindir}/gnss-service-compliance-test " |
| 102 | |
| 103 | FILES_${PN}-sns = "${libdir}/libsensors-service*.so " |
| 104 | FILES_${PN}-sns-test = "${bindir}/sensors-service-client " |
| 105 | |
| 106 | FILES_${PN}-repl = "${bindir}/log-replayer \ |
| 107 | ${datadir}/${PN}/*.log " |
| 108 | FILES_${PN}-repl-test = "${bindir}/test-log-replayer " |
| 109 | |
| 110 | FILES_${PN}-enhpos = "${bindir}/enhanced-position-service " |
| 111 | FILES_${PN}-enhpos-test = "${bindir}/enhanced-position-client \ |
| 112 | ${bindir}/enhanced-position-service-compliance-test " |
| 113 | |
| 114 | BBCLASSEXTEND = "native" |
| 115 | |
| 116 | #TODO: fix this |
| 117 | do_package_qa() { |
| 118 | echo "workaround to avoid problem with RPATH" |
| 119 | } |