Refactoring code for installation qml libs 95/5695/2
authorPhong Tran <tranmanphong@gmail.com>
Mon, 23 May 2016 23:26:30 +0000 (06:26 +0700)
committerGerrit Code Review <gerrit@172.30.200.200>
Sun, 29 May 2016 10:39:42 +0000 (10:39 +0000)
- Use ${libdir} instead of hardcoding /usr/lib
- Change to use install command for copy files

Change-Id: I4506f69c97ad223b94561fd10b97e5a406c4c4d9
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
recipes-automotive/ambdbusaccess/ambdbusaccess_0.1.bb
recipes-automotive/climatecontrolplugin/climatecontrolplugin_0.1.bb
recipes-qt/qml-execscript-plugin/qml-execscript-plugin_1.0.bb

index c54e28c..e804113 100644 (file)
@@ -17,8 +17,8 @@ RPROVIDES_${PN} = "ambdbusaccess"
 inherit qmake5
 
 do_install () {
-        mkdir -p ${D}/usr/lib/qt5/qml/Automotive/
-        cp ambdbusaccess ${D}/usr/lib/qt5/qml/Automotive/
+        install -d ${D}${libdir}/qt5/qml/Automotive/
+        install -m 0755 ambdbusaccess ${D}${libdir}/qt5/qml/Automotive/
 }
 
 FILES_${PN} += "${libdir}/qt5/qml/Automotive/ambdbusaccess"
index 8058bdb..7f98fb3 100644 (file)
@@ -18,9 +18,9 @@ RDEPENDS_${PN} = "automotive-message-broker ambdbusaccess"
 inherit qmake5
 
 do_install () {
-        mkdir -p ${D}/usr/lib/qt5/qml/Automotive/ClimateControl/
-        cp libClimateControl.so ${D}/usr/lib/qt5/qml/Automotive/ClimateControl/
-        cp qmldir ${D}/usr/lib/qt5/qml/Automotive/ClimateControl/
+        install -d ${D}${libdir}/qt5/qml/Automotive/ClimateControl/
+        install -m 0755 libClimateControl.so ${D}${libdir}/qt5/qml/Automotive/ClimateControl/
+        install -m 0644 qmldir ${D}${libdir}/qt5/qml/Automotive/ClimateControl/
 }
 
 FILES_${PN} += "${libdir}/qt5/qml/Automotive/ClimateControl/libClimateControl.so \
index 1f9dc6d..dbeda2d 100644 (file)
@@ -15,9 +15,9 @@ EXTRA_OECONF = "--with-moc-dir=${STAGING_BINDIR_NATIVE}/qt5"
 QML_LIBDIR = "${libdir}/qt5/qml"
 
 do_install() {
-    mkdir -p ${D}/usr/lib/qt5/qml/execScript/
-    cp execScript/*.so ${D}/usr/lib/qt5/qml/execScript/
-    cp ../git/execScript/qmldir ${D}/usr/lib/qt5/qml/execScript/
+    install -d ${D}${libdir}/qt5/qml/execScript/
+    install -m 0755 execScript/*.so ${D}${libdir}/qt5/qml/execScript/
+    install -m 0644 ../git/execScript/qmldir ${D}${libdir}/qt5/qml/execScript/
 }
 
 FILES_${PN} += "${QML_LIBDIR}/execScript/libexecscriptplugin.so"