Tizen recipes: avoid -j16
[scm/bb/meta-tizen.git] / meta-tizen-ivi / recipes-extended / automotive-message-broker / automotive-message-broker.inc
1 DESCRIPTION = "Automotive Message Broker is a vehicle network abstraction system"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "Automotive/Service"
4 LICENSE = "LGPL-2.1"
5 PV = "0.12.803"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by automotive-message-broker-doc
17 PROVIDES += "automotive-message-broker-doc"
18
19
20 #PROVIDES by automotive-message-broker-plugins
21 PROVIDES += "automotive-message-broker-plugins"
22
23
24 #PROVIDES by automotive-message-broker-plugins-common
25 PROVIDES += "automotive-message-broker-plugins-common"
26
27
28 #PROVIDES by automotive-message-broker-plugins-murphy
29 PROVIDES += "automotive-message-broker-plugins-murphy"
30
31
32 #PROVIDES by automotive-message-broker-plugins-cangen
33 PROVIDES += "automotive-message-broker-plugins-cangen"
34
35
36 #PROVIDES by automotive-message-broker-plugins-test
37 PROVIDES += "automotive-message-broker-plugins-test"
38
39
40 #PROVIDES by automotive-message-broker-plugins-wheel
41 PROVIDES += "automotive-message-broker-plugins-wheel"
42
43
44 #PROVIDES by automotive-message-broker-plugins-cansim
45 PROVIDES += "automotive-message-broker-plugins-cansim"
46
47
48 #PROVIDES by automotive-message-broker-xwalk-vehicle-extension
49 PROVIDES += "automotive-message-broker-xwalk-vehicle-extension"
50
51
52 #PROVIDES by automotive-message-broker-dev
53 PROVIDES += "automotive-message-broker-dev"
54
55
56 #PROVIDES by automotive-message-broker
57
58
59 #PROVIDES by automotive-message-broker-plugins-database
60 PROVIDES += "automotive-message-broker-plugins-database"
61
62
63 #PROVIDES by automotive-message-broker-plugins-obd2
64 PROVIDES += "automotive-message-broker-plugins-obd2"
65
66
67 #PROVIDES by automotive-message-broker-plugins-gpsnmea
68 PROVIDES += "automotive-message-broker-plugins-gpsnmea"
69
70
71 RDEPENDS = ""
72 #RDEPENDS of automotive-message-broker-doc (${PN}-doc)
73 RDEPENDS_${PN}-doc += "automotive-message-broker"
74
75 #RDEPENDS of automotive-message-broker-plugins-cangen (${PN}-plugins-cangen)
76 RDEPENDS_${PN}-plugins-cangen += "automotive-message-broker"
77
78 #RDEPENDS of automotive-message-broker-plugins-common (${PN}-plugins-common)
79 RDEPENDS_${PN}-plugins-common += "automotive-message-broker"
80
81 #RDEPENDS of automotive-message-broker-plugins-murphy (${PN}-plugins-murphy)
82 RDEPENDS_${PN}-plugins-murphy += "murphy"
83 RDEPENDS_${PN}-plugins-murphy += "automotive-message-broker"
84
85 #RDEPENDS of automotive-message-broker-plugins (${PN}-plugins)
86 RDEPENDS_${PN}-plugins += "automotive-message-broker"
87
88 #RDEPENDS of automotive-message-broker-plugins-test (${PN}-plugins-test)
89 RDEPENDS_${PN}-plugins-test += "automotive-message-broker"
90
91 #RDEPENDS of automotive-message-broker-plugins-wheel (${PN}-plugins-wheel)
92 RDEPENDS_${PN}-plugins-wheel += "automotive-message-broker"
93
94 #RDEPENDS of automotive-message-broker-plugins-cansim (${PN}-plugins-cansim)
95 RDEPENDS_${PN}-plugins-cansim += "automotive-message-broker"
96
97 #RDEPENDS of automotive-message-broker-xwalk-vehicle-extension (${PN}-xwalk-vehicle-extension)
98 RDEPENDS_${PN}-xwalk-vehicle-extension += "crosswalk"
99 RDEPENDS_${PN}-xwalk-vehicle-extension += "automotive-message-broker"
100
101 #RDEPENDS of automotive-message-broker-dev (${PN}-dev)
102 RDEPENDS_${PN}-dev += "boost"
103 RDEPENDS_${PN}-dev += "util-linux"
104 RDEPENDS_${PN}-dev += "automotive-message-broker"
105
106 #RDEPENDS of automotive-message-broker (${PN})
107 RDEPENDS_${PN} += "automotive-message-broker-plugins-murphy"
108 RDEPENDS_${PN} += "automotive-message-broker-plugins"
109 RDEPENDS_${PN} += "dbus-python"
110 RDEPENDS_${PN} += "glibc"
111 RDEPENDS_${PN} += "default-ac-domains"
112
113 #RDEPENDS of automotive-message-broker-plugins-database (${PN}-plugins-database)
114 RDEPENDS_${PN}-plugins-database += "sqlite3"
115 RDEPENDS_${PN}-plugins-database += "automotive-message-broker"
116
117 #RDEPENDS of automotive-message-broker-plugins-obd2 (${PN}-plugins-obd2)
118 RDEPENDS_${PN}-plugins-obd2 += "automotive-message-broker-plugins-common"
119 RDEPENDS_${PN}-plugins-obd2 += "automotive-message-broker"
120
121 #RDEPENDS of automotive-message-broker-plugins-gpsnmea (${PN}-plugins-gpsnmea)
122 RDEPENDS_${PN}-plugins-gpsnmea += "automotive-message-broker"
123
124
125 DEPENDS = ""
126 #DEPENDS of automotive-message-broker
127 inherit tizen_cmake
128 DEPENDS += "opencv"
129 DEPENDS += "json-c"
130 DEPENDS += "dbus"
131 DEPENDS += "murphy"
132 inherit pkgconfig
133 DEPENDS += "glib-2.0"
134 DEPENDS += "sqlite3"
135 DEPENDS_append_class-native = " libtool"
136 DEPENDS_append_class-target = " libtool-cross"
137 DEPENDS += "libwebsockets"
138 DEPENDS += "util-linux"
139 DEPENDS += "boost"
140
141 do_prep() {
142  cd ${S}
143  chmod -Rf a+rX,u+w,g-w,o-w ${S}
144  #setup -q -n automotive-message-broker-0.12.803
145  
146  
147 }
148 do_patch_append() {
149     bb.build.exec_func('do_prep', d)
150 }
151
152 do_configure() {
153 }
154
155 do_compile() {
156  cd ${S}
157  LANG=C
158  export LANG
159  unset DISPLAY
160  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
161  
162  
163    cmake \
164          -DCMAKE_VERBOSE_MAKEFILE=ON \
165          -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
166          -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
167          -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
168          -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
169          -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
170          -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
171          -DCMAKE_SKIP_RPATH:BOOL=ON \
172          -DBUILD_SHARED_LIBS:BOOL=ON \
173          -DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
174          ${EXTRA_OECMAKE} \
175         -Dxwalk_vehicle_extension=ON \
176         -DXWALK_EXTENSION_PATH=/tizen-extensions-crosswalk \
177         -Ddatabase_plugin=ON \
178         -Dmurphy_plugin=ON \
179         -Dobd2_plugin=ON \
180         -Dtest_plugin=ON \
181         -Dgpsnmea_plugin=ON \
182         -Dcangen_plugin=ON \
183         -Dcansim_plugin=ON \
184         -Dusebluez5=ON \
185         -Denable_docs=ON
186  
187  
188  oe_runmake ${PARALLEL_MAKE}
189  
190  
191  
192 }
193
194 do_install() {
195  export RPM_BUILD_ROOT=${D}
196  cd ${S}
197  LANG=C
198  export LANG
199  unset DISPLAY
200  rm -rf ${D}
201  mkdir -p ${D}
202  
203  rm -rf ${D}
204  
205    oe_runmake \
206          DESTDIR=${D} \
207          INSTALL_ROOT=${D} \
208          BINDIR=${prefix}/bin \
209    install  
210    rm -f ${D}${infodir}/dir 
211    find ${D} -regex ".*\.la$" | xargs rm -f -- 
212    find ${D} -regex ".*\.a$" | xargs rm -f --
213  
214  mkdir -p ${D}${systemd_unitdir}/system/network.target.wants
215  cp packaging.in/ambd.service.systemd.tizen ${D}${systemd_unitdir}/system/ambd.service
216  ln -s ../ambd.service ${D}${systemd_unitdir}/system/network.target.wants/ambd.service
217  
218  mkdir -p ${D}/${systemd_unitdir}/system/multi-user.target.wants 
219  ln -s ../ambd.service  ${D}/${systemd_unitdir}/system/multi-user.target.wants/ambd.service  
220  
221  cp packaging.in/config.tizen ${D}${sysconfdir}/ambd/
222  
223  
224 }
225
226 pkg_postinst_${PN}() {
227     #!/bin/sh -e
228
229     [ "x$D" == "x" ] && ldconfig
230 }
231
232 pkg_postinst_${PN}() {
233     #!/bin/sh -e
234
235     [ "x$D" == "x" ] && ldconfig
236 }
237
238 pkg_postrm_${PN}() {
239     #!/bin/sh -e
240
241     [ "x$D" == "x" ] && ldconfig
242 }
243
244 pkg_postrm_${PN}() {
245     #!/bin/sh -e
246
247     [ "x$D" == "x" ] && ldconfig
248 }
249
250 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
251 PACKAGES += " automotive-message-broker-plugins-cangen "
252 PACKAGES += " automotive-message-broker-plugins-common "
253 PACKAGES += " automotive-message-broker-dev "
254 PACKAGES += " automotive-message-broker-plugins-murphy "
255 PACKAGES += " automotive-message-broker-plugins "
256 PACKAGES += " automotive-message-broker-plugins-test "
257 PACKAGES += " automotive-message-broker-plugins-gpsnmea "
258 PACKAGES += " automotive-message-broker-plugins-cansim "
259 PACKAGES += " automotive-message-broker-xwalk-vehicle-extension "
260 PACKAGES += " automotive-message-broker "
261 PACKAGES += " automotive-message-broker-plugins-database "
262 PACKAGES += " automotive-message-broker-plugins-obd2 "
263 PACKAGES += " automotive-message-broker-plugins-wheel "
264
265 automotive-message-broker-plugins-cangen_files = ""
266 automotive-message-broker-plugins-cangen_files += "${prefix}/lib/automotive-message-broker/cangenplugin.so"
267 automotive-message-broker-plugins-cangen_files += "${prefix}/bin/gen-set"
268 MANIFESTFILES_${PN}-plugins-cangen = "packaging.in/amb.manifest.plugins"
269
270 automotive-message-broker-plugins-common_files = ""
271 automotive-message-broker-plugins-common_files += "${prefix}/lib/libamb-plugins-common.so"
272 MANIFESTFILES_${PN}-plugins-common = "packaging.in/amb.manifest.plugins"
273
274 automotive-message-broker-dev_files = ""
275 automotive-message-broker-dev_files += "${prefix}/include/amb/*.h"
276 automotive-message-broker-dev_files += "${prefix}/include/amb/*.hpp"
277 automotive-message-broker-dev_files += "${prefix}/lib/pkgconfig/*.pc"
278 MANIFESTFILES_${PN}-dev = "packaging.in/amb.manifest.plugins"
279
280 automotive-message-broker-plugins-murphy_files = ""
281 automotive-message-broker-plugins-murphy_files += "${prefix}/lib/automotive-message-broker/murphysourceplugin.so"
282 MANIFESTFILES_${PN}-plugins-murphy = "packaging.in/amb.manifest.plugins"
283
284 automotive-message-broker-plugins_files = ""
285 automotive-message-broker-plugins_files += "${prefix}/lib/automotive-message-broker/examplesourceplugin.so"
286 automotive-message-broker-plugins_files += "${prefix}/lib/automotive-message-broker/examplesinkplugin.so"
287 automotive-message-broker-plugins_files += "${prefix}/lib/automotive-message-broker/dbussinkplugin.so"
288 automotive-message-broker-plugins_files += "${prefix}/lib/automotive-message-broker/demosinkplugin.so"
289 automotive-message-broker-plugins_files += "${sysconfdir}/dbus-1/system.d/amb.conf"
290 CONFFILES_${PN}-plugins = ""
291 CONFFILES_${PN}-plugins += "${sysconfdir}/dbus-1/system.d/amb.conf"
292 MANIFESTFILES_${PN}-plugins = "packaging.in/amb.manifest.plugins"
293
294 automotive-message-broker-plugins-test_files = ""
295 automotive-message-broker-plugins-test_files += "${prefix}/lib/automotive-message-broker/testplugin.so"
296 MANIFESTFILES_${PN}-plugins-test = "packaging.in/amb.manifest.plugins"
297
298 automotive-message-broker-plugins-gpsnmea_files = ""
299 automotive-message-broker-plugins-gpsnmea_files += "${prefix}/lib/automotive-message-broker/gpsnmea.so"
300 MANIFESTFILES_${PN}-plugins-gpsnmea = "packaging.in/amb.manifest.plugins"
301
302 automotive-message-broker-plugins-cansim_files = ""
303 automotive-message-broker-plugins-cansim_files += "${prefix}/lib/automotive-message-broker/cansimplugin.so"
304 MANIFESTFILES_${PN}-plugins-cansim = "packaging.in/amb.manifest.plugins"
305
306 automotive-message-broker-xwalk-vehicle-extension_files = ""
307 automotive-message-broker-xwalk-vehicle-extension_files += "${prefix}/lib/tizen-extensions-crosswalk/*"
308 automotive-message-broker-xwalk-vehicle-extension_files += "${prefix}/share/automotive-message-broker/xwalk/examples/*"
309 MANIFESTFILES_${PN}-xwalk-vehicle-extension = "packaging.in/amb.manifest.plugins"
310
311 automotive-message-broker_files = ""
312 automotive-message-broker_files += "${sysconfdir}/ambd/config"
313 automotive-message-broker_files += "${sysconfdir}/ambd/config.tizen"
314 automotive-message-broker_files += "${sysconfdir}/ambd/examples/*"
315 automotive-message-broker_files += "${prefix}/bin/ambd"
316 automotive-message-broker_files += "${prefix}/lib/libamb.so*"
317 automotive-message-broker_files += "${systemd_unitdir}/system/ambd.service"
318 automotive-message-broker_files += "${systemd_unitdir}/system/network.target.wants/ambd.service"
319 automotive-message-broker_files += "${systemd_unitdir}/system/multi-user.target.wants/ambd.service"
320 automotive-message-broker_files += "${prefix}/bin/amb-get"
321 automotive-message-broker_files += "${prefix}/bin/amb-get-history"
322 automotive-message-broker_files += "${prefix}/bin/amb-set"
323 automotive-message-broker_files += "${prefix}/bin/amb-listen"
324 CONFFILES_${PN} = ""
325 CONFFILES_${PN} += "${sysconfdir}/ambd/config"
326 CONFFILES_${PN} += "${sysconfdir}/ambd/config.tizen"
327 CONFFILES_${PN} += "${sysconfdir}/ambd/examples/*"
328 MANIFESTFILES_${PN} = "packaging.in/amb.manifest"
329
330 automotive-message-broker-plugins-database_files = ""
331 automotive-message-broker-plugins-database_files += "${prefix}/lib/automotive-message-broker/databasesinkplugin.so"
332 MANIFESTFILES_${PN}-plugins-database = "packaging.in/amb.manifest.plugins"
333
334 automotive-message-broker-plugins-obd2_files = ""
335 automotive-message-broker-plugins-obd2_files += "${prefix}/lib/automotive-message-broker/obd2sourceplugin.so"
336 MANIFESTFILES_${PN}-plugins-obd2 = "packaging.in/amb.manifest.plugins"
337
338 automotive-message-broker-plugins-wheel_files = ""
339 automotive-message-broker-plugins-wheel_files += "${prefix}/lib/automotive-message-broker/wheelsourceplugin.so"
340 MANIFESTFILES_${PN}-plugins-wheel = "packaging.in/amb.manifest.plugins"
341
342 automotive-message-broker-doc_files = ""
343 automotive-message-broker-doc_files += "${prefix}/share/doc/packages/automotive-message-broker/*"
344 MANIFESTFILES_${PN}-doc = "packaging.in/amb.manifest.plugins"
345
346 FILES_${PN}-plugins-cangen = "${automotive-message-broker-plugins-cangen_files}"
347 FILES_${PN}-plugins-common = "${automotive-message-broker-plugins-common_files}"
348 FILES_${PN}-dev = "${automotive-message-broker-dev_files}"
349 FILES_${PN}-plugins-murphy = "${automotive-message-broker-plugins-murphy_files}"
350 FILES_${PN}-plugins = "${automotive-message-broker-plugins_files}"
351 FILES_${PN}-plugins-test = "${automotive-message-broker-plugins-test_files}"
352 FILES_${PN}-plugins-gpsnmea = "${automotive-message-broker-plugins-gpsnmea_files}"
353 FILES_${PN}-plugins-cansim = "${automotive-message-broker-plugins-cansim_files}"
354 FILES_${PN}-xwalk-vehicle-extension = "${automotive-message-broker-xwalk-vehicle-extension_files}"
355 FILES_${PN} = "${automotive-message-broker_files}"
356 FILES_${PN}-plugins-database = "${automotive-message-broker-plugins-database_files}"
357 FILES_${PN}-plugins-obd2 = "${automotive-message-broker-plugins-obd2_files}"
358 FILES_${PN}-plugins-wheel = "${automotive-message-broker-plugins-wheel_files}"
359 FILES_${PN}-doc = "${automotive-message-broker-doc_files}"
360
361 PKG_automotive-message-broker-plugins-cangen= "automotive-message-broker-plugins-cangen"
362 PKG_automotive-message-broker-plugins-common= "automotive-message-broker-plugins-common"
363 PKG_automotive-message-broker-dev= "automotive-message-broker-dev"
364 PKG_automotive-message-broker-plugins-murphy= "automotive-message-broker-plugins-murphy"
365 PKG_automotive-message-broker-plugins= "automotive-message-broker-plugins"
366 PKG_automotive-message-broker-plugins-test= "automotive-message-broker-plugins-test"
367 PKG_automotive-message-broker-plugins-gpsnmea= "automotive-message-broker-plugins-gpsnmea"
368 PKG_automotive-message-broker-plugins-cansim= "automotive-message-broker-plugins-cansim"
369 PKG_automotive-message-broker-xwalk-vehicle-extension= "automotive-message-broker-xwalk-vehicle-extension"
370 PKG_automotive-message-broker= "automotive-message-broker"
371 PKG_automotive-message-broker-plugins-database= "automotive-message-broker-plugins-database"
372 PKG_automotive-message-broker-plugins-obd2= "automotive-message-broker-plugins-obd2"
373 PKG_automotive-message-broker-plugins-wheel= "automotive-message-broker-plugins-wheel"
374 PKG_automotive-message-broker-doc= "automotive-message-broker-doc"
375
376 require automotive-message-broker-extraconf.inc
377