-# wearable || tv || ivi || mobile || unified
-%if "%{?profile}" != "common"
-for FILE in libdali-*.so*; do mv "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
+# if mobile || "undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%if 0%{?dali_feedback_plugin_mobile}
+for FILE in libdali-feedback-plugin.so*.mobile; do mv $FILE" "$FILE"; done
+%endif
+%endif
+
+# if tv ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "common" && "%{?profile}" != "ivi" && "%{?profile}" != "mobile"
+%if 0%{?dali_feedback_plugin_tv}
+for FILE in libdali-feedback-plugin.so*.tv; do mv $FILE" "$FILE"; done
+%endif
+%endif
+
+# if wearable || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+%if 0%{?dali_feedback_plugin_wearable}
+for FILE in libdali-feedback-plugin.so*.wearable; do mv $FILE" "$FILE"; done
+%endif
+%endif
+
+# if ivi ||"undefined"
+%if "%{?profile}" != "wearable" && "%{?profile}" != "tv" && "%{?profile}" != "common" && "%{?profile}" != "mobile"
+%if 0%{?dali_feedback_plugin_ivi}
+for FILE in libdali-feedback-plugin.so*.ivi; do mv $FILE" "$FILE"; done
+%endif