Name: stc-manager
Summary: STC(Smart Traffic Control) manager
-Version: 0.0.23
+Version: 0.0.43
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: pkgconfig(sqlite3)
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
-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}
rm %{buildroot}/usr/share/traffic_db.sql
%endif
+#Exceptions file
+mkdir -p %{buildroot}/%{_localstatedir}/lib/stc
+cp data/exceptions %{buildroot}/%{_localstatedir}/lib/stc/exceptions
+
#Systemd service file
mkdir -p %{buildroot}%{_libdir}/systemd/system/
cp resources/systemd/stc-manager.service %{buildroot}%{_libdir}/systemd/system/stc-manager.service
mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
ln -s ../stc-manager.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/stc-manager.service
-mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services/
-cp resources/dbus/net.stc.service %{buildroot}%{_datadir}/dbus-1/system-services/
-
#DBus DAC (stc-manager.manifest enables DBus SMACK)
mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
cp resources/dbus/stc-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/stc-manager.conf
%attr(644,root,root) %{_libdir}/systemd/system/stc-manager.service
%attr(644,root,root) %{_libdir}/systemd/system/multi-user.target.wants/stc-manager.service
+%attr(755,root,root) /%{_localstatedir}/lib/stc
+%attr(600,root,root) /%{_localstatedir}/lib/stc/exceptions
+
#DBus DAC
%attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/*
-%attr(644,-,-) %{_datadir}/dbus-1/system-services/*.service
%if %{?enable_database} == YES
%config(noreplace) %attr(660, root, root) %{database_full_path}
%config(noreplace) %attr(660, root, root) %{database_full_path}-journal
%endif
+%if 0%{?gtests:1}
+%{_bindir}/gtest*
+%endif
+
%files plugin
%manifest %{name}.manifest
%attr(644, -,-) %{_datadir}/icons/*.png