automotive-message-broker: fix build 62/27162/1
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Fri, 5 Sep 2014 10:02:49 +0000 (12:02 +0200)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Fri, 5 Sep 2014 10:02:49 +0000 (12:02 +0200)
Change-Id: I252e1627ffa01a0e1ba887f1136d0abaf9047307
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
recipes-tizen/automotive-message-broker/automotive-message-broker-extraconf.inc

index e69de29..cb7c2fd 100644 (file)
@@ -0,0 +1,46 @@
+inherit pkgconfig cmake
+
+B="${S}"
+
+INSANE_SKIP_${PN} = "dev-so"
+
+EXTRA_OECMAKE = " \
+                -DCMAKE_VERBOSE_MAKEFILE=ON \
+                -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
+                -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
+                -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
+                -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
+                -DSYSCONF_INSTALL_DIR:PATH=${sysconfdir} \
+                -DSHARE_INSTALL_PREFIX:PATH=${prefix}/share \
+                -DCMAKE_SKIP_RPATH:BOOL=ON \
+                -DBUILD_SHARED_LIBS:BOOL=ON \
+                -Ddatabase_plugin=ON \
+                -Dmurphy_plugin=ON \
+                -Dobd2_plugin=ON \
+                -Dtest_plugin=ON \
+                -Dgpsnmea_plugin=ON \
+                -Dcangen_plugin=ON \
+                -Dcansim_plugin=ON \
+                -Denable_icecc=OFF \
+                "
+
+cmake_do_configure_prepend() {
+    # Add pthread library to target_link_libraries
+    sed -i 's@set(link_libraries -lamb ${libtool_LIBRARY} ${glib_LIBRARIES} ${json_LIBRARIES} -L${CMAKE_CURRENT_BINARY_DIR}/lib)@set(link_libraries -lamb ${libtool_LIBRARY} ${glib_LIBRARIES} ${json_LIBRARIES} -lpthread -L${CMAKE_CURRENT_BINARY_DIR}/lib)@' ${S}/CMakeLists.txt
+}
+
+cmake_do_install_append() {
+
+    rm -f ${D}${infodir}/dir 
+    find ${D} -regex ".*\.la$" | xargs rm -f -- 
+    find ${D} -regex ".*\.a$" | xargs rm -f --
+    mkdir -p ${D}/lib/systemd/system/network.target.wants
+    cp packaging.in/ambd.service.systemd.tizen ${D}/lib/systemd/system/ambd.service
+    ln -sf ../ambd.service ${D}/lib/systemd/system/network.target.wants/ambd.service
+    mkdir -p ${D}/lib/systemd/system/multi-user.target.wants 
+    ln -sf ../ambd.service  ${D}/lib/systemd/system/multi-user.target.wants/ambd.service  
+    cp packaging.in/config.tizen ${D}${sysconfdir}/ambd/
+}