%bcond_with wayland
Name: notification
Summary: Notification library
-Version: 0.5.6
+Version: 0.5.62
Release: 1
Group: Applications/Core Applications
License: Apache-2.0
%description
Client/Server library for sending notifications.
+%if 0%{?gcov:1}
+%package gcov
+Summary: Notification API(gcov)
+Group: Applications/Core Applications
+
+%description gcov
+gcov objects of a notification library
+%endif
+
%prep
%setup -q
Development files needed to build software that needs to system a system notification.
%build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed"
-LDFLAGS="$LDFLAGS"
%cmake . \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DMAJORVER=${MAJORVER} -DFULLVER=%{version}
-make %{?jobs:-j%jobs}
+%__make %{?jobs:-j%jobs}
+
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
+%check
+ctest --output-on-failure %{?_smp_mflags}
%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
+%endif
+
mkdir -p %{buildroot}%{upgrade_script_path}
cp -f scripts/505.notification_upgrade.sh %{buildroot}%{upgrade_script_path}
-%check
-ctest --output-on-failure %{?_smp_mflags}
-
%clean
rm -rf %{buildroot}
%files -n notification-ex_unittests
%{_bindir}/notification-ex_unittests
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif