summaryrefslogtreecommitdiff
path: root/positioning_1.0.bb
blob: 24192a77540286b56f9674529eb36b100a18d4c3 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
###########################################################################
# @licence app begin@
# SPDX-License-Identifier: MPL-2.0
#
# Component Name: Positioning
#
# Author: Marco Residori
#
# Copyright (C) 2013, XS Embedded GmbH
# 
# License:
# This Source Code Form is subject to the terms of the
# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
# this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# @licence end@
###########################################################################

#
# Description: This is a Yocto recipe of the 4 proofs of concept contained 
#              in the positioning repository. 
#              Each PoC has its own sub-package. In this way it is possible to 
#              install only the PoC(s) that are of interest        
#
# Status: Work in Progress
#

DESCRIPTION = "Positioning"
HOMEPAGE = "http://projects.genivi.org/ivi-navigation"

LICENSE = "MPLv2"
LICENSE_${PN}-gnss= "MPLv2"
LICENSE_${PN}-sns = "MPLv2"
LICENSE_${PN}-repl = "MPLv2"
LICENSE_${PN}-enhpos = "MPLv2"

SRC_URI = "git://git.projects.genivi.org/lbs/positioning.git;protocol=git"
SRCREV = "fbd1b0d48879146dc91a3959ced85d78db5d3098"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e73ca6874051c79a99d065bc57849af5"

S = "${WORKDIR}/git"

DEPENDS = "dbus"
DEPENDS += "dlt-daemon"
DEPENDS += "gpsd"
DEPENDS += "dbus-c++ dbus-c++-native "

inherit cmake pkgconfig 

PACKAGES =+ "${PN}-gnss ${PN}-gnss-test ${PN}-sns ${PN}-sns-test ${PN}-repl ${PN}-repl-test ${PN}-enhpos ${PN}-enhpos-test "

RDEPENDS_${PN}-repl-test = "${PN}-repl"
DEPENDS_${PN}-repl-test = "${PN}-repl"

RDEPENDS_${PN}-gnss-test = "${PN}-gnss"
DEPENDS_${PN}-gnss-test = "${PN}-gnss"

RDEPENDS_${PN}-sns-test = "${PN}-sns"
DEPENDS_${PN}-sns-test = "${PN}-sns"

RDEPENDS_${PN}-enhpos = "${PN}-gnss ${PN}-sns"
DEPENDS_${PN}-enhpos = "${PN}-gnss ${PN}-sns"

RDEPENDS_${PN}-enhpos-test = "${PN}-enhpos"
DEPENDS_${PN}-enhpos-test = "${PN}-enhpos"

do_configure() {
 cd ${S}/gnss-service && cmake -DWITH_DLT=OFF -DWITH_GPSD=OFF -DWITH_REPLAYER=ON -DWITH_TESTS=ON . 
 cd ${S}/sensors-service && cmake -DWITH_DLT=OFF -DWITH_REPLAYER=ON -DWITH_IPHONE=OFF -DWITH_TESTS=ON . 
 cd ${S}/log-replayer && cmake -DWITH_DLT=OFF -DWITH_TESTS=ON . 
 cd ${S}/enhanced-position-service && cmake -DWITH_DLT=OFF -DWITH_GPSD=OFF -DWITH_REPLAYER=ON -DWITH_IPHONE=OFF -DWITH_TESTS=ON . 
}

do_compile() {
 cd ${S}/gnss-service && make
 cd ${S}/sensors-service && make
 cd ${S}/log-replayer && make
 cd ${S}/enhanced-position-service && make
}

do_install() {
   install -d ${D}/${bindir}
   install -d ${D}/${libdir}
   install -d ${D}${datadir}/${PN}
   install -m 755 ${S}/log-replayer/src/log-replayer ${D}/${bindir}
   install -m 755 ${S}/log-replayer/test/test-log-replayer ${D}/${bindir}
   install -m 644 ${S}/log-replayer/logs/*.log ${D}${datadir}/${PN}
   install -m 755 ${S}/gnss-service/src/*.so ${D}/${libdir}
   install -m 755 ${S}/gnss-service/test/gnss-service-client ${D}/${bindir}
   install -m 755 ${S}/gnss-service/test/compliance-test/gnss-service-compliance-test ${D}/${bindir}
   install -m 755 ${S}/sensors-service/src/*.so ${D}/${libdir}
   install -m 755 ${S}/sensors-service/test/sensors-service-client ${D}/${bindir}
   install -m 755 ${S}/enhanced-position-service/src/enhanced-position-service ${D}/${bindir}
   install -m 755 ${S}/enhanced-position-service/test/enhanced-position-client ${D}/${bindir}
   install -m 755 ${S}/enhanced-position-service/test/compliance-test/enhanced-position-service-compliance-test ${D}/${bindir}
}

FILES_${PN}-gnss = "${libdir}/libgnss-service*.so "
FILES_${PN}-gnss-test = "${bindir}/gnss-service-client \
                         ${bindir}/gnss-service-compliance-test "    

FILES_${PN}-sns = "${libdir}/libsensors-service*.so "
FILES_${PN}-sns-test = "${bindir}/sensors-service-client "    

FILES_${PN}-repl = "${bindir}/log-replayer \ 
                    ${datadir}/${PN}/*.log "
FILES_${PN}-repl-test = "${bindir}/test-log-replayer "

FILES_${PN}-enhpos = "${bindir}/enhanced-position-service "
FILES_${PN}-enhpos-test = "${bindir}/enhanced-position-client \
                           ${bindir}/enhanced-position-service-compliance-test "

BBCLASSEXTEND = "native"

#TODO: fix this
do_package_qa() {
  echo "workaround to avoid problem with RPATH"
}