X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Fcapi-network-tethering.spec;h=b5924ddd21adb3f7361f874076e80c10723c98df;hb=HEAD;hp=a6f4f7f90632ebc8bbf56825322f815ba37dca00;hpb=9614750718c24f0ade89f6b80016e1818bc5fa6a;p=platform%2Fcore%2Fapi%2Ftethering.git diff --git a/packaging/capi-network-tethering.spec b/packaging/capi-network-tethering.spec index a6f4f7f..b5924dd 100644 --- a/packaging/capi-network-tethering.spec +++ b/packaging/capi-network-tethering.spec @@ -1,19 +1,28 @@ -Name: capi-network-tethering -Summary: Tethering Framework -Version: 0.0.10 -Release: 1 -Group: TO_BE/FILLED_IN -License: Apache License Version 2.0 -Source0: %{name}-%{version}.tar.gz -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig - -BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(dbus-glib-1) -BuildRequires: pkgconfig(capi-base-common) -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(vconf) -BuildRequires: cmake +Name: capi-network-tethering +Summary: Tethering Framework +Version: 1.2.2 +Release: 1 +Group: System/Network +License: Apache-2.0 +Source0: %{name}-%{version}.tar.gz +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(capi-base-common) +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(key-manager) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(libtzplatform-config) +BuildRequires: pkgconfig(gmock) +BuildRequires: cmake +%if 0%{?gcov:1} +BuildRequires: gtest-devel +BuildRequires: lcov +BuildRequires: tar +%endif +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig %description Tethering framework library for CAPI @@ -25,18 +34,95 @@ Requires: %{name} = %{version}-%{release} %description devel Development package for Tethering framework library +%package tool +Summary: Test application for Tethering +%description tool +Test application for Tethering + +%if 0%{?gcov:1} +%package gcov +Summary: Tethering Library(gcov) +Group: Network/Testing +%description gcov +gcov objects for coverage test +%endif + +%if 0%{?asan} != 1 +%package unittests +Summary: %{name} unittests binary + +%description unittests +unittests binary +%endif + %prep %setup -q -%build -cmake . -DCMAKE_INSTALL_PREFIX=/usr -make %{?jobs:-j%jobs} +%build +%if 0%{?gcov:1} +export CFLAGS+=" -fprofile-arcs -ftest-coverage" +export CXXFLAGS+=" -fprofile-arcs -ftest-coverage" +export FFLAGS+=" -fprofile-arcs -ftest-coverage" +%endif + +%if "%{?tizen_profile_name}" == "tv" +export CFLAGS+=" -DTIZEN_TV_EXT" +export CXXFLAGS+=" -DTIZEN_TV_EXT" +%endif + +%cmake -DLIB_INSTALL_DIR=%{_libdir} \ + -DBUILD_UNITTEST=%{?asan:0}%{!?asan:1} \ + . +make %{?_smp_mflags} %install rm -rf %{buildroot} %make_install +%if 0%{?gcov:1} +builddir=$(basename $PWD) +gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir" +mkdir -p "$gcno_obj_dir" +find . -name '*.gcno' ! -path '*/tools/*' -exec cp --parents '{}' "$gcno_obj_dir" ';' +%endif + +%if 0%{?asan} != 1 +cat << EOF > run-unittest.sh +#!/bin/sh +setup() { + echo "setup start" +} + +test_main() { + echo "test_main start" + /usr/bin/tethering-gtest +} + +teardown() { + echo "teardown start" +} + +main() { + setup + test_main + teardown +} + +main "\$*" +EOF + +mkdir -p %{buildroot}%{_bindir}/tizen-unittests/%{name} +install -m 0755 run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests/%{name}/ +%endif + +%check +%if 0%{?gcov:1} +tests/tethering-gtest +lcov -c --ignore-errors mismatch,graph,unused --no-external -b . -d . -o %{name}.info +genhtml %{name}.info -o out --legend --show-details +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -45,36 +131,25 @@ rm -rf %{buildroot} %manifest capi-network-tethering.manifest %defattr(-,root,root,-) %{_libdir}/*.so.* +%license LICENSE %files devel %defattr(-,root,root,-) %{_includedir}/network/*.h %{_libdir}/pkgconfig/*.pc %{_libdir}/*.so +%license LICENSE -%changelog -* Tue Jan 15 2013 Seungyoun Ju 0.0.10-1 -- Wi-Fi tethering state is not checked when its settings are modified - -* Fri Nov 02 2012 Seungyoun Ju 0.0.9-1 -- Manifest file is added for SMACK - -* Mon Aug 20 2012 Seungyoun Ju 0.0.8-1 -- Deprecated APIs are removed - -* Wed Aug 01 2012 Seungyoun Ju 0.0.7-1 -- Managed APIs are implemented for Wi-Fi tethering settings - -* Sat Jul 21 2012 Seungyoun Ju 0.0.6-1 -- Fix tethering callback issue (JIRA S1-6197) - -* Tue Jul 10 2012 Seungyoun Ju 0.0.5 -- Getting MAC address API is implemented -- TETHERING_TYPE_ALL case is implemented -- Test code is implemented +%files tool +%{_bindir}/tethering_test -* Tue Jun 26 2012 Seungyoun Ju 0.0.4 -- All internal APIs are implemented +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%endif -* Fri Jun 15 2012 Seungyoun Ju 0.0.3 -- Deprecated API from Glib2-2.32.3 is replaced with new one +%if 0%{?asan} != 1 +%files unittests +%{_bindir}/tethering-gtest +%{_bindir}/tizen-unittests/%{name}/run-unittest.sh +%endif