Name: appcore-widget
Summary: Widget Application
-Version: 1.0.2
+Version: 1.3.11
Release: 1
Group: Application Framework/Libraries
License: Apache-2.0
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(dbus-glib-1)
-BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(vconf-internal-keys)
-BuildRequires: pkgconfig(alarm-service)
-BuildRequires: pkgconfig(capi-appfw-app-control)
BuildRequires: pkgconfig(appcore-common)
BuildRequires: pkgconfig(capi-appfw-app-common)
BuildRequires: pkgconfig(widget_service)
BuildRequires: pkgconfig(capi-system-info)
-BuildRequires: pkgconfig(wayland-tbm-client)
-BuildRequires: pkgconfig(ecore-wayland)
-BuildRequires: pkgconfig(screen_connector_provider)
+BuildRequires: pkgconfig(ecore-wl2)
+BuildRequires: pkgconfig(appcore-multiwindow)
+BuildRequires: pkgconfig(screen_connector_provider)
+BuildRequires: pkgconfig(gmock)
BuildRequires: cmake
+%if 0%{?gcov:1}
+BuildRequires: lcov
+BuildRequires: zip
+%endif
%description
-Widget application
+Widget base
+
+%package -n appcore-widget-base
+Summary: Widget base
+Group: Development/Libraries
+Requires(post): /sbin/ldconfig
+%description -n appcore-widget-base
+Requires(postun): /sbin/ldconfig
+
+%description
+Widget base devel
+
+%package -n appcore-widget-base-devel
+Summary: Widget base
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+%description -n appcore-widget-base-devel
+widget application (development files)
+
+%description
+Widget application devel
%package -n capi-appfw-widget-application-devel
Summary: Widget application
%description -n capi-appfw-widget-application-devel
widget application (development files)
+%package -n appcore_widget_unittests
+Summary: GTest for appcore-widget
+Group: Development/Libraries
+%description -n appcore_widget_unittests
+GTest for appcore-widget
+
+
+%if 0%{?gcov:1}
+%package gcov
+Summary: Widget application API(gcov)
+Group: Application Framework/Libraries
+
+%description gcov
+gcov objects of a widget application library
+%endif
+
%prep
%setup -q
%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
+
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%__make %{?jobs:-j%jobs}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
%install
rm -rf %{buildroot}
%make_install
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
+
mkdir -p %{buildroot}%{_libdir}/pkgconfig
cp capi-appfw-widget-application.pc %{buildroot}%{_libdir}/pkgconfig
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE %{buildroot}/usr/share/license/%{name}
+%check
+export LD_LIBRARY_PATH=../../src/base:../../src/efl_base
+ctest -V
+%if 0%{?gcov:1}
+lcov -c --ignore-errors graph --no-external -q -d . -o appcore-widget.info
+genhtml appcore-widget.info -o appcore-widget.out
+zip -r appcore-widget.zip appcore-widget.out
+install -m 0644 appcore-widget.zip %{buildroot}%{_datadir}/gcov/
+%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%files -n appcore-widget-base
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libappcore-widget-base.so.*
+%license LICENSE
+
+%files -n appcore-widget-base-devel
+/usr/include/appfw/widget_base.h
+%{_libdir}/pkgconfig/appcore-widget-base.pc
+%{_libdir}/libappcore-widget-base.so
+
-%files
-%manifest appcore-widget.manifest
+%files -n appcore-widget
+%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_libdir}/libcapi-appfw-widget-application.so*
-/usr/share/license/%{name}
+%{_libdir}/libcapi-appfw-widget-application.so.*
+%license LICENSE
%files -n capi-appfw-widget-application-devel
/usr/include/appfw/widget_app.h
/usr/include/appfw/widget_app_efl.h
/usr/include/appfw/widget_app_internal.h
%{_libdir}/pkgconfig/capi-appfw-widget-application.pc
+%{_libdir}/libcapi-appfw-widget-application.so
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/*
+%endif