Replace / with | in the sed command, as it is done for other targets,
so @LIBDIR@ gets replaced with a proper file path in gstomx.conf.
Now the substitution doesn't work as sed gets confused by slashes
in %{_libdir} variable. %{_libdir} may be /usr/lib and then the
command evaluates to "sed -i -e 's/@LIBDIR@//usr/lib/g'", which
doesn't work as expected.
The sed error is being reported during package installation:
sed: -e expression #1, char 13: unknown option to `s'
This patch fixes initialization of gst-omx plugin on Odroid XU3
indicated by GStreamer error logs:
W/GST_LOG : ERROR omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_mpeg2'
W/GST_LOG : ERROR omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_mpeg4'
W/GST_LOG : ERROR omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_h263'
W/GST_LOG : ERROR omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxdec_h264'
W/GST_LOG : ERROR omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxenc_h264'
W/GST_LOG : ERROR omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxenc_mpeg4'
W/GST_LOG : ERROR omx gstomx.c:3006:plugin_init: Core '@LIBDIR@/libExynosOMX_Core.so' does not exist for element 'omxenc_h263'
W/GST_LOG : WARN GST_PLUGIN_LOADING gstplugin.c:527:gst_plugin_register_func: plugin "/usr/lib/gstreamer-1.0/libgstomx.so" failed to initialise
Change-Id: Ia21269e9d67742e49d390b6beaa4c0c06c969057
Suggested-by: Lukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
%ifarch %arm aarch64
%post target-u3
-sed -i -e 's/@LIBDIR@/%{_libdir}/g' %{_datadir}/mmfw-sysconf-target-u3%{_sysconfdir}/xdg/gstomx.conf
+sed -i -e 's|@LIBDIR@|%{_libdir}|g' %{_datadir}/mmfw-sysconf-target-u3%{_sysconfdir}/xdg/gstomx.conf
cp -arf %{_datadir}/mmfw-sysconf-target-u3/* /
rm -rf %{_datadir}/mmfw-sysconf-target-u3