Release version 0.7.18
[platform/core/api/notification.git] / packaging / notification.spec
index 44fee0e..f963921 100644 (file)
@@ -1,7 +1,7 @@
 %bcond_with wayland
 Name:       notification
 Summary:    Notification library
-Version:    0.5.90
+Version:    0.7.18
 Release:    1
 Group:      Applications/Core Applications
 License:    Apache-2.0
@@ -73,18 +73,13 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
        -DMAJORVER=${MAJORVER} -DFULLVER=%{version}
 %__make %{?jobs:-j%jobs}
 
-%if 0%{?gcov:1}
-mkdir -p gcov-obj
-find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
-%endif
-
 %check
 ctest -V
 %if 0%{?gcov:1}
-lcov -c --ignore-errors graph --no-external -q -d . -o notification-ex.info
-genhtml notification-ex.info -o notification-ex.out
-zip -r notification-ex.zip notification-ex.out
-install -m 0644 notification-ex.zip %{buildroot}%{_datadir}/gcov/notification-ex.zip
+lcov -c --ignore-errors mismatch,graph,unused --no-external -q -d . -o notification.info
+genhtml notification.info -o notification.out
+zip -r notification.zip notification.out
+install -m 0644 notification.zip %{buildroot}%{_datadir}/gcov/obj/notification.zip
 %endif
 
 %install
@@ -92,12 +87,39 @@ 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
 
-mkdir -p %{buildroot}%{upgrade_script_path}
-cp -f scripts/505.notification_upgrade.sh %{buildroot}%{upgrade_script_path}
+cat << EOF > run-unittest.sh
+#!/bin/sh
+setup() {
+    echo "setup start"
+}
+
+test_main() {
+    echo "test_main start"
+    /usr/bin/<NAME>-unittests
+}
+
+teardown() {
+    echo "teardown start"
+}
+
+main() {
+    setup
+    test_main
+    teardown
+}
+
+main "\$*"
+EOF
+
+mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
+install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
+sed -i -e 's/<NAME>/notification/g' %{buildroot}%{_bindir}/tizen-unittests/%{name}/run-unittest.sh
 
 %clean
 rm -rf %{buildroot}
@@ -119,8 +141,9 @@ fi
 %license LICENSE
 %attr(755,root,root) %{_sysconfdir}/gumd/useradd.d/11_notification-add.post
 %{_bindir}/notification_init
-%{upgrade_script_path}/505.notification_upgrade.sh
+%attr(0755,root,root) %{upgrade_script_path}/505.notification_upgrade.sh
 #%{_bindir}/notification-test-app
+%attr(0755,root,root) /etc/notification/upgrade.sh
 
 %files devel
 %defattr(-,root,root,-)
@@ -181,19 +204,20 @@ Header & package configuration files to support development of the notification.
 %attr(0644,root,root) %{_libdir}/libnotification-ex.so
 
 #################################################
-# notification-ex_unittests
+# notification-unittests
 #################################################
-%package -n notification-ex_unittests
-Summary:    GTest for notification-ex
+%package -n notification-unittests
+Summary:    GTest for notification
 Group:      Development/Libraries
 
-%description -n notification-ex_unittests
-GTest for notification-ex
+%description -n notification-unittests
+GTest for notification
 
-%files -n notification-ex_unittests
-%{_bindir}/notification-ex_unittests
+%files -n notification-unittests
+%{_bindir}/notification-unittests
+%{_bindir}/tizen-unittests/%{name}/run-unittest.sh
 
 %if 0%{?gcov:1}
 %files gcov
-%{_datadir}/gcov/*
+%{_datadir}/gcov/obj/*
 %endif