2 Summary: RPC Port library
5 Group: Application Framework/Libraries
7 Source0: %{name}-%{version}.tar.gz
8 Source1001: %{name}.manifest
10 BuildRequires: pkgconfig(aul)
11 BuildRequires: pkgconfig(bundle)
12 BuildRequires: pkgconfig(cynara-client)
13 BuildRequires: pkgconfig(cynara-creds-socket)
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(glib-2.0)
16 BuildRequires: pkgconfig(gmock)
17 BuildRequires: pkgconfig(libtzplatform-config)
18 BuildRequires: pkgconfig(parcel)
19 BuildRequires: pkgconfig(pkgmgr)
20 BuildRequires: pkgconfig(pkgmgr-info)
21 BuildRequires: pkgconfig(uuid)
28 Requires(post): /sbin/ldconfig
29 Requires(post): coreutils
30 Requires(postun): /sbin/ldconfig
32 Recommends: amd-mod-rpc-port
35 RPC Port library package.
38 Summary: RPC Port library (Development)
39 Group: Application Framework/Development
40 Requires: %{name} = %{version}-%{release}
43 RPC Port library (Development) package.
45 #################################################
47 #################################################
49 Summary: GTest for rpc-port
50 Group: Development/Libraries
53 %description unittests
56 #################################################
58 #################################################
61 Summary: RPC Port(gcov)
62 Group: Application Framework/Testing
74 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
75 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
76 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
77 export LDFLAGS+=" -lgcov"
80 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
81 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
82 # Call make instruction with smp support
83 %__make %{?jobs:-j%jobs}
86 export LD_LIBRARY_PATH="../../src"
87 ctest -V %{?_smp_mflags}
90 lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info
91 genhtml %{name}.info -o out --legend --show-details
100 builddir=$(basename $PWD)
101 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
102 mkdir -p "$gcno_obj_dir"
103 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
106 cat << EOF > run-unittest.sh
113 echo "test_main start"
114 /usr/bin/rpc-port_unittests
118 echo "teardown start"
130 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
131 install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
133 %post -p /sbin/ldconfig
135 %postun -p /sbin/ldconfig
138 %manifest %{name}.manifest
139 %attr(0644,root,root) %{_libdir}/lib%{name}.so.*
140 %license LICENSE.APLv2
141 %{_bindir}/rpc-port-util
142 %config %{_sysconfdir}/dbus-1/system.d/rpc-port.conf
145 %{_includedir}/rpc-port/*.h
146 %{_libdir}/pkgconfig/*.pc
147 %{_libdir}/lib%{name}.so
149 #################################################
151 #################################################
153 %{_bindir}/rpc-port_unittests
154 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh
156 #################################################
158 #################################################