Name: stc-manager
Summary: STC(Smart Traffic Control) manager
-Version: 0.0.40
+Version: 0.0.76
Release: 0
Group: Network & Connectivity/Other
License: Apache-2.0
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(capi-system-info)
-BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(openssl)
%if %{?enable_database} == YES
BuildRequires: python
BuildRequires: python-xml
+%if 0%{?gtests:1}
+BuildRequires: pkgconfig(gmock)
+%endif
+
%description
A smart traffic control manager to manage traffic counting and bandwidth limitation
-%package plugin
-Summary: STC manager plugin
+%package plugin-appstatus
+Summary: STC manager application status plugin
BuildRequires: pkgconfig(bundle)
BuildRequires: pkgconfig(syspopup-caller)
-%description plugin
-A smart traffic control manager extension for plugin
+%description plugin-appstatus
+A smart traffic control manager extension for application status plugin
+
+%package plugin-exception
+Summary: STC manager exception list plugin
+BuildRequires: pkgconfig(pkgmgr-info)
+
+%description plugin-exception
+A smart traffic control manager extension for exception list plugin
+
+%package plugin-procfs
+Summary: STC manager exception proc file system plugin
+
+%description plugin-procfs
+A smart traffic control manager extension for proc file system plugin
+
+%package plugin-tether
+Summary: Tethering plugin for data usage of tethering clients
+
+%description plugin-tether
+A smart traffic control manager extension for tethering client data usage plugin
%prep
%setup -q
%build
-export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE"
-export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE -D_GNU_SOURCE"
-export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+export CFLAGS="$CFLAGS -D_GNU_SOURCE"
+export CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DBIN_DIR=%{_bindir} \
-DENABLE_DATABASE=%{enable_database} \
-DDATABASE_FULL_PATH=%{database_full_path} \
-DENABLE_STATISTICS=%{enable_statistics} \
- -DENABLE_RESTRICTION=%{enable_restriction}
+ -DENABLE_RESTRICTION=%{enable_restriction} \
+ -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
+ -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
make %{?_smp_mflags}
%if %{?enable_database} == YES
mkdir -p %{buildroot}/opt/usr/dbspace
sqlite3 %{buildroot}%{database_full_path} < %{buildroot}/usr/share/traffic_db.sql
+ sqlite3 %{buildroot}%{database_full_path} < %{buildroot}/usr/share/firewall_db.sql
rm %{buildroot}/usr/share/traffic_db.sql
+ rm %{buildroot}/usr/share/firewall_db.sql
%endif
#Exceptions file
%config(noreplace) %attr(660, root, root) %{database_full_path}-journal
%endif
-%files plugin
+%if 0%{?gtests:1}
+%{_bindir}/gtest*
+%endif
+
+%files plugin-appstatus
%manifest %{name}.manifest
%attr(644, -,-) %{_datadir}/icons/*.png
-%attr(500,root,root) %{_libdir}/stc-manager-plugin.so
+%attr(500,root,root) %{_libdir}/stc-plugin-appstatus.so
+
+%files plugin-exception
+%manifest %{name}.manifest
+%attr(500,root,root) %{_libdir}/stc-plugin-exception.so
+
+%files plugin-procfs
+%manifest %{name}.manifest
+%attr(500,root,root) %{_libdir}/stc-plugin-procfs.so
+
+%files plugin-tether
+%manifest %{name}.manifest
+%attr(500,root,root) %{_libdir}/stc-plugin-tether.so