[Release] wrt-commons_0.2.167
[framework/web/wrt-commons.git] / packaging / wrt-commons.spec
index a6e840d..7ff8b12 100644 (file)
@@ -1,7 +1,7 @@
 #git:framework/web/wrt-commons
 Name:       wrt-commons
 Summary:    Wrt common library
-Version:    0.2.148
+Version:    0.2.167
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
@@ -68,7 +68,7 @@ make %{?jobs:-j%jobs}
 
 %install
 mkdir -p %{buildroot}/usr/share/license
-cp %{name} %{buildroot}/usr/share/license/
+cp LICENSE %{buildroot}/usr/share/license/%{name}
 %make_install
 
 %clean
@@ -81,29 +81,32 @@ mkdir -p /opt/share/widget/exec
 mkdir -p /opt/share/widget/data/Public
 mkdir -p /usr/lib/wrt-plugins
 
-if [ -z ${2} ]; then
-    echo "This is new install of wrt-commons"
-    echo "Calling /usr/bin/wrt_commons_reset_db.sh"
-    /usr/bin/wrt_commons_reset_db.sh
-else
-    # Find out old and new version of databases
-    WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
-    WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
-    echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
-    echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
-
-    if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
-    then
-        if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
+#Don't reset DB when install on QEMU (during other packages building witch GBS)
+if [ -z "$EMULATOR_ARCHS" ]; then
+    if [ -z ${2} ]; then
+        echo "This is new install of wrt-commons"
+        echo "Calling /usr/bin/wrt_commons_reset_db.sh"
+        /usr/bin/wrt_commons_reset_db.sh
+    else
+        # Find out old and new version of databases
+        WRT_OLD_DB_VERSION=`sqlite3 /opt/dbspace/.wrt.db ".tables" | grep "DB_VERSION_"`
+        WRT_NEW_DB_VERSION=`cat /usr/share/wrt-engine/wrt_db.sql | tr '[:blank:]' '\n' | grep DB_VERSION_`
+        echo "OLD wrt database version ${WRT_OLD_DB_VERSION}"
+        echo "NEW wrt database version ${WRT_NEW_DB_VERSION}"
+
+        if [ ${WRT_OLD_DB_VERSION} -a ${WRT_NEW_DB_VERSION} ]
         then
-            echo "Equal database detected so db installation ignored"
+            if [ ${WRT_NEW_DB_VERSION} = ${WRT_OLD_DB_VERSION} ]
+            then
+                echo "Equal database detected so db installation ignored"
+            else
+                echo "Calling /usr/bin/wrt_commons_reset_db.sh"
+                /usr/bin/wrt_commons_reset_db.sh
+            fi
         else
             echo "Calling /usr/bin/wrt_commons_reset_db.sh"
             /usr/bin/wrt_commons_reset_db.sh
         fi
-    else
-        echo "Calling /usr/bin/wrt_commons_reset_db.sh"
-        /usr/bin/wrt_commons_reset_db.sh
     fi
 fi
 
@@ -134,8 +137,8 @@ chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db
 chsmack -a 'wrt-commons::db_wrt' /opt/dbspace/.wrt.db-journal
 chsmack -a 'wrt-commons::db_wrt' /opt/usr/dbspace/.wrt_custom_handler.db
 chsmack -a 'wrt-commons::db_wrt' /opt/usr/dbspace/.wrt_custom_handler.db-journal
-chsmack -a 'wrt-commons::db_wrt_i18n' /opt/usr/dbspace/.wrt_i18n.db
-chsmack -a 'wrt-commons::db_wrt_i18n' /opt/usr/dbspace/.wrt_i18n.db-journal
+chsmack -a '*' /opt/usr/dbspace/.wrt_i18n.db
+chsmack -a '*' /opt/usr/dbspace/.wrt_i18n.db-journal
 
 echo "[WRT] wrt-commons postinst done ..."