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
108 GCOV_PATH="/tmp/home/abuild/rpmbuild/BUILD"
109 PAKCAGE="%{name}-%{version}"
112 ## Sets the permission for applications
113 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" &> /dev/null
114 /usr/bin/find /tmp/home/ -print | /usr/bin/xargs -n1 /usr/bin/chsmack -a "System::Run" -t &> /dev/null
115 /usr/bin/chmod -R 777 /tmp/home/
120 /usr/bin/mkdir -p "${GCOV_PATH}/${PACKAGE}"
125 echo "test_main start"
126 export "GCOV_PREFIX=/tmp"
127 /usr/bin/rpc-port_unittests
131 echo "teardown start"
144 mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name}
145 install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/
147 %post -p /sbin/ldconfig
149 %postun -p /sbin/ldconfig
152 %manifest %{name}.manifest
153 %attr(0644,root,root) %{_libdir}/lib%{name}.so.*
154 %license LICENSE.APLv2
155 %{_bindir}/rpc-port-util
156 %{_bindir}/rpc-port-benchmark-server
157 %{_bindir}/rpc-port-benchmark-tool
158 %config %{_sysconfdir}/dbus-1/system.d/rpc-port.conf
161 %{_includedir}/rpc-port/*.h
162 %{_libdir}/pkgconfig/*.pc
163 %{_libdir}/lib%{name}.so
165 #################################################
167 #################################################
169 %{_bindir}/rpc-port_unittests
170 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh
172 #################################################
174 #################################################