diff options
Diffstat (limited to 'packaging/pkgmgr.spec')
-rw-r--r-- | packaging/pkgmgr.spec | 62 |
1 files changed, 51 insertions, 11 deletions
diff --git a/packaging/pkgmgr.spec b/packaging/pkgmgr.spec index 8a55db3..847c11f 100644 --- a/packaging/pkgmgr.spec +++ b/packaging/pkgmgr.spec @@ -12,8 +12,6 @@ Source1004: %{name}-installer.manifest Source1005: %{name}-installer-devel.manifest Source1006: %{name}-types-devel.manifest Source1007: %{name}.conf -Source1008: %{name}-installer-signal-agent.service -Source1009: %{name}-installer-signal-agent.socket Requires(post): /usr/sbin/useradd Requires(post): capi-system-info @@ -32,13 +30,29 @@ BuildRequires: pkgconfig(db-util) BuildRequires: pkgconfig(libsmack) BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(minizip) +BuildRequires: pkgconfig(rpc-port) +BuildRequires: pkgconfig(capi-appfw-event) +BuildRequires: pkgconfig(gmock) BuildRequires: pkgmgr-info-parser-devel BuildRequires: pkgmgr-info-parser BuildRequires: fdupes +BuildRequires: tidl + +%if 0%{?gcov:1} +BuildRequires: lcov +%endif %description Packager Manager client library package for packaging +%if 0%{?gcov:1} +%package gcov +Summary: Packager Manager library (gcov) +Group: Application Framework/Testing + +%description gcov +Packager Manager library gcov objects +%endif %package client Summary: Package Manager client library develpoment package @@ -86,15 +100,37 @@ Package Manager client types develpoment package for packaging %prep %setup -q cp %{SOURCE1001} %{SOURCE1002} %{SOURCE1003} %{SOURCE1004} %{SOURCE1005} %{SOURCE1006} . +tidlc -p -l C++ -i ./tidl/PkgMgr.tidl -o PkgMgrProxy +mv PkgMgrProxy.* ./client/src/ +tidlc -g -l C++ -i ./tidl/PkgSignal.tidl -o PkgSignal +cp PkgSignal.* ./client/src/ +mv PkgSignal.* ./installer/src/ %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}'` %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} %__make %{?_smp_mflags} +%if 0%{?gcov:1} +mkdir -p gcov-obj +find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif + %install %make_install + +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name} +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name} +%endif + rm -f %{buildroot}%{_bindir}/pkgmgr_backend_sample rm -f %{buildroot}%{_libdir}/libpkgmgr_backend_lib_sample.so rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so @@ -102,11 +138,6 @@ rm -f %{buildroot}%{_libdir}/libpkgmgr_parser_lib_sample.so mkdir -p %{buildroot}%{_tmpfilesdir}/ install -m 0644 %{SOURCE1007} %{buildroot}%{_tmpfilesdir}/pkgmgr.conf -mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants -install -m 0644 %{SOURCE1008} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.service -install -m 0644 %{SOURCE1009} %{buildroot}%{_unitdir_user}/pkgmgr-installer-signal-agent.socket -ln -sf ../pkgmgr-installer-signal-agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket - mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backend mkdir -p %{buildroot}%{_sysconfdir}/package-manager/backendlib mkdir -p %{buildroot}%{_sysconfdir}/opt/upgrade @@ -118,6 +149,14 @@ chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgmgr touch %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool +%check +export LD_LIBRARY_PATH=../../client +ctest -V + +%if 0%{?gcov:1} +lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info +genhtml %{name}.info -o out --legend --show-details +%endif %fdupes %{buildroot} @@ -196,10 +235,6 @@ rm -rf %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh %license LICENSE %defattr(-,root,root,-) %{_libdir}/libpkgmgr_installer.so.* -%{_bindir}/pkgmgr-installer-signal-agent -%{_unitdir_user}/pkgmgr-installer-signal-agent.service -%{_unitdir_user}/pkgmgr-installer-signal-agent.socket -%{_unitdir_user}/sockets.target.wants/pkgmgr-installer-signal-agent.socket %files installer-devel %manifest %{name}-installer-devel.manifest @@ -215,3 +250,8 @@ rm -rf %{_sysconfdir}/package-manager/pkgmgr-label-initial-image.sh %defattr(-,root,root,-) %{_includedir}/package-manager-*.h %{_libdir}/pkgconfig/pkgmgr-types.pc + +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/* +%endif |