summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/ui-gadget-1.spec13
-rw-r--r--src/module.c7
2 files changed, 10 insertions, 10 deletions
diff --git a/packaging/ui-gadget-1.spec b/packaging/ui-gadget-1.spec
index 5b52650..138de1e 100644
--- a/packaging/ui-gadget-1.spec
+++ b/packaging/ui-gadget-1.spec
@@ -1,6 +1,6 @@
Name: ui-gadget-1
Summary: UI Gadget Library
-Version: 0.2.10
+Version: 0.2.11
Release: 1
Group: System/Libraries
License: Apache-2.0
@@ -64,18 +64,15 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
make %{?jobs:-j%jobs}
-%if 0%{?gcov:1}
-mkdir -p gcov-obj
-find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
-%endif
-
%install
rm -rf %{buildroot}
%make_install
%if 0%{?gcov:1}
-mkdir -p %{buildroot}%{_datadir}/gcov/obj
-install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+builddir=$(basename $PWD)
+gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
+mkdir -p "$gcno_obj_dir"
+find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
%endif
%post
diff --git a/src/module.c b/src/module.c
index 10450c2..b5d5306 100644
--- a/src/module.c
+++ b/src/module.c
@@ -184,10 +184,13 @@ static int __get_ug_info(const char *name, char **ug_file_path)
pkgmgrinfo_appinfo_destroy_appinfo(appinfo);
return -1;
}
- snprintf(ug_file, PATH_MAX, "%s/lib/ug/libug-%s.so", res_path, name);
+ snprintf(ug_file, PATH_MAX, "%slib/ug/libug-%s.so", res_path, name);
if (!__file_exist(ug_file))
goto out_func;
- snprintf(ug_file, PATH_MAX, "%s/lib/ug/lib-%s.so", res_path, name);
+ snprintf(ug_file, PATH_MAX, "%slib/ug/lib-%s.so", res_path, name);
+ if (!__file_exist(ug_file))
+ goto out_func;
+ snprintf(ug_file, PATH_MAX, "%slib/ug/lib%s.so", res_path, name);
if (!__file_exist(ug_file))
goto out_func;