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(tizen-shared-queue)
22 BuildRequires: pkgconfig(uuid)
29 Requires(post): /sbin/ldconfig
30 Requires(post): coreutils
31 Requires(postun): /sbin/ldconfig
33 Recommends: amd-mod-rpc-port
36 RPC Port library package.
39 Summary: RPC Port library (Development)
40 Group: Application Framework/Development
41 Requires: %{name} = %{version}-%{release}
44 RPC Port library (Development) package.
46 #################################################
48 #################################################
50 Summary: GTest for rpc-port
51 Group: Development/Libraries
54 %description unittests
57 #################################################
59 #################################################
62 Summary: RPC Port(gcov)
63 Group: Application Framework/Testing
75 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
76 export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
77 export FFLAGS+=" -fprofile-arcs -ftest-coverage"
78 export LDFLAGS+=" -lgcov"
81 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
82 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
83 # Call make instruction with smp support
84 %__make %{?jobs:-j%jobs}
87 export LD_LIBRARY_PATH="../../src"
88 ctest -V %{?_smp_mflags}
91 lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info
92 genhtml %{name}.info -o out --legend --show-details
101 builddir=$(basename $PWD)
102 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
103 mkdir -p "$gcno_obj_dir"
104 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
107 cat << EOF > run-unittest.sh
109 GCOV_PATH="/tmp/home/abuild/rpmbuild/BUILD"
110 PAKCAGE="%{name}-%{version}"
113 ## Sets the permission for applications
114 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" &> /dev/null
115 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" -t &> /dev/null
116 /usr/bin/chmod -R 777 /tmp/home/
121 /usr/bin/mkdir -p "${GCOV_PATH}/${PACKAGE}"
126 echo "test_main start"
127 export "GCOV_PREFIX=/tmp"
128 /usr/bin/rpc-port-util -n test_port &
129 /usr/bin/rpc-port_unittests
133 echo "teardown start"
135 killall rpc-port-util
147 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
148 install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
150 %post -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
155 %manifest %{name}.manifest
156 %attr(0644,root,root) %{_libdir}/lib%{name}.so.*
157 %license LICENSE.APLv2
158 %{_bindir}/rpc-port-util
159 %{_bindir}/rpc-port-benchmark-server
160 %{_bindir}/rpc-port-benchmark-tool
161 %config %{_sysconfdir}/dbus-1/system.d/rpc-port.conf
164 %{_includedir}/rpc-port/*.h
165 %{_libdir}/pkgconfig/*.pc
166 %{_libdir}/lib%{name}.so
168 #################################################
170 #################################################
172 %{_bindir}/rpc-port_unittests
173 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh
175 #################################################
177 #################################################